[ncl-talk] how to get the dimension size in netcdf file

David Brown dbrown at ucar.edu
Tue May 12 08:03:36 MDT 2015


Well we would need to create another function to do that. We will
consider it. Thanks for the suggestion.
 -dave

On Fri, Apr 24, 2015 at 12:32 PM, LeiTing <leiting2002 at hotmail.com> wrote:
> Dave,
> Thank you so much. That is already the solution I need.
> However, can NCL be "smarter" that ,say, I can directly ask for the size of
> a named dimension?
> I know I can do it after using the function you pointed out, however, I'm
> just wondering if there are some tip that directly do it.
> Thanks a lot.
> Ting
>
>> Date: Fri, 24 Apr 2015 12:01:50 -0600
>> Subject: Re: [ncl-talk] how to get the dimension size in netcdf file
>> From: dbrown at ucar.edu
>> To: leiting2002 at hotmail.com
>> CC: ncl-talk at ucar.edu
>
>>
>> Hi Ting,
>> getfiledimsizes is the function to use.
>> See
>> http://www.ncl.ucar.edu/Document/Functions/Built-in/getfiledimsizes.shtml
>>
>> The example shows how to get the dimensions names along with the sizes.
>> -dave
>>
>>
>> On Fri, Apr 24, 2015 at 10:12 AM, LeiTing <leiting2002 at hotmail.com> wrote:
>> > Dear Ncl folks,
>> > I apologize first if this is a duplicated question though I haven't
>> > found
>> > it.
>> > I have a netcdf file (the "sparse grid" by NSSL), with ncdump output as
>> > ^^^^^^^^^^^^
>> > dimensions:
>> > Lat = 236 ;
>> > Lon = 355 ;
>> > pixel = 12596 ;
>> > variables:
>> > float RefQC(pixel) ;
>> > ..............................
>> > VV
>> >
>> > I want to get the dimension lat and lon, which can 't be obtained by
>> > ,say,
>> > dimsize (RefQC).
>> > They are also not global attributes.
>> > Hence, I 'm lost on how to access those definitions of "lat" and "lon"
>> > in
>> > the netcdf file.
>> > Your help is appreciated.
>> > Best wishes,
>> > Ting
>> >
>> >
>> > _______________________________________________
>> > ncl-talk mailing list
>> > List instructions, subscriber options, unsubscribe:
>> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>> >


More information about the ncl-talk mailing list