[ncl-talk] problem with GPCP data grid

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Sun Jan 27 12:50:11 MST 2019


Shibo Ma,

The lat and lon coordinate variables in this file are non-standard because
the variable names are different than the dimension names.  This prevents
NCL from correctly attaching the lat and lon coordinates to the data
variable.  This is a violation of the CF and COARDS standards for Netcdf
format.

You do not need to regrid.  It is easy to reattach the coordinate variables
in memory, inside your script.  Try something like this:

f = addfile (filename, "r")
prec = f->precip
prec&nlat = f->latitude
prec&nlon = f->longitude
printVarSummary (prec)

To ensure proper alignment, also look at the values of lat_bounds and
lon_bounds, and compare to latitude and longitude coordinate values.  NCL
assumes the primary lat and lon coordinates are at the center of each
pixel.  Some data providers use a different alignment in the primary
coordinates, and assume that the user will use lat_bounds and lon_bounds
for alignment.  If this is the case, then you will need to adjust prec&nlat
and prec&nlon in your script.

--Dave


On Sun, Jan 27, 2019 at 6:39 AM victor <mashibo321 at 126.com> wrote:

> I need some help with GPCP monthly data grid.
> The grid of data seems unusual. When I do ncdump -h, it output like below.
> I don't know how to deal with something like "latitude(nlat)"?
> Should I need to regriding? What should I do if I want to reshape the data
> to an usual one?
> ...
> variables:
>     float latitude(nlat) ;
>         latitude:long_name = "Latitude" ;
>         latitude:standard_name = "latitude" ;
>         latitude:units = "degrees_north" ;
>         latitude:valid_range = -90.f, 90.f ;
>         latitude:missing_value = -9999.f ;
>         latitude:bounds = "lat_bounds" ;
>     float longitude(nlon) ;
>         longitude:long_name = "Longitude" ;
>         longitude:standard_name = "longitude" ;
>         longitude:units = "degrees_east" ;
>         longitude:valid_range = 0.f, 360.f ;
>         longitude:missing_value = -9999.f ;
>         longitude:bounds = "lon_bounds" ;
>     float time(time) ;
>         time:long_name = "time" ;
>         time:standard_name = "time" ;
>         time:units = "days since 1970-01-01 00:00:00 0:00" ;
>         time:calendar = "julian" ;
>         time:axis = "T" ;
>     float lat_bounds(nlat, nv) ;
>         lat_bounds:units = "degrees_north" ;
>         lat_bounds:comment = "latitude values at the north and south
> bounds of each pixel." ;
>     float lon_bounds(nlon, nv) ;
>         lon_bounds:units = "degrees_east" ;
>         lon_bounds:comment = "longitude values at the west and east bounds
> of each pixel." ;
>     float time_bounds(nv, time) ;
>         time_bounds:units = "days since 1970-01-01 00:00:00 0:00" ;
>         time_bounds:comment = "time bounds for each time value" ;
>     float precip(nlat, nlon) ;
>         precip:long_name = "NOAA Climate Data Record (CDR) of Monthly GPCP
> Satellite-Gauge Combined Precipitation" ;
>         precip:standard_name = "precipitation amount" ;
>         precip:units = "millimeters/day" ;
>         precip:coordinates = "longitude latitude time" ;
>         precip:valid_range = 0.f, 100.f ;
>         precip:cell_methods = "precip: mean" ;
>         precip:missing_value = -9999.f ;
>     float precip_error(nlat, nlon) ;
>         precip_error:long_name = "NOAA CDR of GPCP Satellite-Gauge
> Combined Precipitation Error" ;
>         precip_error:units = "millimeters/day" ;
>         precip_error:coordinates = "longitude latitude" ;
>         precip_error:valid_range = 0.f, 100.f ;
>         precip_error:missing_value = -9999.f ;
> ...
> ------------------------------------------------------------------------
> Shibo Ma(马世波)
> Graduate Student
> Department of Atmospheric and Oceanic Sciences
> School of Physics, Peking University
> No. 209 Chengfu Road, Beijing, China
> Email: mashibo321 at 126.com
> Tel : +86 18810507714
> ------------------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190127/a13bf845/attachment.html>


More information about the ncl-talk mailing list