[ncl-talk] lat,lon not accurately generated by NCL

Craig Mattocks mattocks at mac.com
Thu Aug 2 12:32:02 MDT 2018


Hi Guoqing,

Are you talking about this sort of difference (using a Lambert CONUS 2.5 km grid)?

Location: Cape Hatteras, NC
lon = -75.528824
lat =  35.250538

alias mm5="proj +proj=lcc +lat_1=25 +lat_2=25 +lat_0=25 +lon_0=-95 +a=6370 +b=6370 +towgs84=0,0,0 +no_defs -f %.6f"

mm5 << EOF
-75.528824 35.250538
EOF

alias ndfd="proj +proj=lcc +lat_1=25 +lat_2=25 +lat_0=25 +lon_0=-95 +x_0=0 +y_0=0 +a=6371.229 +b=6371.229 +no_defs -f %.6f"

ndfd << EOF
-75.528824 35.250538
EOF

Results (km):
x = 1791.188308   MM5/WRF spheroid, r = 6370000 m
y = 1274.741690

x = 1791.533892   NDFD grib octet 3.15 = 6 spheroid, r = 6371229 m
y = 1274.987633

Difference = 0.424165 km or 424.165 m

Craig

P.S. I recently learned that you have to use cs2cs, instead of proj, when converting between different datums (not relevant in this case).

> On Wed, 1 Aug 2018 13:57:55 -0600 Guoqing Ge - NOAA Affiliate <guoqing.ge at noaa.gov> wrote:
> 
> We have a similar issue when using wgrib2 to read HRRR grib files. In this
> situation, we have identified these inaccurate lat-lon values are due to
> the use of different earth radius by WRF/geogrid.exe and wgrib2
> respectively. Explicitly specify the geogrid-used earth radius (instead of
> the default one) in the command line option, wgrib2 can reproduce the
> original lat-lon values.  Based on similarity, we guess NCL should have the
> same problem.
> 
> Is there an option to specify earth radius in NCL when reading GRIB files?
> 
> Thanks,
> 
> Guoqing


More information about the ncl-talk mailing list