<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">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>