[pyngl-talk] Updates for using Pyngl
Xiaoni Wang
xiaoni.wang at obspm.fr
Tue Oct 25 09:41:01 MDT 2016
Hi Mary,
Thank you very much for your prompt response and helpful information !
1) in order to plot non-ocean part, I added the following lines in my code.
res.mpFillOn = True
res.mpOceanFillColor = "white"
The resulting figure still contains ocean. Then I added
res.mpFillDrawOrder = "PostDraw"
This time, the ocean part disappeared. But the color scale is greatly changed in the figure. I attach two figures in the below to show their effects. isccp_19V.000001.png with PostDraw added, and isccp_19V.000001.png.old without Postdraw.
How can I have the same color as isccp_19V.000001.png.old, but without ocean ?
2) I also looked at how to fill the small islands in your examples. There are something that I would like to clarify.
It seems that , we need the latitude/longitude of grid center, and also information about grid corner, in order to constrain the interpolation.
In my case, between any two grids, the distance between their center is 0.25 degree in latitude, and varying in longitude. So I have the distance between two grid center in latitude and longitude (in degree). My question is : how to use them ? The geodesic example just read in the corner_lat/lon, but are they the latitude/longitude of the 4 corners of a grid ? if so, which corder is the first one, and in which order are they organized ? (In the mpas example, they seem to read in latVertex and lonVertex and they define latvoc/lonvoc. Yet I have the same question….)
Thank you again !!
Best wishes,
Xiaoni
>
> 2) Over small islands, the interpolation method also produced some effects (see large yellow areas on the ocean in figure isccp_19V.00001.png). Again I do not need the ocean around the island, just the results over (small) islands.
>
> This is simply an artifact of having a few values surrounded by a lot of missing values. In order to plot data like this correctly, you need to have some kind of cell boundary or grid corner information, so the interpolation stays within these bounds.
>
> If you look at our NCL examples for geodesic and MPAS grids, they set these two special resources:
> res at sfXCellBounds = cx
> res at sfYCellBounds = cy
> which were read off a file, and are usually dimensioned something like N x 4 or N x 3 where N is the number of cell centers, and the 3 or 4 represents the number of vertices of a polygon that surrounds each cell center.
>
> You can see the NCL code for these examples at:
>
> http://www.ncl.ucar.edu/Applications/geodesic.shtml
> http://www.ncl.ucar.edu/Applications/mpas.shtml (see example mpas_cell_3.ncl)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20161025/cafcf970/attachment-0003.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isccp_19V.000001.png
Type: image/png
Size: 105938 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20161025/cafcf970/attachment-0001.png
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20161025/cafcf970/attachment-0004.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isccp_19V.000001.png.old
Type: application/octet-stream
Size: 276100 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20161025/cafcf970/attachment-0001.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20161025/cafcf970/attachment-0005.html
More information about the pyngl-talk
mailing list