RE: [ncl-talk] Rotated lat/lon grid

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Fri, 9 Jan 2009 09:45:11 +0100

Dear all,

Thanks for your help. As Dave correctly stated, there was some confusion
over terminology (see email below). His answer did the trick...

In Brief: If you have a rotated lat/lon system defined by the latitude
and longitude of the rotated pole (pollat, pollon) and you want to plot
your native data using tfDoNDCOverlay=True, you can do the following...

 lat = ... ; 2d-array of geographical latitudes
 lon = ... ; 2d-array of geographical longitudes
 pollat = 43.0 ; latitude of rotated pole
 pollon = -170.0 ; longitude of rotated pole
 r = True
 r_at_cnFillOn = True
 r_at_cnLinesOn = False
 r_at_gsnSpreadColors = True
 r_at_mpDataBaseVersion = "MediumRes"
 r_at_mpProjection = "CylindricalEquidistant"
 r_at_mpProjection = "CylindricalEquidistant"
 r_at_mpCenterLonF = 180.0+pollon
 r_at_mpCenterLatF = 90.0-pollat
 r_at_mpLimitMode = "Corners"
 r_at_mpLeftCornerLatF = lat(0,0)
 r_at_mpLeftCornerLonF = lon(0,0)
 r_at_mpRightCornerLatF = lat(s(0)-1,s(1)-1)
 r_at_mpRightCornerLonF = lon(s(0)-1,s(1)-1)
 plt = gsn_csm_contour_map(wks,f,r)

Note that the computation of mpCenter[Lat/Lon]F is somewhat different
than what Dave suggested.

Thanks for all your help!
Oliver

> -----Original Message-----
> From: David Brown [mailto:dbrown_at_ucar.edu]
> Sent: Donnerstag, 8. Januar 2009 19:14
> To: Fuhrer Oliver
> Cc: Mary Haley; Dennis Shea
> Subject: Re: Rotated lat/lon grid
>
> Hi Oliver,
>
> I think there is some confusion over terminology here. If I
> understand what you are saying correctly your native grid is *not*
> like the displaced pole POP grid. Rather it is a regular
> lat/lon grid
> with the pole rotated to another point on the globe. You would like
> to draw the native grid and using tfDoNDCOverlay set to True, have
> NCL draw the continental outlines aligned with this grid. This is
> perfectly possible in NCL. You need to set the projection to
> "CylindricalEquidistant", mpCenterLonF to the longitude of the new
> pole and mpCenterLatF to the latitude of the new equator
> (pole + or -
> 90 degrees). Additionally you need to set the map limits correctly.
> If you can calculate the locations (in unrotated lat/lon
> coordinates)
> of either two diagonally opposite corners of your grid then you can
> set mpLimitMode to "corners" and set them using the mp[Left/Right]
> Corner[Lat/Lon]F resources (4 resources altogether).
>
> If you have trouble with this, let us know. You can send some sample
> data and the script you are using and we will try to get it properly
> aligned for you.
>
> -dave
>
>
>
>
> On Jan 8, 2009, at 6:11 AM, Dennis Shea wrote:
>
> > Hi Oliver,
> >
> > This is offline.
> >
> > I am not sure I understand your question.
> >
> > http://www.ncl.ucar.edu/Applications/index.shtml
> > Under Models", Click "CCSM: POP"
> >
> > The POP model has an offset pole.
> >
> > To plot a variable "t" you must associate the 2D lat/lon
> > with the variable via the reserved attributed "lat2d"
> > and "lon2d":
> >
> > lat2d = f->TLAT
> > lon2d = f->TLONG
> > t_at_lon2d = lon2d
> > t_at_lat2d = lat2d
> > ---
> > As as far as plotting "country outlines", this is
> > independent of the contouring.
> >
> > I am cc'ing Mary and Dave .... they know more about this than I do.
> >
> > Regards
> > D
> >
> >
> > Oliver.Fuhrer_at_meteoswiss.ch wrote:
> >> Hi ncl-talk,
> >> Our model (COSMO) has a native grid of rotated lat/lon
> >> coordinates with the north pole shifted to a new location. If I
> >> understand the logic behind native grid drawing in NCL correctly,
> >> it is not possible to draw country outlines etc. for a non-
> >> transformed data representation. In order to do that, NCL would
> >> have to know the rotated lat/lon projection, be set to the same
> >> parameters as our model, have the tfDoNDCOverlay set to True.
> >> Is my understanding of this correct?
> >> Is there any other way to convince NCL to draw country outlines
> >> correctly over a non-transformed (native grid) representation of
> >> our model output?
> >> Are there any plans to implement the rotated lat/lon coordinates
> >> in NCL?
> >> Thanks for your help,
> >> Oliver
> >> ________________________________________
> >> Oliver Fuhrer
> >> Numerical Models
> >> Federal Departement of Home Affairs FDHA
> >> Federal Office of Meteorology and Climatology MeteoSwiss
> >> Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland
> >> Tel. +41 44 256 93 59
> >> Fax +41 44 256 92 78
> >> oliver.fuhrer_at_meteoswiss.ch
> >> www.meteoswiss.ch - First-hand information
> >>
> >>
> ---------------------------------------------------------------------
> >> ---
> >> _______________________________________________
> >> ncl-talk mailing list
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

it_works.png
Received on Fri Jan 09 2009 - 01:45:11 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 12 2009 - 16:21:33 MST