Maximum line length of CDO grid description text files
Added by Brendan DeTracey almost 5 years ago
cdo 1.9.8 cygwin64
Hi,
I am trying to interpolate data from a regular grid to a 1435x1122 curvilinear grid. For my xvals/yvals I have written an entire row (1435 values) to each line of text. Then:
$ cdo genbil,bnam_t_grid_cdo.txt data_in.nc bil_weights.nc cdo genbil (Abort): xsize=1607476 and size of xvals=1610070 differ (grid description file: bnam_t_grid_cdo.txt)!
This does not happen when I use a smaller grid (e.g. 500x500). Could you please tell me the limitations of cdo grid description format? What is the maximum allowable number of characters per line? What is the maxim number of allowable values(columns) per line? Does cdo expect the number of values(columns) for each line to be the same?
Thanks!
Replies (4)
RE: Maximum line length of CDO grid description text files - Added by Brendan DeTracey almost 5 years ago
Attached samples. I had to compress the CDO grid description text file.
$ cdo -v -O genbil,test_t_grid_cdo.txt test_topo_in.nc test_bil_weights.nc OpenMP: num_procs=4 max_threads=1 genbil,test_t_grid_cdo.txt test_topo_in.nc test_bil_weights.nc cdo genbil: Point search radius = 180 deg cdo genbil: Extrapolation disabled! cdo genbil (Abort): xsize=1607476 and size of xvals=1610070 differ (grid description file: test_t_grid_cdo.txt)!
test_t_grid_cdo.txt.gz (53.2 MB) test_t_grid_cdo.txt.gz | |||
test_topo_in.nc (168 KB) test_topo_in.nc |
RE: Maximum line length of CDO grid description text files - Added by Brendan DeTracey almost 5 years ago
Ack! Never mind this. Turns out I hadn't left enough leading spaces i.e. 13.8f
is not so great a format for longitudes like -110.33333333
:)
When I reduced my grid size it worked because the longitudes involved were greater than -100.
RE: Maximum line length of CDO grid description text files - Added by Ralf Mueller almost 5 years ago
hi Brendan!
I got the following error
% cdo -v -f nc -topo,test_t_grid_cdo.txt t.nc OpenMP: num_procs=8 max_threads=1 -topo,test_t_grid_cdo.txt t.nc cdo topo (Abort): xsize=1607476 and size of xvals=1610070 differ (grid description file: test_t_grid_cdo.txt)!
you didn't get it?
RE: Maximum line length of CDO grid description text files - Added by Brendan DeTracey almost 5 years ago
Hi Ralf!
Yes, I got that error. And it was my fault for specifying a number format that did not leave spaces between some columns. I was too lazy to specify the grid in SCRIPS format and it bit me. For the curious, 65536 is the character limit per line in the CDO grid description text file. That was an easy grep. Columns per line was not so easy without knowing c++. I got lost between classes.
Another small question coming very soon...