[ncl-talk] Fwd: plotting rotated grid - good overlay or bad box
Adam Phillips
asphilli at ucar.edu
Mon Jun 6 17:02:25 MDT 2022
Hi James,
I have altered your script to go with method 1 from the 1st rotated lat/lon
example. However, I had to alter the mpCenterLatF/mpCenterLonF settings a
bit from the projection origins. I do not know why the alteration was
required, as usually one can set the projection origins and all is well.
Thus, you might want to alter the settings a bit on your own (lines 41-42)
to see if you can get a better fit of the data to the map.
Good luck,
Adam
On Fri, Jun 3, 2022 at 1:44 AM James Ciarlo' <ciarlo.james at gmail.com> wrote:
> Hi Adam,
>
> Thanks for your reply. To be honest, I had tried that system, but I was
> trying to avoid that blank space and the inclined box.
>
> I was hoping to get something like the method #1, that focuses only on the
> box with the data.
>
> On Thu, 2 Jun 2022 at 20:01, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> 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>
>>
>
--
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/20220606/587a8ce6/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot1rot.ncl
Type: application/octet-stream
Size: 2591 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220606/587a8ce6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plot1rot.png
Type: image/png
Size: 197613 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220606/587a8ce6/attachment.png>
More information about the ncl-talk
mailing list