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

LeiTing leiting2002 at hotmail.com
Tue May 12 01:53:14 MDT 2015


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
> >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150512/b92f16dc/attachment.html 


More information about the ncl-talk mailing list