Re: lat/lon to lambert outside of NCL (Jamie Lahowetz)

From: Lin,Jin-Sheng <jlin_at_nyahnyahspammersnyahnyah>
Date: Thu, 12 Feb 2009 08:43:11 -0500

Jamie,
 
     I will have to do some search to see what the parameter conv is
for. However, I don't think it is the distance between grids. One of
the problems with map projection is that terminology is called
differently in different fields, it can get very confusing. For
instance, in the example in your e-mail, you have "lat of 1", "long of
1", "book results" or "subbounds." I don't have a slightest idea what
they are.
 
    Let's start from scratch and try this. You tell me what conversion
you would like to make and provide me with data and projection
information (projection centers, true latitudes, etc), and I will see
what I can do. This way we know we start with the same footing.
 
Jin
 
 

Jin-Sheng Lin
Regional Air Quality Modeler
Virginia Department of Environmental Quality
Air Division
629 East Main Street, 8th Floor
Richmond, VA 23219
tel: (804)698-4412
e-mail: jlin_at_deq.virginia.gov

 

  _____

From: deadpickle_at_gmail.com [mailto:deadpickle_at_gmail.com] On Behalf Of
Jamie Lahowetz
Sent: Wednesday, February 11, 2009 11:32 PM
To: Lin,Jin-Sheng
Cc: ncl-talk_at_ucar.edu
Subject: Re: lat/lon to lambert outside of NCL (Jamie Lahowetz)

Thanks for your response. I do have a few questions about the code.

what is the variable conv for? Is it the distance between grids?
I changed it around for F90 and I get NaN for the lats. The grib data
reports two 'true lats' but they are both the same. This could be the
reason why I get a NaN (division be zero maybe) How do you handle these
situations?

I have been messing with the w3fb12 included in the w3lib supplied (kind
of) by NCEP. It does well on lat/lon 2 lambert but is aweful the other
way. I also tried an equation I found in "map Projections - A Working
Manual". Results as such:

lat of 1 = 1.0
lon of 1 = -145.0
lon of orientation = -107.0
lat secant1 = 50.0
lat secant2 = 50.0
spacing = 32463 meters

subbounds within this domain: 43.5 39.0 -99.0 -93.5

NCL grid # for bounds(respectively):124 106 196 208
Book results: 119 117 187 208

One out of 4 is.... bad. I do admit that it could be me of course, I'm
only human. I do ask anyone who have a conversion script (any language
not just fortran) to try out these numbers and see what you get. I'm
very curious If there are any scripts out there that work better. Thanks
before hand, this forum is always helpful.

On Wed, Feb 11, 2009 at 1:57 PM, Lin,Jin-Sheng <jlin_at_deq.virginia.gov>
wrote:

        Jamie,
         
             I have attached in this e-mail a fortran program we
frequently use to convert different coordinate systems. There are two
subroutines in the program: one is for UTM and lat/long conversion, and
the other for Lambert and lat/long conversion. You only need the second
subroutine to do what you described.
         
        Jin
         
         
         
        Jin-Sheng Lin
        Regional Air Quality Modeler
        Virginia Department of Environmental Quality
        Air Division
        629 East Main Street, 8th Floor
        Richmond, VA 23219
        tel: (804)698-4412
        e-mail: jlin_at_deq.virginia.gov
        
        
        
         

-- 
Jamie Ryan Lahowetz
University of Nebraska - Lincoln
Graduate Student - Geosciences
402.304.0766
jrl9262_at_huskers.unl.edu

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 12 2009 - 06:43:11 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 05 2009 - 15:48:48 MST