[ncl-talk] limit map region for Lambert Conformal projection
Dennis Shea
shea at ucar.edu
Tue Jan 28 13:16:14 MST 2020
It is the user's responsibility to look at the file being used.
---
WRF files are (generally) netCDF.
NARR files are GRIB files.
Different information is available for each:
---
%> *ncl_filedump* merged_AWIP32.1979010100.3D.NARR.*grb*
provides the following information for the GRIB file variables
[SNIP]
float gridlat_221 ( gridx_221, gridy_221 )
corners : ( 1, 0.8972797, 46.35283, 46.63458 )
long_name : latitude
grid_description : AWIPS - Regional - NOAMHI - High Resolution
North American Master Grid (Lambert Conformal)
units : degrees_north
* mpLambertMeridianF : 253 mpLambertParallel2F : 50
mpLambertParallel1F : 50 mpProjection : LAMBERTCONFORMAL*
Dy : 32463.41
Dx : 32463.41
Lov : 253
Lo1 : 214.5
La1 : 1
=====================================
This information is *NOT* available on the WRF file.
Please examine the WRF file's global attributes:
%> ncdump -h wrfout...
or
%> ncl_filedump wrfout ...
Maybe something like:
[SNIP]
:CEN_LAT = 43.99802f ;
:CEN_LON = -98.f ;
:TRUELAT1 = 30.f ;
:TRUELAT2 = 60.f ;[SNIP]
[SNIP]
wrf = addfile("wrf...nc","r")
...
Something like:
res at mpLambertParallel1F = fwrf->TRUELAT1
res at mpLambertParallel2F = fwrf->TRUELAT2
res at mpLambertMeridianF = fwrf->CEN_LON
On Tue, Jan 28, 2020 at 9:13 AM Zhifeng Yang <yangzf01 at gmail.com> wrote:
> Hi Dennis,
> Thank you. I tried to add
> res at mpLimitMode = "Corners" ; choose range of map
> res at mpLeftCornerLatF = lat2d(0,0)
> res at mpLeftCornerLonF = lon2d(0,0)
> res at mpRightCornerLatF = lat2d(nlat-1,mlon-1)
> res at mpRightCornerLonF = lon2d(nlat-1,mlon-1)
> It can select map range. However, it seems that contour does not move
> along with map. So there is a shift between contour and map. Then I want to
> add
> res at mpProjection = "LambertConformal"
> res at mpLambertParallel1F = lat2d at mpLambertParallel1F
> res at mpLambertParallel2F = lat2d at mpLambertParallel2F
> res at mpLambertMeridianF = lat2d at mpLambertMeridianF
>
> The problem is there is no latitude attributes (mpLambertParallel1F,
> mpLambertParallel2F, mpLambertMeridianF) in wrfout files.
>
> Best,
> Zhifeng
>
> On Mon, Jan 27, 2020 at 6:06 PM Dennis Shea <shea at ucar.edu> wrote:
>
>> NARR are Lambert Conformat:
>>
>> *http://www.ncl.ucar.edu/Applications/narr.shtml*
>> <http://www.ncl.ucar.edu/Applications/narr.shtml>
>> ncl_3.ncl
>>
>> See plot section
>> ===
>> WRF projection information is contained within the file attributes
>>
>> fwrf = addfile("wrf...nc","r")
>> ...
>> Something like:
>>
>> res at mpLambertParallel1F = fwrf->Latin1
>> res at mpLambertParallel2F = fwrf->Latin2
>> res at mpLambertMeridianF = fwrf->LoV
>>
>> ========================================
>>
>> res at gsnAddCyclic = False ; regional data
>>
>> res at mpLimitMode = "Corners" ; choose range of map
>> res at mpLeftCornerLatF = lat2d(0,0)
>> res at mpLeftCornerLonF = lon2d(0,0)
>> res at mpRightCornerLatF = lat2d(nlat-1,mlon-1)
>> res at mpRightCornerLonF = lon2d(nlat-1,mlon-1)
>> res at tfDoNDCOverlay = True
>> res at mpProjection = "LambertConformal"
>> res at mpLambertParallel1F = lat2d at mpLambertParallel1F
>> res at mpLambertParallel2F = lat2d at mpLambertParallel2F
>> res at mpLambertMeridianF = lat2d at mpLambertMeridianF
>>
>>
>> On Mon, Jan 27, 2020 at 2:02 PM Zhifeng Yang via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> Hi all,
>>> I have WRF output files with Lambert Conformal projection. When I plot
>>> images with contour on maps, I tried to limit the plot over a specific
>>> region, not the whole domain. I tried the following
>>> res at mpLimitMode = "latlon"
>>> res at mpMinLatF = minlat
>>> res at mpMaxLatF = maxlat
>>> res at mpMinLonF = minlon
>>> res at mpMaxLonF = maxlon
>>>
>>> However, it seems it does not work. Do you have any ideas on it? Thank
>>> you!
>>>
>>> Best,
>>> Zhifeng
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200128/16367ed8/attachment.html>
More information about the ncl-talk
mailing list