Re: Change start-point of longitude for a map

From: <brownrig_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 30 2011 - 21:28:27 MDT

Hi Mark,

To accomplish the second part of your question, you essentially have
to do everything involving a "wks" variable twice; something like:

   wksX11 = gsn_open_wks("x11", "output")
   wksPS = gsn_open_wks("ps", "output")
...
   plotX11 = gsn_contour_map(wksX11, ...)
   plotPS = gsn_contour_map(wksPS, ...)
...
   polyX11 = gsn_add_polygon(wksX11, plotX11, ...)
   polyPS = gsn_add_polygon(wksPS, plotPS, ...)
...
   frame(wksX11)
   frame(wksPS)

See what I'm getting at? It's perhaps a bit awkward, but one way to
manage it *might* be to separate concerns, where all the file reading
and analysis takes place in the main body of the script, and all the
resource management and drawing is performed in a parametrized
function that takes as an argument, among other things, the
workstation-type you want to draw to:

   ; read files...
...
   ; extract variables, perform analysis, etc...
...
   generatePlot("x11", ...)
   generatePlot("ps", ...)
   generatePlot("png", ...)
...

Hope that helps,
Rick

On Wed, 30 Mar 2011 19:52:07 -0700 (PDT)
  Mark Chan <cym263@yahoo.com> wrote:
> NCL users,
>
> There is a global map with longitude from -180 to 180. Are there any
>easy way to
> change the map with longitude from 0 to 360?
> I was trying to use "data=lonFlip(data)" but the map didn't change.
>Can anyone
> help?
>
>
> Besides, we often use "wks = gsn_open_wks ("x11", "output")" for
>output, how
> is it possible to output both "x11" and "ps" at the same run?
>
> Thanks a lot in advance!
> Mark
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 30 21:28:32 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT