[ncl-talk] CylindricalEqualArea map projection problems

Marc Michelsen marc at u.washington.edu
Tue Mar 13 10:18:27 MDT 2018


Hi Adam,

That worked but strangely it also got rid of the latitude tickmarks and 
labels. Looks like this now:



ncl script is below. Anyway to get them back?
Thanks,
Marc

243 olympus% cat maponly.ncl
begin

   wks  = gsn_open_wks("eps","maponly")
   res                        = True
   res at mpOceanFillColor       = "cyan"
   res at mpLandFillColor        = "sienna"
   res at mpInlandWaterFillColor = "cyan"
;  res at mpProjection = "CylindricalEquidistant"
   res at mpProjection = "CylindricalEqualArea"
   res at mpLimitMode = "LatLon"
   res at mpMinLatF = -45.
   res at mpMaxLatF = 45.
   res at pmTickMarkDisplayMode = "Always"
   plot = gsn_csm_map(wks,res)
   delete(wks)
   system("convert -trim -density 133 maponly.eps maponly.png")

  end
244 olympus%



On 3/13/2018 8:54 AM, Adam Phillips wrote:
> Hi Marc,
> Try also setting:
> res at mpLimitMode = "LatLon"
> I think that setting is implied when using the cylindrical equidistant 
> project, but is needed to use the mp*LatF resources for other 
> projections..
> Adam
>
> On Tue, Mar 13, 2018 at 9:26 AM, Marc Michelsen <marc at u.washington.edu 
> <mailto:marc at u.washington.edu>> wrote:
>
>     Hi Mary,
>
>     Thank you, that fixed the tickmarks and labels, but what about the
>     min and max latitude?
>     It's still rendered from -90 to 90 despite setting
>     res at mpMinLatF = -45.
>     res at mpMaxLatF = 45.
>
>     Thanks,
>     Marc
>
>     On 3/13/2018 7:15 AM, Mary Haley wrote:
>>     Hi Marc,
>>
>>     The simple solution is to set:
>>
>>       res at pmTickMarkDisplayMode = "Always"
>>
>>     ​The longish explanation is that it used to be that you couldn't
>>     get map tickmark labels at all, so for C.E. plots, we created
>>     some special code to explicitly add labels. This is what you see
>>     in the original plot.  We didn't do this for other map
>>     projections because we knew that eventually the internal code
>>     would be enhanced to get labels for other map projections. This
>>     internal code only gets activated by the "​pmTickMarkDisplayMode"
>>     resource, which is a Plot Manager resource that if you give it a
>>     value of "Always", it will force the map tickmarks to be added.
>>     We haven't made this the default yet because the internal code is
>>     not really complete. I think at some point we may just turn this
>>     on and make it the default.
>>
>>     --Mary
>>
>>
>>
>>
>>
>>
>>
>>     On Sat, Mar 10, 2018 at 8:45 AM, Marc Michelsen
>>     <marc at u.washington.edu <mailto:marc at u.washington.edu>> wrote:
>>
>>         Hi NCLers,
>>
>>         When I use the CylindricalEquidistant map projection it looks
>>         great:
>>
>>         3414 olympus% cat maponly.ncl
>>         begin
>>           wks  = gsn_open_wks("png","maponly")
>>           res                        = True
>>           res at mpOceanFillColor       = "cyan"
>>           res at mpLandFillColor        = "sienna"
>>           res at mpInlandWaterFillColor = "cyan"
>>           res at mpProjection = "CylindricalEquidistant"
>>res at mpProjection = "CylindricalEqualArea"
>>           res at mpMinLatF = -45.
>>           res at mpMaxLatF = 45.
>>           plot = gsn_csm_map(wks,res)
>>           delete(wks)
>>           system("convert -trim maponly.png maponly.png")
>>           end
>>         3415 olympus% ncl < maponly.ncl
>>          Copyright (C) 1995-2017 - All Rights Reserved
>>          University Corporation for Atmospheric Research
>>          NCAR Command Language Version 6.4.0
>>          The use of this software is governed by a License Agreement.
>>          See http://www.ncl.ucar.edu/ for more details.
>>         3416 olympus%
>>
>>
>>
>>         However if I switch to
>>         res at mpProjection = "CylindricalEqualArea"
>>         I get this:
>>
>>
>>
>>         i.e. no tickmarks, no lat/lon labels and the min max latitude
>>         are not respected. Is this a bug or am I missing something?
>>
>>         Thanks,
>>
>>         Marc
>>
>>
>>
>>         _______________________________________________
>>         ncl-talk mailing list
>>         ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>>         List instructions, subscriber options, unsubscribe:
>>         http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>         <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>
>>
>
>
>     _______________________________________________
>     ncl-talk mailing list
>     ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>     List instructions, subscriber options, unsubscribe:
>     http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>     <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
>
>
>
> -- 
> Adam Phillips
> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
> www.cgd.ucar.edu/staff/asphilli/ 
> <http://www.cgd.ucar.edu/staff/asphilli/> 303-497-1726
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180313/be4d2e5b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ojjeifeicjejhjeh.png
Type: image/png
Size: 23107 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180313/be4d2e5b/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfpmligoddaogcja.png
Type: image/png
Size: 15095 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180313/be4d2e5b/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icbhafbaaojgafnk.png
Type: image/png
Size: 4840 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180313/be4d2e5b/attachment-0002.png>


More information about the ncl-talk mailing list