[ncl-talk] lat,lon not accurately generated by NCL
Guoqing Ge - NOAA Affiliate
guoqing.ge at noaa.gov
Mon Jul 30 14:21:03 MDT 2018
Thanks, Dave! This really helps.
Guoqing
--
Guoqing Ge, PhD
CIRES Research Scientist
at NOAA/ESRL/GSD (Rm 2B502)
325 Broadway, Boulder, CO 80305
(303)497-4163
&
Thursdays at
Developmental Testbed Center (FL3-1039)
3450 Mitchell Ln, Boulder, CO 80301
(303)497-8445
On Mon, Jul 30, 2018 at 2:06 PM, Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:
> Guoqing,
>
> This is a known problem. For all but the simplest projections, it is
> difficult to regenerate exact coordinates from projection parameters. To
> make things worse, some projection parameters are stored imprecisely in
> Grib1 format, even for simple linear 1-D coordinates. We ran into this a
> couple years ago, with ERA-Interim Gaussian grids.
>
> If you need exact coordinates for complicated projections, then best
> practice is to not depend at all on regenerated coordinates. Instead, get
> reference files with exact original coordinate grids from the data source,
> and use these original coordinates in your applications.
>
> Optionally you can double check your reference files against regenerated
> coordinates, and investigate if maximum offset is more than a few percent
> of a grid cell.
>
> --Dave A.
> NOAA/OAR/ESRL/PSD/CIRES
>
>
> On Mon, Jul 30, 2018 at 12:32 PM, Guoqing Ge - NOAA Affiliate <
> guoqing.ge at noaa.gov> wrote:
>
>> Dear NCL talk,
>>
>> Recently, I found an issue on the generation of grid meshes using a
>> prescribed map projection information. The detail of the problem is as
>> follows:
>>
>> When I read HRRR grib files to generate plots, I get lat,lon information
>> form these two NCL-provided variables:
>> mylat = t_file->*gridlat_0*
>> mylon = t_file->*gridlon_0*
>>
>> The variable summary is as follows:
>>
>> *Variable: mylat*
>> *Type: float*
>> *Total Size: 7620564 bytes*
>> * 1905141 values*
>> *Number of Dimensions: 2*
>> *Dimensions and sizes: [ygrid_0 | 1059] x [xgrid_0 | 1799]*
>> *Coordinates:*
>> *Number Of Attributes: 11*
>> * corners : ( 21.13812, 21.14055, 47.84219, 47.83862 )*
>> * long_name : latitude*
>> * grid_type : Lambert Conformal (secant, tangent, conical or bipolar)*
>> * units : degrees_north*
>> * Latin2 : 38.5*
>> * Latin1 : 38.5*
>> * Dy : 3*
>> * Dx : 3*
>> * Lov : 262.5*
>> * Lo1 : 237.2805*
>> * La1 : 21.13812*
>>
>> As show above, the variable contains the prescribed HRRR model map
>> projection information. I believe this information is used by NCL
>> internally to generate lat,lon values.
>>
>> The problem is that these re-generated lat,lon values are not consistent
>> with the original HRRR model lat,lon values.
>> I printed out lat,lon values for the botten-left corner, center and its
>> surrounding four points, and the upper-right corner as below:
>>
>> *For original HRRR lat,lon values:*
>> (1,1): 21.13812, -122.7195
>> c_left: 38.49999,-97.53448
>> center: 38.5, -97.5
>> c_right: 38.49999,-97.46552
>>
>> c_down: 38.47303, -97.5
>> center: 38.5, -97.5
>> c_up: 38.52699, -97.5
>>
>> (nx,ny): 47.84364, -60.90137
>>
>> *For NCL re-genrated lat,lon values based on prescribed HRRR map
>> projection info:*
>> (1,1) : 21.13812, -122.7195
>>
>> c_left: 38.49724, -97.54045
>> center: 38.49725, -97.50597
>> c_right: 38.49724, -97.4715
>>
>> c_down: 38.47027, -97.50597
>> center: 38.49725, -97.50597
>> c_up: 38.52422, -97.50598
>>
>> (nx,ny): 47.84219, -60.91719
>>
>> You can see that for the original HRRR lat,lon mesh, the center is
>> exactly (38.5, -97.5) as defined by the map projection info, while the NCL
>> re-gererated lat,lon mesh is *not* so. Except the bottom-left point, all
>> other lat,lon values from NCL shift from the original HRRR values.
>>
>> This NCL behavior caused a slight shift in my physical variable plots
>> (based on GRIB files) as compared to original ones. Could you advise me how
>> NCL generate these lat,lon values? Can you help me examine and fix this
>> issue?
>>
>> Let me know if you need more information.
>>
>> Thanks,
>>
>> Guoqing
>>
>> --
>> Guoqing Ge, PhD
>> CIRES Research Scientist
>> at NOAA/ESRL/GSD (Rm 2B502)
>> 325 Broadway, Boulder, CO 80305
>> <https://maps.google.com/?q=325+Broadway,+Boulder,%C2%A0CO+80305&entry=gmail&source=g>
>> (303)497-4163
>> &
>> Thursdays at
>> Developmental Testbed Center (FL3-1039)
>> 3450 Mitchell Ln, Boulder, CO 80301
>> <https://maps.google.com/?q=3450+Mitchell+Ln,+Boulder,+CO+80301&entry=gmail&source=g>
>> (303)497-8445
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180730/162d85ee/attachment.html>
More information about the ncl-talk
mailing list