Re: problem using conform_dims

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 25 Mar 2009 07:12:56 -0600

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:12:56 MDT

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