[ncl-talk] wrf domain location
Matt Masarik
mattmasarik at boisestate.edu
Tue Feb 14 11:33:20 MST 2017
Hi Mary,
thanks for working on this and sending editted scripts. I used the scripts
and got correct output from each. User error was probably my issue...
I also appreciate the tip on plotting the XLAT/XLONG as dots, haven't done
that before..
Thanks again!
Cheers,
Matt
On Mon, Feb 13, 2017 at 9:45 AM, Mary Haley <haley at ucar.edu> wrote:
> 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/20170214/e8232432/attachment.html
More information about the ncl-talk
mailing list