[ncl-talk] Plotting 2D (surface) WRF Wind Data

Brock Tropea brockt.1337 at gmail.com
Mon Jul 30 23:44:12 MDT 2018


 Hello,

I'm a grad student, attempting to do some work with the NCAR WRF CONUS
simulations:
https://rda.ucar.edu/datasets/ds612.0/#access

Currently, I'm just trying to look at the surface wind field (ie: the 2D U
and V field), as either a vector or wind barb map. I've already tried to do
this in python, which I cannot get working, so I've given up on that for
the moment. Was hoping NCL might be able to handle it easier.

This dataset has given me nothing but headaches from day 1, because the WRF
output is not organized like normal WRF output. Rather than a single file
for a day or an hour, with all variables in it, there are individual NetCDF
files for each variable (organized into 3 month chunks). At least, that's
my understanding of how "normal" WRF output works.

This is mostly a problem for wind data, because the U and V components are
their own NetCDF files; all of the plotting routines I've seen in NCL for
wind plots seem to depend on there being a single input file.
I was looking through some of the examples, particularly "wrf_nogsn_6.ncl
<http://www.ncl.ucar.edu/Applications/Scripts/wrf_nogsn_6.ncl>" upon Mary's
recommendation:
http://www.ncl.ucar.edu/Applications/wrfgsn.shtml

There, you can see this issue in action. Both "wrf_vector" and
"wrf_map_overlays" only accept a single input file? (in this case, "a").


Anyway, I've tried playing with modified versions of wrf_nogsn_6.ncl for a
week or so now, with zero luck. *My suspected issues*:

*1.* I'm only referencing a single input file, a, which in my case has only
the U component.

*2.* The U and V winds are staggered in the west_east and north_south
dimensions, respectively; they need to be unstaggered, so that they line up
with the mass points. I used "wrf_user_unstagger", but it didn't seem to
help. This is likely due to problem #1.

*3.* After I used the unstagger command, I get the following error:
"[umtropea at tatanka NCL]$ ncl wrf_windtest3.ncl
 Copyright (C) 1995-2017 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.4.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:Number of subscripts do not match number of dimensions of variable,
(3) subscripts used, (2) subscripts expected
fatal:["Execute.c":6381]:variable (XLAT) is not in file (in_file)
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4122 in
file /global/software/ncl-6.4.0-Prebuild/lib/ncarg/nclscripts/
wrf/WRFUserARW.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4223 in
file /global/software/ncl-6.4.0-Prebuild/lib/ncarg/nclscripts/
wrf/WRFUserARW.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4306 in
file /global/software/ncl-6.4.0-Prebuild/lib/ncarg/nclscripts/
wrf/WRFUserARW.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 53 in file
wrf_windtest3.ncl"

Several things jump out here. Firstly, it's talking about subscripting,
which is confusing because I have no subscripting in the ncl file that
generates this error. Second, it is looking for the "XLAT" variable, which
it cannot find. This is strange, because XLAT is in the file. I've checked
with filedump. See the attached screenshot.



So I'm kind of at a loss as to what to do here, so I come here as a last
resort. I've attached the script I'm using at the moment, as well as a
screenshot of ncl_filedump's proof of U and XLAT existing in the "U" NetCDF
file.

I can't attach any of the data file's I'm using, as they're huge, but they
are available at the link at the start of this message. I'm using NCL 6.4.0
on CentOS 64 bit v6.8.

Any and all help would be incredibly appreciated. Sorry for the lengthy
email, and I apologize if this is trivial.



Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180731/4820d82a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_windtest3.ncl
Type: application/octet-stream
Size: 2108 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180731/4820d82a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XLAT.png
Type: image/png
Size: 70204 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180731/4820d82a/attachment.png>


More information about the ncl-talk mailing list