[ncarg-talk] Plotting 2D surface wind field

Brock Tropea brockt.1337 at gmail.com
Fri Jul 20 15:34:34 MDT 2018


Hello,

I'm a grad student, attempting to plot some WRF 2D (surface) wind
barbs/vectors, using the NCAR RDA CONUS dataset.
https://rda.ucar.edu/datasets/ds612.0/#access

I have had multiple issues in doing this, though, to which I've tried a few
solutions. I'm really kind of at a loss, so coming here is my last resort.
Not even sure if this is the right email to be contacting.

The problem seems to stem from the fact that the WRF CONUS data is not
organized like typical WRF output. The 2D variables are all their own
separate netCDF file, lumped into 3 month periods. So for example, I have a
"U" file and a "V" file for October 1, 2012 to December 31, 2012.

Using ncl filedump shows the "U" variable (in this example), and all the
associated coordinate variables (ie: XLON, XLAT, etc); I've attached these
as screenshots. There's also a constants file on the archive which I think
shares some redundancy with these.

The error that I end up with when trying to plot barbs using
*gsn_csm_vector_map* is:

"(0)    check_for_y_lat_coord: Warning: Data either does not contain
(0)    a valid latitude coordinate array or doesn't contain one at all.
(0)    A valid latitude coordinate array should have a 'units'
(0)    attribute equal to one of the following values:
(0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)    check_for_lon_coord: Warning: Data either does not contain
(0)    a valid longitude coordinate array or doesn't contain one at all.
(0)    A valid longitude coordinate array should have a 'units'
(0)    attribute equal to one of the following values:
(0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
fatal:VectorFieldInitialize: dimensions of vfUDataArray and vfVDataArray
are inconsistent
fatal:Unable to initialize layer-Can't Create
fatal:Unable to access object with id:-4
fatal:Unable to access object with id:-4
warning:Unable to add DataItem "(null)" to DataList "vcVectorFieldData"
fatal:CompileDataList:DataList has no valid members
fatal:PID #-4 can't be found in NhlSetValues"

Which basically says that it doesn't know what coordinates to use, which I
suspect is because the lat/lon are stored in a separate variable.


I tried to use *wrf_vector*, and it now has an issue with the dimensions:

fatal:VectorFieldInitialize: dimensions of vfUDataArray and vfVDataArray
are inconsistent
fatal:Unable to initialize layer-Can't Create
fatal:Unable to access object with id:-4
fatal:Unable to access object with id:-4
warning:Unable to add DataItem "(null)" to DataList "vcVectorFieldData"
fatal:CompileDataList:DataList has no valid members

The dimensions are the same in both files, however in the U file, the
East-West says "stag" (staggered, I'm guessing), while in the V file,
North-South is stag. I don't know if that makes a difference, but the
actual numbers are the same.

So this mostly strikes me as an excercise in getting these plotting
routines to recognize the coordinate variables that are attendant to the
wind variable within the netCDF file. How could I go about doing this?

If it helps, I'm running NCL 6.4.0 on CentOS 64 bit v6.8.


I've attached screenshots of the filedump for the "U" netCDF file and my
two little test scripts.


I apologize for the lengthy email, and/or if this is trivial, I'm not
particularly good at this. Any and all help is appreciated.



Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 1.png
Type: image/png
Size: 157907 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 2.png
Type: image/png
Size: 159114 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 3.png
Type: image/png
Size: 175846 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 4.png
Type: image/png
Size: 171151 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 5.png
Type: image/png
Size: 182216 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 6.png
Type: image/png
Size: 180978 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen 7.png
Type: image/png
Size: 30382 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrf_vector.ncl
Type: application/octet-stream
Size: 632 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ncl_windbarbtest.ncl
Type: application/octet-stream
Size: 1904 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180720/51b947f2/attachment-0003.obj>


More information about the ncarg-talk mailing list