Project

General

Profile

GrADS netcdf problem

Added by Mosti Mapa almost 7 years ago

Hello

I have high resolution data for a small domain. the data is netcdf (.nc) but when I try to open it with GrADS using sdfopen, I get:
gadsdf: SDF file has no discernable X coordinate.

could it be because the data are curvilinear grid (I'm not sure if that's the case, but apparently lat is function of lon)?
so if I should regrid it, please tell me how?

here's ncdump:

dimensions:
x = 900 ;
y = 804 ;
time = UNLIMITED ; // (2928 currently)
variables:
double lon(y, x) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:_CoordinateAxisType = "Lon" ;
double lat(y, x) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:_CoordinateAxisType = "Lat" ;
double time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:units = "days since 1949-12-01 00:00:00" ;
time:calendar = "standard" ;
float pr(time, y, x) ;
pr:standard_name = "precipitation_flux" ;
pr:long_name = "Precipitation" ;
pr:units = "kg m-2 s-1" ;
pr:coordinates = "lon lat" ;
pr:_FillValue = 1.e+20f ;
pr:missing_value = 1.e+20f ;
pr:original_name = "RAINC+RAINNC" ;
pr:cell_methods = "time: mean (interval: 3 hours)" ;
Any help is appreciated
Thanks a lot.


Replies (4)

RE: GrADS netcdf problem - Added by Karin Meier-Fleischer almost 7 years ago

Hi Mosti,

the problem is caused by the 2D-coordinates lat and lon. You have to remap the data to a regular latlon grid.

Just one tip at the beginning: you would have found answers to your question very fast by 'googling' your question.

But here we go, to remap the data you can use a grid file, e.g. to remap the data to 1x1 degree global grid.

gridfile.txt:

gridtype  = lonlat
gridsize  = 64800
xname     = lon
yname     = lat
xsize     = 360
ysize     = 180
xfirst    = -179.5
xinc      = 1.0
yfirst    = -89.5
yinc      = 1.0

Do the remaping:

cdo remapbil,gridfile.txt infile outfile

-Karin

RE: GrADS netcdf problem - Added by Mosti Mapa almost 7 years ago

Thanks a lot for the reply

The problem is that the data is like an arc, where the latitude is a function of longitude and vice versa.
when I remap it as mentioned above, it gives constant value.

RE: GrADS netcdf problem - Added by Karin Meier-Fleischer almost 7 years ago

Can you upload the data.

RE: GrADS netcdf problem - Added by Mosti Mapa almost 7 years ago

I wish, but it's a high resolution data (5GB).

but here's the output of cdo griddes

Thanks a lot.

myGridDef (27.3 MB) myGridDef
    (1-4/4)