[ncl-talk] Fwd: plotting rotated grid - good overlay or bad box

Adam Phillips asphilli at ucar.edu
Thu Jun 2 12:00:47 MDT 2022


Hi James,
It looks like you took your code from example #1
<https://www.ncl.ucar.edu/Applications/Scripts/rotatedltln_1.ncl> in the
rotated lat/lon examples. That example demonstrated 2 methods to plot
rotated data:
1 - Set tfDoNDCOverlay=True and do not transform the data onto the map
projection.
2 - Attach the latitude/longitude coordinates (lat2d,lon2d) to the array to
be plotted, do not use tfDoNDCOverlay thus allowing NCL to transform the
data to the map projection.

It looks like from your script that you're trying to use method #2, but
were setting tfDoNDCOverlay = True. I have modified your script, and
tweaked the map settings so that the entire data map is shown.
Hope that helps!
Adam

On Thu, Jun 2, 2022 at 5:13 AM James Ciarlo' via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

>
> Dear NCL users,
>
> I am trying to plot some data in rotated coordinates. I followed the
> instructions on the website (
> https://www.ncl.ucar.edu/Applications/rotatedltln.shtml) and I got to a
> situation where I either have to switch off the terrain map, or cut out
> part of the data.
>
> Specifically, the example shows that res at tfDoNDCOverlay should be True,
> but I get the result in the image "plot1rot_true.png", when I switch it to
> False, the map aligns well, but you can see that part of the Mediterranean
> on the East got cut out.
>
> I am not sure what else to do. I have attached my script and a data file.
>
> The file is found here:
> https://www.dropbox.com/sh/8l0a3b5e3pfpq13/AACiICNlYCsAdvjP8X2xpAxea?dl=0
>
> Thanks
> James
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220602/428d37d9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot1rot.png
Type: image/png
Size: 176441 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220602/428d37d9/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot1rot.ncl
Type: application/octet-stream
Size: 2460 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220602/428d37d9/attachment.obj>


More information about the ncl-talk mailing list