<div dir="ltr">Hi Brock,<div><br></div><div>The error is occurring in your call to wrf_map_overlays. The reason is because your data is different from what it would be in actual WRF output. The XLAT variable is a 3D variable in a WRF file (Time, south_north, west_east) and only a 2D variable in your data, which is why you're seeing that subscripting error (and causing everything else to crash). The bottom line is that your data set has changed so much from what it is in WRF that the 'wrf_*' routines are going to have problems. </div><div><br></div><div>However, it looks like your script made it all the way to the bottom, so you should just need to change the wrf_map_overlays call to instead do it the traditional NCL way (wrf_map_overlays is a wrapper around the typical NCL drawing routines). Here is a link to the overlay examples: </div><div><br></div><div><a href="https://www.ncl.ucar.edu/Applications/overlay.shtml">https://www.ncl.ucar.edu/Applications/overlay.shtml</a></div><div><br></div><div>Give it a good try, and if you're still having problems with the plotting, send another reply to this thread.</div><div><br></div><div>Hope this helps,</div><div><br></div><div>Bill</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 30, 2018 at 11:44 PM Brock Tropea <<a href="mailto:brockt.1337@gmail.com">brockt.1337@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div><div><div>Hello,<br><br></div>I'm a grad student, attempting to do some work with the NCAR WRF CONUS simulations: <br><a href="https://rda.ucar.edu/datasets/ds612.0/#access" target="_blank">https://rda.ucar.edu/datasets/ds612.0/#access</a><br><br></div><div>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.<br></div><div><br></div>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.<br><br></div><div>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.</div><div>I was looking through some of the examples, particularly "<a href="http://www.ncl.ucar.edu/Applications/Scripts/wrf_nogsn_6.ncl" target="_blank">wrf_nogsn_6.ncl</a>" upon Mary's recommendation:</div><div><a href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml" target="_blank">http://www.ncl.ucar.edu/Applications/wrfgsn.shtml</a></div><div><br></div><div>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").<br><br></div><div><br></div><div>Anyway, I've tried playing with modified versions of wrf_nogsn_6.ncl for a week or so now, with zero luck. <b>My suspected issues</b>:<br><br><u><b>1.</b></u> I'm only referencing a single input file, a, which in my case has only the U component. <br></div><div><br></div><div><u><b>2.</b></u>
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<font size="2">", but it didn't seem to help. This is likely due to problem #1.<br></font></div><div><font size="2"><br></font></div><div><font size="2"><u><b>3.</b></u> After I used the unstagger command, I get the following error:<br>"[umtropea@tatanka NCL]$ ncl wrf_windtest3.ncl<br> Copyright (C) 1995-2017 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.4.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>fatal:Number of subscripts do not match number of dimensions of variable, (3) subscripts used, (2) subscripts expected<br>fatal:["Execute.c":6381]:variable (XLAT) is not in file (in_file)<br>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<br><br>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<br><br>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<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 53 in file wrf_windtest3.ncl"</font></div><div><font size="2"><br></font></div><div>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.<br></div><div><br><br><br></div><div>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.<br></div><div><br></div><div>
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.
<br></div><div><br></div><div>Any and all help would be incredibly appreciated. Sorry for the lengthy email, and I apologize if this is trivial.<br></div><div><br><br><br></div><div>Cheers</div>
<br></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>