gancgrid error: unable to allocate memory for grtmp grid storage

Petroski, Tom (MLCI) Tom_Petroski at ML.COM
Tue May 13 07:59:35 EDT 2008

GrADS 2.0 Users,

I get the following error message when using GrADS 2.0.a2, but not with versions 2.0.a1 or 2.0.a0.

“gancgrid error: unable to allocate memory for grtmp grid storage”

I am using the binary files from the ftp site compiled for Linux, but I found these statements in gaio.c lines 2426 – 2435.

/* size of the grid to be read */
  grsize = xlen * ylen * zlen * tlen * elen;

  /* allocate memory for temporary grids to hold data

     before being placed properly in requested block */

  grtmp = (gadouble *)galloc(grsize * sizeof(gadouble),"grtmp");

  if (grtmp==NULL) {
    gaprnt (0,"gancgrid error: unable to allocate memory for grtmp grid storage \n");
    return (1);

I can successfully open my user created netcdf file,

ga-> q file 2

File 2 : Climatology: 6-hourly means 1971-2000



  Type = Gridded

  Xsize = 144  Ysize = 73  Zsize = 1  Tsize = 1464  Esize = 1

  Number of Variables = 1

    hgt_500_clim 0 -103 HGT_500_CLIM

But when I attempt “define clim = hgt_500_clim.2’” under 2.0.a2, I get the earlier mentioned error message.

Is this a bug?

Thank You,

Tom Petroski
Sent from my BlackBerry Wireless Device

This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: By messaging with Merrill Lynch you consent to the foregoing.
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the gradsusr mailing list