[ncl-talk] wrf domain location
Mary Haley
haley at ucar.edu
Mon Feb 13 09:45:36 MST 2017
Matt,
NCL is plotting this data correctly as far as I can tell.
When I'm debugging a WRF plot, I usually like to plot the HGT variable,
because then I can usually tell if the map projection is correct. I also
like to plot the lat/lon locations (from XLAT and XLONG on the file) as
filled dots on the plot, so I can see where the actual plot area is.
I took your script and modified it to do both a native filled contour/map
(calling wrf_map_resources) and a non native filled contour/map (using
XLAT/XLONG read off the file).
Both plots indicate that this data is indeed over the eastern part of the
U.S. See attached modified scripts and PNGs.
--Mary
On Tue, Feb 7, 2017 at 4:41 PM, Matt Masarik <mattmasarik at boisestate.edu>
wrote:
> ps, I'm working on Yellowstone using the following modules;
>
> ncarenv/1.0
> ncarbinlibs/1.1
> intel/12.1.5
> ncarcompilers/1.0
> netcdf/4.3.0
> ncl/6.3.0
>
>
> On Tue, Feb 7, 2017 at 4:34 PM, Matt Masarik <mattmasarik at boisestate.edu>
> wrote:
>
>> I tried plotting some WRF data today with an NCL script that has worked
>> correctly previously, and found that the location of the domain is
>> incorrect. The domain should be centered over / containing Idaho (verified
>> with ncview), but the output from the ncl script shows the domain located
>> over Florida, containing the SE US (attached).
>>
>> Here's the (editted) script:
>> ------------------------------------------------------------
>> ----------------------------------------------
>>
>> ;----------------------------------------------------------------------
>> ; wrf_gsn_6.ncl
>> ;----------------------------------------------------------------------
>> ; Concepts illustrated:
>> ; - Using gsn_csm scripts to plot WRF-ARW data
>> ; - Overlaying filled contours, and vectors on a map
>> ; - Setting the correct WRF map projection using wrf_map_resources
>> ; - Setting lots of resources to customize a WRF plot
>> ;----------------------------------------------------------------------
>> ; This script is meant to show the difference between plotting WRF
>> ; data using wrf_xxx scripts, and using gsn_csm_xxx scripts.
>> ;----------------------------------------------------------------------
>> ; You can safely ignore these warning messages:
>> ;
>> ; warning:start_lat is not a valid resource in wrf_gsn_contour at this time
>> ; warning:start_lon is not a valid resource in wrf_gsn_contour at this time
>> ; warning:end_lat is not a valid resource in wrf_gsn_contour at this time
>> ; warning:end_lon is not a valid resource in wrf_gsn_contour at this time
>> ; warning:mpNestTime is not a valid resource in map at this time
>> ;----------------------------------------------------------------------
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>>
>>
>> begin
>>
>> ;---Parameters
>> input_file = "wrfout_d01_2015-02-05_00:00:00.nc"
>> input_dir = "/glade/u/home/mmasarik/WRF-NCL/input"
>> input_path = input_dir + "/" + input_file
>>
>> plot_name = "streamlines_station-points"
>>
>>
>>
>> ;---Open WRF output file
>> a = addfile(input_path,"r")
>>
>>
>> ;--Create Workstation
>> wks = gsn_open_wks("png","wrf_map")
>>
>>
>> ;--Start resources
>> res = True
>> res at gsnFrame = False
>> res at gsnDraw = False
>> res at gsnLeftString = ""
>> res at gsnRightString = ""
>> res at tfDoNDCOverlay = True ; necesssary
>>
>>
>> ;---Map plot
>> map_res = res
>> map_res = wrf_map_resources(a,map_res)
>> map_res at gsnFrame = False
>> map_res at gsnDraw = False
>> map_res at gsnStringFontHeightF = 0.015
>> map_res at tiMainJust = "CenterLeft"
>> map_res at tiMainPosition = "Left"
>> map_res at tiMainOffsetYF = -0.01
>>
>>
>> ;---Set map resources based on projection on WRF output file
>> map_res at mpFillOn = False
>> map_res at mpOutlineOn = True
>> map_res at mpDataBaseVersion = "MediumRes"
>> map_res at mpOutlineDrawOrder = "PostDraw"
>> map_res at mpUSStateLineColor = "Black"
>> map_res at mpPerimLineColor = "Black"
>> map_res at mpNationalLineColor = "Black"
>> map_res at mpLimbLineColor = "Black"
>> map_res at mpGridLineColor = "Black"
>> map_res at mpGeophysicalLineColor = "Black"
>> map_res at mpUSStateLineThicknessF = 3.0
>> map_res at mpNationalLineThicknessF = 3.0
>> map_res at mpGeophysicalLineThicknessF = 3.0
>>
>> map = gsn_csm_map(wks,map_res)
>>
>>
>>
>> ;---Overlay plots on map and draw.
>> draw(map)
>> frame(wks)
>>
>>
>> end
>>
>> ----------------------------------------------------------------------------------------------------------
>>
>>
>> The only warnings I get are the one's mentioned above in the script.
>> What am I doing wrong here?
>>
>> Thanks!
>>
>> matt
>>
>>
>>
>
> _______________________________________________
> 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/20170213/a31e1566/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_map_nonnative.000002.png
Type: image/png
Size: 352412 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0004.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_map_native.000002.png
Type: image/png
Size: 316769 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0005.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_map_nonnative.000001.png
Type: image/png
Size: 184849 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0006.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_map_native.000001.png
Type: image/png
Size: 217156 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0007.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrfplot_latlon_native.ncl
Type: application/octet-stream
Size: 3520 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrfplot_latlon_nonnative.ncl
Type: application/octet-stream
Size: 3530 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170213/a31e1566/attachment-0003.obj
More information about the ncl-talk
mailing list