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

James Ciarlo' ciarlo.james at gmail.com
Tue Jun 7 06:57:39 MDT 2022


Hi Adam,

Yes that fixed the problem thank you very much. It didn't cross my mind to
move the centre point.

It's very unfortunate that the defined centre points in the data need to be
corrected manually for the best fit but I'm really happy to have neat plots
again.

Thanks once again.

Best regards
James

On Tue, 7 Jun 2022 at 01:02, Adam Phillips <asphilli at ucar.edu> wrote:

> 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/20220607/af482961/attachment.htm>


More information about the ncl-talk mailing list