<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:΢ÈíÑźÚ
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dave and Alan, <br>My apology for causing that misunderstanding.<br>Dave, you are right! I missed that function is aksing for a dim size of a variable. <br>In my case, those dimensions are only defined however not used for any variables, which are still significant. <br>Thanks again.<br>Best,<br>Ting<br><br><div>> Date: Fri, 24 Apr 2015 14:25:53 -0600<br>> Subject: Re: [ncl-talk] how to get the dimension size in netcdf file<br>> From: dbrown@ucar.edu<br>> To: abrammer@albany.edu<br>> CC: leiting2002@hotmail.com; ncl-talk@ucar.edu<br>> <br>> getfilevardimsizes gets the sizes of the dimensions the apply to a<br>> specific variable. I thought the question was how to get the size of a<br>> dimension by name from the file without specifying a particular<br>> variable.<br>> -dave<br>> <br>> <br>> On Fri, Apr 24, 2015 at 12:53 PM, Alan Brammer <abrammer@albany.edu> wrote:<br>> > Isn't that functionality in this function?<br>> > https://www.ncl.ucar.edu/Document/Functions/Built-in/getfilevardimsizes.shtml<br>> ><br>> ><br>> > Alan.<br>> ><br>> > On 24 April 2015 at 14:36, David Brown <dbrown@ucar.edu> wrote:<br>> >><br>> >> Well we would need to create another function to do that. We will<br>> >> consider it. Thanks for the suggestion.<br>> >> -dave<br>> >><br>> >> On Fri, Apr 24, 2015 at 12:32 PM, LeiTing <leiting2002@hotmail.com> wrote:<br>> >> > Dave,<br>> >> > Thank you so much. That is already the solution I need.<br>> >> > However, can NCL be "smarter" that ,say, I can directly ask for the size<br>> >> > of<br>> >> > a named dimension?<br>> >> > I know I can do it after using the function you pointed out, however,<br>> >> > I'm<br>> >> > just wondering if there are some tip that directly do it.<br>> >> > Thanks a lot.<br>> >> > Ting<br>> >> ><br>> >> >> Date: Fri, 24 Apr 2015 12:01:50 -0600<br>> >> >> Subject: Re: [ncl-talk] how to get the dimension size in netcdf file<br>> >> >> From: dbrown@ucar.edu<br>> >> >> To: leiting2002@hotmail.com<br>> >> >> CC: ncl-talk@ucar.edu<br>> >> ><br>> >> >><br>> >> >> Hi Ting,<br>> >> >> getfiledimsizes is the function to use.<br>> >> >> See<br>> >> >><br>> >> >> http://www.ncl.ucar.edu/Document/Functions/Built-in/getfiledimsizes.shtml<br>> >> >><br>> >> >> The example shows how to get the dimensions names along with the sizes.<br>> >> >> -dave<br>> >> >><br>> >> >><br>> >> >> On Fri, Apr 24, 2015 at 10:12 AM, LeiTing <leiting2002@hotmail.com><br>> >> >> wrote:<br>> >> >> > Dear Ncl folks,<br>> >> >> > I apologize first if this is a duplicated question though I haven't<br>> >> >> > found<br>> >> >> > it.<br>> >> >> > I have a netcdf file (the "sparse grid" by NSSL), with ncdump output<br>> >> >> > as<br>> >> >> > ^^^^^^^^^^^^<br>> >> >> > dimensions:<br>> >> >> > Lat = 236 ;<br>> >> >> > Lon = 355 ;<br>> >> >> > pixel = 12596 ;<br>> >> >> > variables:<br>> >> >> > float RefQC(pixel) ;<br>> >> >> > ..............................<br>> >> >> > VV<br>> >> >> ><br>> >> >> > I want to get the dimension lat and lon, which can 't be obtained by<br>> >> >> > ,say,<br>> >> >> > dimsize (RefQC).<br>> >> >> > They are also not global attributes.<br>> >> >> > Hence, I 'm lost on how to access those definitions of "lat" and<br>> >> >> > "lon"<br>> >> >> > in<br>> >> >> > the netcdf file.<br>> >> >> > Your help is appreciated.<br>> >> >> > Best wishes,<br>> >> >> > Ting<br>> >> >> ><br>> >> >> ><br>> >> >> > _______________________________________________<br>> >> >> > ncl-talk mailing list<br>> >> >> > List instructions, subscriber options, unsubscribe:<br>> >> >> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br>> >> >> ><br>> >> _______________________________________________<br>> >> ncl-talk mailing list<br>> >> List instructions, subscriber options, unsubscribe:<br>> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br>> ><br>> ><br></div>                                            </div></body>
</html>