[ncl-talk] plot with irregular latitude
Dennis Shea
shea at ucar.edu
Fri Nov 13 14:50:27 MST 2015
Hi Clotilde
The following indicate that you have 'curvilinear' coordinates.
lat2d = f->nav_lat ; (y,x)
lon2d = f->nav_lon ; (y,x)
If you want a (depth x latitude) at a constant longitude, my
suggestion is to regrid to a rectilinear grid. The advantage of the
rectilinear grid is the you can use the 'natural' coordinates of the
grid rather than subscript indices.
====
I don't have your data file but I changed some existing scripts.
Hopefully, they will work for you.
They may have a few errors because I can not test them.
[1] PSY_esmf.ncl
Generate a weight file and a sample plot (lat,lon).
I suggest the you make the generated rectilinear grid at about
the same resolution of the source file.
[2] PSY.regrid_wgts.ncl
Use the weight file generated in [1]
This file can be for other regridings also. It is quite fast.
See also
http://www.ncl.ucar.edu/Applications/toulouse.shtml
http://www.ncl.ucar.edu/Applications/pop.shtml
Cheers
D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSY_esmf.ncl
Type: application/octet-stream
Size: 4491 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151113/da101fff/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PSY.regrid_wgts.ncl
Type: application/octet-stream
Size: 1922 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151113/da101fff/attachment-0001.obj
More information about the ncl-talk
mailing list