[ncl-talk] Unable to get the latitude on Y axis on a map
Mary Haley
haley at ucar.edu
Mon Oct 1 14:57:41 MDT 2018
Hi Maud,
Thank you for providing a script that was ready to go.
I'm not sure what's going on with the native NCL map tickmark labels. I'll
create a ticket on this.
Meanwhile, there's a possible work-around, and that is to use a custom
procedure for setting the labels yourself. This procedure basically uses
gsn_text_ndc under the hood to take a lat/lon value, convert it to NDC
coordinates, and then use gsn_text_ndc to draw the label.
This procedure is used in example mptick_9.ncl at:
http://www.ncl.ucar.edu/Applications/mptick.shtml#ex9
I've included the procedure in your script, and then made a few changes to
make sure the X and Y axis strings and the subtitles at the top don't run
into the tickmark labels.
Note that I chose to label all four sides of the plot. If you don't want
this, simply comment any one of these lines to move the one you don't want:
tmres at tmYLValues = ispan(70,82,1)
tmres at tmXBValues = ispan(-101,-52,3)
tmres at tmYRValues = ispan(70,82,1)
tmres at tmXTValues = ispan(-150,-50,5)'
See attached. You should double-check that the labels look correct!
--Mary
On Fri, Sep 28, 2018 at 1:03 PM, Maud Leriche <Maud.Leriche at aero.obs-mip.fr>
wrote:
> Hello everybody,
>
> With one of my student, we possibly found a bug in ncl (6.5.0).
> We want to plot the orography of our domain simulation on a map. We are
> using the MesoNH model (http://mesonh.aero.obs-mip.fr/mesonh54/, 5.4.1)
> with a polar projection defined with :
> Latitude at the centre of the domain (LAT0) = 78.5°N
> Longitude of the centre of the domain (LON0) = -86.41°O
> Parameter of the conformal projection (RPK) = 1 (corresponding to
> stereographic polar projection)
>
> The graph obtained from our ncl script doesn’t indicate the latitude on
> the Y axis. Instead the Y axis indicates longitude.
>
> We think that the problem comes to ncl because if the conformal projection
> parameter is inferior to 0.72, the plot is right but if this parameter is >
> 0.71, ncl doesn’t indicate the latitude on the Y axis.
>
> The tar file containing our ncl script, the netcdf file output of our
> simulation and the obtained plot can be downloaded here:
> https://framadrop.org/r/uKKEspjOMJ#DWaQaXTd2jhmXGXuJpz85vVjfgWJB2
> HqSFZTdZR09Qc=
>
> Below is the obtained plot using a RPK = 0.71.
>
> Many thanks in advance for your help.
>
> Regards,
>
> Maud
>
> Maud LERICHE
> Chargée de recherche CNRS - HDR
> Laboratoire d’Aérologie (LA) - France
> Chercheuse invitée
> Centre pour l’étude et la simulation du climat
> à l’échelle régionale (ESCER) - PK 7630
> Université du Québec à Montréal
> Case postale 8888, succursale Centre-Ville
> Montréal (Québec) Canada
> H3C 3P8
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ba8dc818/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RPK071.png
Type: image/png
Size: 190510 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ba8dc818/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plt_BasicMap.png
Type: image/png
Size: 336220 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ba8dc818/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mnh_plot_pearl_mod.ncl
Type: application/octet-stream
Size: 9049 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181001/ba8dc818/attachment-0001.obj>
More information about the ncl-talk
mailing list