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:

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

 Thanks.

=====================================
Dr. Dorita Rostkier-Edelstein, Ph.D.
 
http://www.geocities.com/drostkier/DO_page.html
=====================================

________________________________
From: Mary Haley <haley_at_ucar.edu>
To: Dorita Rostkier-Edelstein <drostkier_at_yahoo.com>
Cc: ncl-talk_at_ucar.edu
Sent: Wednesday, March 25, 2009 3:12:56 PM
Subject: Re: problem using conform_dims

Dorita,

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:

lat=fspan(59.963614,-59.963614,1649)
lon=fspan(0.036378335,359.963614,4948)

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

nlat = 1649
nlon = 4948
lat=fspan(59.963614,-59.963614,nlat)
lon=fspan(0.036378335,359.963614,nlon)

Then, in the conform_dims call:

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

--Mary

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

Hello,

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 morph2nc_time_5.1_q.nc

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

Thanks,

Dorita

 
=====================================
Dr. Dorita Rostkier-Edelstein, Ph.D.
 
http://www.geocities.com/drostkier/DO_page.html
=====================================
<morph2nc_time_5.1_q.nc>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
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