<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Brock,<div><br></div><div>The 'wrf_*' routines were designed around the output from the WRF-ARW model. Once variables have been stripped out, etc., it's probably best to just use the regular NCL routines. You can always look at $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl to see what variables are needed, and then run the computation yourself. The good news is that it looks like your script made it all the way down to the plotting before it ran in to a problem. The error is complaining about this line:</div><div><br></div><div>





<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">plot = wrf_map_overlays(<span class="gmail-s1" style="text-decoration-line:underline">terfile</span>,<span class="gmail-s1" style="text-decoration-line:underline">wks</span>,(/contour/),<span class="gmail-s1" style="text-decoration-line:underline">pltres</span>,<span class="gmail-s1" style="text-decoration-line:underline">mpres</span>)</blockquote><div><br></div><div>The WRF plotting routines aren't needed to make a plot. They're just wrappers around the usual gsn_csm NCL plotting routines that make a fixed size image with some extra labels. Most of the time, you'll want to customize the plot yourself, and we'd be steering you back to the gsn_csm routines anyhow. </div></div><div><br></div><div>Here's the documentation for doing overlays:</div><div><br></div><div><a href="https://www.ncl.ucar.edu/Applications/overlay.shtml">https://www.ncl.ucar.edu/Applications/overlay.shtml</a><br></div><div><br></div><div>Here is the documentation that talks about plotting native grids/map projections:</div><div><br></div><div><a href="https://www.ncl.ucar.edu/Applications/native.shtml">https://www.ncl.ucar.edu/Applications/native.shtml</a><br></div><div><br></div><div>Give it a good try and let us know if you have problems.</div><div><br></div><div>Regards,</div><div><br></div><div>Bill</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 12, 2018 at 2:01 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 dir="ltr"><div dir="ltr"><div>Hi there,<br><br></div><div>A little context is required. Working with this dataset:<br><a href="https://rda.ucar.edu/datasets/ds612.0/#access" target="_blank">https://rda.ucar.edu/datasets/ds612.0/#access</a><br></div><div>The output is not standard WRF (where all variables are in a single NetCDF file for an hour), rather each variable gets its own NetCDF file. In this case, the data is every 3 hours for 1 day (8 timesteps per file/24 hours/1 day). This has caused me nothing but headaches with NCL, however I managed to fiddle with some sample scripts to make them work, somewhat.<br><br></div><div>I have a semi-functional program that is looking at a vertical cross section of temperature (as a filled contour) and U component wind as vectors. I found a script online that someone made for a similar purpose, and have modified it to make it work with my data (somewhat).<br></div><div><br></div><div>The problem I'm now having is that NCL doesn't seem to see a variable within one of the files. The section of code in question is intended to plot a line across a map 
of the WRF terrain field, to show where the subsequent cross section is.
 If I remove the block of code from the program, it works, and it 
generates the attached image.</div><div>Specifically, NCL fails when it tries to locate "XLAT" within the "terfile", which is a constants file that holds the terrain data. However the variable is there, I have checked with ncl_filedump. <br><br>What I THINK it is having an issue with is the fact that within that file, the XLAT variable is only 2 dimensional. It only has spatial dims, no time dim. wrf_user_getvar has 3 inputs, with the last one being the time. I have tried putting in 0, -1, and nothing and none of them work. I have tried using the XLAT from another file(ie:tkfile) which is also 2D, but that doesn't help. Exact error is:</div><div><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 $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4223 in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4306 in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 290 in file vertcrossvectortest2.ncl<br><br>[umtropea@tatanka vertical_cross]$ "<br><br></div><div>Is there any way to tweak this to get it working?<br><br></div><div>Keep in mind this is a WIP and I haven't gotten the A to B aspect working just yet, among other things. I'd like to focus on the error at hand.<br></div><div><br></div><div>I've attached the script file, image of the plot generated when I remove the broken portion, and the filedump of XLAT as text.<br></div><div>I'm running on CentOS 6.8, NCL version 6.4.0.<br></div><div><br></div><div>Apologies for the long message, wanted to be specific.<br><br><br><br></div><div>Thanks to anyone who might have some insight on this.<br></div><div><br></div></div></div></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>