[ncl-talk] error in plot from data set of different number of grid points

Mary Haley haley at ucar.edu
Wed Dec 17 12:26:27 MST 2014


Hi Thomas,

In order to plot data over a map, either as vectors or contours, you have
to provide latitude and longitude locations for your data.

If you have a rectilinear grid, where the lat / lon are attached directly
to the data as 1-dimensional coordinate variables, then the plotting
routines will use these automatically.

If you have 2-dimensional lat / lon coordinate points, then you either need
to attach these to your data as special "lat2d" / "lon2d" attributes, or
set the sfYArray / sfXArray resources.

>From your description, it sounds like you have a rectilinear grid, but your
data variable may not be constructed properly. The error message is saying
that it can't determine if you have valid lat / lon coordinate variables,
which can happen if your "units" attribute is not one of the recognized
values, like "degrees_north" or "degrees_east", and/or the coordinate
variables somehow got stripped off your data variable.  This can happen if
you do a calculation on your data and put it in a new array, causing the
metadata to be stripped off.

Please do a "printVarSummary" on the data variables you are trying to plot,
and send it back to ncl-talk so we can see what it looks like.

Thanks,

--Mary


On Tue, Dec 16, 2014 at 8:23 PM, tms_l <littithomas at gmail.com> wrote:
>
> Dear ncl users
>
> I would like to plot u & v components of wind along with mean sea level
> pressure data.The wind data (time,level,lat_1,lon_1) is 4 dimensional and
> mean sea level pressure data (time,lat,lon) 3 dimensional.
>
> Also the number of grids points are arranged differently in each data sets.
>
> For wind data latitude ,                        lat_1 = 144 points
>                      longitude ,                     lon_1 =192 points
>
> For mean sea level pressure latitude ,        lat =145
>                                           longitude,       lon =192
>
> I am getting the error message as follows and the mean sea level pressure
> data seems to plotted reversely..Is there any function to deal with data
> sets of different grid points or how can solve this issue? Any help will be
> appreciated.
>
>
> error message :::::::
> (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'
> (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'
>
>
>
> Regards
>
> Thomas
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141217/63a2e2bb/attachment.html 


More information about the ncl-talk mailing list