[ncl-talk] problem in writing the net cdf file

Mary Haley haley at ucar.edu
Tue Aug 26 09:17:09 MDT 2014


Hi,

There's not enough information to go on here.  First, when you say you are
not able to extract the values, do you mean you get an error message, or
you don't get the values you expect?  Please be more specific if you can.

Also, I don't understand what's going on in your code.  It looks like you
are reading variables off a group of files (opened with "addfiles"), and
then attaching lat and lon coordinate arrays to them afterwards. Did you
first check to see if the variables maybe already have coordinate arrays
when you read them off the file?  You can verify this with:

printVarSummary(u1)
printVarSummary(v1)

right after your "addfiles" call.

The other possibility is that your data is "curvilinear" and hence you have
2D arrays of lat and lon, and not 1D arrays.  If your lat/lon are 2D, then
you can't attach coordinate arrays, and you won't be able to use coordinate
subscripting via the "{" and "}" syntax.

Instead, you will need to use the function "getind_latlon2d":

http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml

If you continue to have problems with this, please provide more
information, and also call "printVarSummary" on your data variables (u1,
v1, lat, lon) and include this output so we can see what kind of data you
have.

--Mary



On Mon, Aug 25, 2014 at 7:55 AM, Muhammad Omer Mughal <
m.mughal1 at postgrad.curtin.edu.au> wrote:

>  Hi
>
>
>  I am intending to extract the wind speed at a particular level
> and latitude longitude .There are 159 time instances in about 159 files and
> I am trying to get the wind speed out at all those time instances at
> the particular latitude and longitude shown in the code attached .Kindly
> suggest for any chages if required. Till now I am not able to extract the
> correct values.
>
>
>
>  *Regards*
> *Muhammad Omer Mughal*
> *Department of Applied Physics*
>
>
> _______________________________________________
> 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/20140826/624a268c/attachment.html 


More information about the ncl-talk mailing list