[ncarg-talk] Plotting 2D surface wind field

Mary Haley haley at ucar.edu
Mon Jul 23 13:58:36 MDT 2018


Hi Brock,

Nice to see you online!

This email is for NCAR Graphics users.

NCL questions should be posted to ncl-talk at ucar.edu.

You need to subscribe first:

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

For some examples on plotting WRF data, please see this page:

http://www.ncl.ucar.edu/Applications/wrfgsn.shtml

If you are reading U and V off the WRF file, you should use
wrf_user_getvar.  See example wrf_nogsn_6.ncl for a simple example of
plotting WRF data using wrf_vector.

If you continue to have questions, then please post any follow-ups to
ncl-talk.

Thanks,

--Mary


On Fri, Jul 20, 2018 at 3:34 PM, Brock Tropea <brockt.1337 at gmail.com> wrote:

> 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
>
> _______________________________________________
> ncarg-talk mailing list
> ncarg-talk at ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncarg-talk/attachments/20180723/19c31a7c/attachment.html>


More information about the ncarg-talk mailing list