Project

General

Profile

Regrid curvilinear dataset

Added by Bamidele OLORUNTOBA over 4 years ago

Hi all,
I have a curvilinear data set that has a gridsize of 9331200 (2160x4320). And I want to change the grid size to 67600 (260x260). I initially got another file which had my destination dimensions and then used cdo remapbil destgrid infile outfile. But some things in my initial file with gridsize 9331200 were missing in the output file obviously due to the structure of my destgrid file.

Please, I like to just change the gridsize of my source file from 9331200 (2160x4320) to 67600 (260x260) retaining all variables and attributes.

Here is the metadata for the curvilinear dataset 9331200 (2160x4320) from using ncdump -h and secondly sinfo respectively:

netcdf domain.lnd.Nigeria005.191223 {
dimensions:
nj = 2160 ;
ni = 4320 ;
nv = 4 ;
variables:
double xc(nj, ni) ;
xc:bounds = "xv" ;
xc:long_name = "longitude of grid cell center" ;
xc:units = "degrees_east" ;
double yc(nj, ni) ;
yc:long_name = "latitude of grid cell center" ;
yc:units = "degrees_north" ;
yc:bounds = "yv" ;
double xv(nj, ni, nv) ;
xv:long_name = "longitude of grid cell verticies" ;
xv:units = "degrees_east" ;
double yv(nj, ni, nv) ;
yv:long_name = "latitude of grid cell verticies" ;
yv:units = "degrees_north" ;
int mask(nj, ni) ;
mask:long_name = "domain mask" ;
mask:note = "unitless" ;
mask:coordinates = "xc yc" ;
mask:comment = "0 value indicates cell is not active" ;
double area(nj, ni) ;
area:long_name = "area of grid cell in radians squared" ;
area:coordinates = "xc yc" ;
area:units = "radian2" ;
double frac(nj, ni) ;
frac:long_name = "fraction of grid cell that is active" ;
frac:coordinates = "xc yc" ;
frac:note = "unitless" ;
frac:filter1 = "error if frac> 1.0+eps or frac < 0.0-eps; eps = 0.1000000E-11" ;
frac:filter2 = "limit frac to [fminval,fmaxval]; fminval= 0.1000000E-02 fmaxval= 1.000000" ;

// global attributes:
:title = "CESM domain data:" ;
:Conventions = "CF-1.0" ;
:source_code = "SVN $Id: gen_domain.F90 65202 2014-11-06 21:07:45Z $" ;
:SVN_url = " $URL: https://svn-ccsm-models.cgd.ucar.edu/tools/mapping/gen_domain/trunk/src/gen_domain.F90 $" ;
:Compiler_Optimized = "TRUE" ;
:hostname = "jrl02" ;
:history = "Tue Dec 24 19:38:12 2019: ncap2 -O -s where(xc<0) xc=360+xc domain.lnd.Nigeria005.191223.nc domain.lnd.Nigeria005.191223.nc\n",
"created by oloruntoba1, 2019-12-23 14:02:55" ;
:source = "/p/scratch/cjicg41/bamidele/inputdata/lnd/clm2/mappingdata/maps/Nigeria/map_5x5min_ISRIC-WISE_to_Nigeria_nomask_aave_da_c191223.nc" ;
:map_domain_a = "/p/scratch/cjicg41/bamidele/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_5x5min_ISRIC-WISE_c111114.nc" ;
:map_domain_b = "/p/project/cjicg41/bamidele/clm5.0/tools/mkmapgrids/SCRIPgrid_Nigeria_nomask_c191223.nc" ;
:map_grid_file_ocn = "/p/scratch/cjicg41/bamidele/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_5x5min_ISRIC-WISE_c111114.nc" ;
:map_grid_file_atm = "/p/project/cjicg41/bamidele/clm5.0/tools/mkmapgrids/SCRIPgrid_Nigeria_nomask_c191223.nc" ;
:NCO = "netCDF Operators version 4.7.7 (Homepage = http://nco.sf.net, Code = http://github.com/nco/nco)" ;
}

cdo sinfo domain.lnd.Nigeria005.191223.nc
File format : NetCDF
-1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter ID
1 : unknown /p/scratch/cjicg41/bamidele/inp c instant 1 1 9331200 1 I32 : -1
2 : unknown /p/scratch/cjicg41/bamidele/inp c instant 1 1 9331200 1 F64 : -2
3 : unknown /p/scratch/cjicg41/bamidele/inp c instant 1 1 9331200 1 F64 : -3
Grid coordinates :
1 : curvilinear : points=9331200 (4320x2160)
xc : 0.04166659 to 359.9583 degrees_east circular
yc : -89.95834 to 89.95834 by 0.08333334 degrees_north
available : cellbounds
Vertical coordinates :
1 : surface : levels=1
cdo sinfo: Processed 3 variables [0.49s 903MB]