Re: problem using conform_dims

From: Dorita Rostkier-Edelstein <drostkier_at_nyahnyahspammersnyahnyah>
Date: Wed, 25 Mar 2009 06:30:45 -0700 (PDT)

I see, I corrected it, it does not complain now, but it still writes that there are zero records. See the ncdump result that I get:

        time = UNLIMITED ; // (0 currently)
        lat = 1649 ;
        lon = 4948 ;
        float RRATE(lat, lon) ;
                RRATE:_FillValue = -1.f ;
        float lat(lat) ;
                lat:units = "degrees_north" ;
        float lon(lon) ;
                lon:units = "degrees_east" ;


Dr. Dorita Rostkier-Edelstein, Ph.D.

From: Mary Haley <>
To: Dorita Rostkier-Edelstein <>
Sent: Wednesday, March 25, 2009 3:12:56 PM
Subject: Re: problem using conform_dims


The first argument to conform_dims must be the dimension sizes of the array
you want to create and conform the other array to. You are actually passing
in the whole array of values.

First, you have the dimension sizes of the lat, lon arrays:


I would assign the lat,lon dimension sizes to local variables,
so we can use them later in the script:

nlat = 1649
nlon = 4948

Then, in the conform_dims call:

    rrate = conform_dims( (/1,nlat,nlon/), data1, (/1,2/) )


On Mar 25, 2009, at 2:03 AM, Dorita Rostkier-Edelstein wrote:


I am trying to write a nc file and in the way to do so I try to use conform_dims. I use it to try to output the record number. Otherwise, the direct writing of the data without the record information works fine.

I get the following error:

fatal:_NclBuildArray: each element of a literal array must have the same dimension sizes, at least one item doesn't
fatal:Execute: Error occurred at or near line 38 in file

The script is only a few lines long and is attached.



Dr. Dorita Rostkier-Edelstein, Ph.D.
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Mar 25 2009 - 07:30:45 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 25 2009 - 15:36:00 MDT