[ncl-talk] How to change the longitude
Dennis Shea
shea at ucar.edu
Tue Jul 30 08:11:46 MDT 2019
For a map, you would set the mpCenterLonF resource
res at mpCenterLonF = 210 ; center longitude
For example:
*https://www.ncl.ucar.edu/Applications/Images/cmorph_4_lg.png*
<https://www.ncl.ucar.edu/Applications/Images/cmorph_4_lg.png>
This shows and uninterrupted Indian/Pacific/Atlantic Oceans
---
You did not include a printVarSummary(fine) or a sample graphic.
So, it is hard to know how to answer the question.
---
You may have to
[1] Manually reorder the plotted variable or the *original *variable
[2] Possibly, if the longitudes span 360, the *lonPivot *
<http://www.ncl.ucar.edu/Document/Functions/Contributed/lonPivot.shtml>could
be used to reorder the *original* array.
On Mon, Jul 29, 2019 at 1:45 PM Anahita Amiri Farahani via ncl-talk <
ncl-talk at ucar.edu> wrote:
> Hi all,
>
> I am trying to change the longitude axis for plot, because both Atlantic
> and Pacific Oceans are important for example instead of starting from zero
> I would prefer to start from 60E and another possibility is longitude goes
> from -30 to 360. how can I do that, this is my script:
>
>
> wks = gsn_open_wks ("eps", "omega_response") ; send graphics to
> PNG file
> gsn_define_colormap(wks,"BlRe")
> res = True ; plot mods desired
> res at tiMainString = "Omega Response" ; title
> res at gsnDraw = False ; don't draw yet
> res at gsnFrame = False ; don't advance yet
> res at cnLevelSpacingF = 2. ; contour interval
>
> res at trYMinF = 100;0 ; set minimum Y-axis value
> res at trYMaxF = 1000;12250;1200 ; set maximum Y-axis value
>
> res at cnLevelSelectionMode = "ManualLevels" ; AutomaticLevels
> res at cnMinLevelValF = -0.05 ; min level
> res at cnMaxLevelValF = 0.05 ; max level
> res at cnLevelSpacingF = 0.005 ; interval
>
> res at cnLinesOn = False ; turn off contour lines
> res at cnLineLabelsOn = False ; tuen off line labels
>
> res at cnFillOn = True ; turn on color
> res at trYReverse = True ; reverse Y-axis
> res at gsnContourZeroLineThicknessF = 2. ; doubles thickness of zero
> contour
>
> plot = gsn_csm_hov(wks, fine1, res)
>
>
> Thanks,
> Ana
> _______________________________________________
> 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/20190730/c6dc3c08/attachment.html>
More information about the ncl-talk
mailing list