native mercator projection still having problems.

From: Ertl, John C CIV 63134 <john.ertl_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Oct 2008 15:34:07 -0700

Classification: UNCLASSIFIED
Caveat (s): FOUO


Thanks for the help...The mercator projection looks to still have big problems but I was able to make a good step forward on the Lambert Conformal.

I think it is plotting the data correctly but the map is very wrong. It looks to be showing the entire northern hemisphere map (in a Lambert conformal plot) but the data is only for a portion of the east pacific. What are you using for plotting the map on top of the data?

Thanks for you help.

John Ertl

7 Grace Hopper Ave.
Monterey, CA 93943
(831) 656-5704

Classification: UNCLASSIFIED
Caveat (s): FOUO

From: Seth McGinnis
Sent: Fri 10/3/2008 3:58 PM
To: Ertl, John C CIV 63134;
Subject: Re: native mercator projection

>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.


Seth McGinnis
Associate Scientist

pyngl-talk mailing list
Received on Mon Oct 06 2008 - 16:34:07 MDT

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