setgrid
Added by Sentia Goursaud about 4 years ago
Dear all,
I have a problem to remap a file (DP09_lonlat.nc) - which has a curvilinear grid of 141x141- using "setgrid", such as:
cdo remapbil,r1800x900 -setgrid,setgrid/DP09_lonlat_v3.dat infile.nc outfile.nc
with that response:
cdo(2) setgrid: Process started
cdo(2) setgrid (Abort): xsize=15884 and size of xvals=19881 differ (grid description file: setgrid/DP09_lonlat_v3.dat)!
I have no idea what the xsize given above corresponds to. In the setgrid, I typed that xsize=141, and checked the shape of the xvals I entered (19881). In the infile (DP09_lonlat.nc), I checked that the grid is the same.
I created the setgrid "DP09_lonlat_v3.dat" using the enclosed fortran file (create_setgrid_DP09.f90).
I hope that somebody will be able to help as I have been stuck for a while now.
Sentia
create_setgrid_DP09.f90 (5.57 KB) create_setgrid_DP09.f90 | |||
DP09_lonlat_v3.dat (1.41 MB) DP09_lonlat_v3.dat | |||
DP09_lonlat.nc (248 KB) DP09_lonlat.nc |
Replies (2)
RE: setgrid - Added by Uwe Schulzweida about 4 years ago
Hi Sentia,
here are the first lines of DP09_lonlat_v3.dat:
gridtype = curvilinear gridsize = 19881 xsize = 141 ysize = 141 xvals = -135.00-135.41-135.83-136.25-136.68-137.12-137.56-138.01 -138.47-138.93-139.40-139.87-140.36-140.84-141.34-141.84 -142.35-142.87-143.39-143.92-144.46-145.01-145.56-146.12 -146.69-147.26-147.85-148.44-149.04-149.64-150.26-150.88 -151.50-152.14-152.78-153.43-154.09-154.76-155.43-156.11The values need to be separated by a blank. The blank is missing for all negative values.
Cheers,
Uwe
RE: setgrid - Added by Sentia Goursaud about 4 years ago
Thanks I changed the options of "write" in the fortran code to get a space, and it worked. Thanks again!
Have a nice week-end,
Sentia