[ncl-talk] error plotting NAM grib2 data

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Fri Nov 27 16:14:18 MST 2015


Andrew,

For 2-D coordinates, you can specify either the special data attributes
lat2d and lon2d, or the resource attributes sfXArray and sfYArray.  Please
see section 2 on this page.  There are several working examples listed:

http://www.ncl.ucar.edu/Document/Graphics/overlays_on_map.shtml

--Dave


On Fri, Nov 27, 2015 at 9:48 AM, Andrew Kren - NOAA Affiliate <
andrew.kren at noaa.gov> wrote:

> I am working to plot NAM grib2 output on a map. NAM is on a two
> dimensional latitude/longitude grid over the United States. When I run my
> script, I get this error:
>
> Coordinates:
> (0)     0
> (0)     check_for_y_lat_coord: Warning: Data either does not contain a
> valid latitude coordinate array or doesn't contain one at all.
> (0)     A valid latitude coordinate array should have a 'units' 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 a valid
> longitude coordinate array or doesn't contain one at all.
> (0)     A valid longitude coordinate array should have a 'units' 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'
> warning:ContourPlotDraw: out of range coordinates encountered; standard
> AreaFill rendering method may be unreliable;
>  consider setting the resource trGridType to "TriangularMesh" if
> coordinates contain missing values
>
>
> I know what the error is but not sure how to rectify it. I have gotten
> this error before when trying to plot WRF output. I've tried to add
> coordinates and attributes to the variables but it won't work.
>
> This is a print var summary of one of the variables for reference:
>
> Variable: array_variable_hgt
> Type: float
> Total Size: 1051168 bytes
>             262792 values
> Number of Dimensions: 2
> Dimensions and sizes:   [ygrid_0 | 428] x [xgrid_0 | 614]
> Coordinates:
> Number Of Attributes: 13
>   initial_time :        11/26/2015 (00:00)
>   forecast_time_units : hours
>   forecast_time :       0
>   level_type :  Isobaric surface (Pa)
>   parameter_template_discipline_category_number :       ( 0, 0, 3, 5 )
>   parameter_discipline_and_category :   Meteorological products, Mass
>   grid_type :   Lambert Conformal can be secant or tangent, conical or
> bipolar
>   coordinates : gridlat_0 gridlon_0
>   units :       gpm
>   long_name :   Geopotential height
>   production_status :   Operational products
>   center :      US National Weather Service - NCEP (WMC)
>   _FillValue :  1e+20
>
> Thanks,
>
> --
> Andrew Kren, PhD
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151127/46fa00fe/attachment.html 


More information about the ncl-talk mailing list