Re: reprojecting Lambert Conformal WRF data

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 28 2011 - 14:57:26 MST

Hi Brian,

Apparently the w3fb11 routine only handles a subset of Lambert Conformal grids, those that have a single tangent latitude. There is another routine in the NCEP tool suite that is part of the
IPLIB package called GDSWZD03 that handles lambert conformal projections with 2 parallels. Unfortunately this routine is designed for reading GRIB files and contains an argument called KGDS that provides a series of integer parameters that are derived from reading a GRIB record. You can use this routine independently if you fill KGDS with the appropriate values. It can do forward or inverse projections. Just FYI, here is the code from GDSWZD03 that distinguishes between the single latitude and two latitude case:

        IF(RLATI1.EQ.RLATI2) THEN
          AN=SIN(H*RLATI1/DPR)
        ELSE
          AN=LOG(COS(RLATI1/DPR)/COS(RLATI2/DPR))/
     & LOG(TAN((H*90-RLATI1)/2/DPR)/TAN((H*90-RLATI2)/2/DPR))
        ENDIF

I take it that you are trying remap the data, not just visualize it. If you just want to visualize on a common projection that should be easy to do with NCL (except for the issue of getting the corner points if they are not given). Otherwise you may want to look into the PROJ.4 library. It can be used to convert from dx, dy in meters to lat/lon. The next version of NCL (due early 2012) will have more facilities for remapping data from one grid to another. I hope this is somewhat helpful.
 -dave

On Dec 28, 2011, at 1:06 PM, Bryan K Woods wrote:

> Hi all,
>
> My challenge of the day is reconciling NARR and WRF data that are given on different Lambert grids. I found a nice piece of Fortran code that allows me to transform NARR grib data to a Mercator grid by computing the i,j indices of a given lat/lon point. This code works perfectly.
>
> http://www.nco.ncep.noaa.gov/pmb/docs/libs/w3lib/w3fb11.html
>
> However, the required inputs for this function do not match up nicely to those provided in WRF NetCDF files. Note that only one tangent latitude is expected in the Fortran code, yet two are provided by WRF netCDF files. The NCL documentation hints at this problem:
> http://www.ncl.ucar.edu/Applications/lcnative.shtml
> " The problem with Lambert grids is they are are sometimes described by a meridian, parallel and a delta X and delta Y in meters at the intersection of the meridian and top parallel. It can be VERY difficult to come up with corner points when this method is used. "
>
> Can anyone pass along a tip or some code that might illuminate this issue? Would it be wrong to arbitrarily select one of the two tangent latitudes and pick the corner point from XLAT, XLONG?
>
> Thanks,
> Bryan
> _______________________________________________
> 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 Dec 28 14:57:36 2011

This archive was generated by hypermail 2.1.8 : Wed Jan 04 2012 - 10:18:09 MST