Re: native mercator projection

From: Seth McGinnis <mcginnis_at_nyahnyahspammersnyahnyah>
Date: Fri, 03 Oct 2008 16:58:15 -0600

>I have some old PyNGL code that displays Spherical grids and it works great. I want to now display native mercator and eventually Lambert grids.

I don't know how a native mercator grid works, but for Lambert grids, here's the chunk of (NCL) code I use to define the map projection. ("proj" is a variable from my NetCDF file that holds the projection information.)

      res_at_mpProjection = "LambertConformal"
      res_at_mpLambertMeridianF = proj_at_longitude_of_central_meridian
      res_at_mpLambertParallel1F = proj_at_standard_parallel(0)
      res_at_mpLambertParallel2F = proj_at_standard_parallel(1)
      res_at_tfDoNDCOverlay = True ;; Lambert Conformal generally needs this

For all the other projections I've worked with (polar stereographic, transverse mercator, and rotated pole), you just have to set the "mpCenterLatF" and "mpCenterLonF" attributes. So if lat looks correct but lon is off, my guess would be that you need to set resources.mpCenterLonF to something non-default.

Cheers,

Seth McGinnis
Associate Scientist
ISSE / NCAR
_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri Oct 03 2008 - 16:58:15 MDT

This archive was generated by hypermail 2.2.0 : Tue Oct 07 2008 - 09:10:08 MDT