Possible bug in 2.4.4 with REMAP_AREA_MIN`
Added by Paolo Davini 23 days ago
I am testing the impact of `REMAP_AREA_MIN` values on some interpolation to find a proper default and I am noticing an unexpected behaviour:
DIR=$(pwd) cdo remapcon,r360x180 $DIR/onlytos-ipsl.nc $DIR/tos-ipsl-remapcon.nc echo 'YES!' cdo gencon,r360x180 $DIR/onlytos-ipsl.nc $DIR/weights.nc cdo remap,r360x180,$DIR/weights.nc $DIR/onlytos-ipsl.nc $DIR/onlytos-ipsl-remap0.nc echo 'YES!' export REMAP_AREA_MIN=0.5 cdo remapcon,r360x180 $DIR/onlytos-ipsl.nc $DIR/tos-ipsl-remapcon.nc echo 'YES!' cdo gencon,r360x180 $DIR/onlytos-ipsl.nc $DIR/weights.nc cdo remap,r360x180,$DIR/weights.nc $DIR/onlytos-ipsl.nc $DIR/onlytos-ipsl-remap5.nc echo 'YES!'
And I get a segmentation fault in the last case:
cdo remapcon: YAC first order conservative weights from curvilinear (362x332) to lonlat (360x180) grid, with source mask (65294) cdo remapcon: Processed 1442208 values from 1 variable over 12 timesteps [0.79s 96MB] YES! cdo gencon: YAC first order conservative weights from curvilinear (362x332) to lonlat (360x180) grid, with source mask (65294) cdo gencon: Processed 120184 values from 1 variable over 1 timestep [0.78s 93MB] cdo remap: Processed 1442208 values from 1 variable over 12 timesteps [0.03s 57MB] YES! cdo remapcon: YAC first order conservative weights from curvilinear (362x332) to lonlat (360x180) grid, with source mask (65294) cdo remapcon: Processed 1442208 values from 1 variable over 12 timesteps [0.81s 94MB] YES! cdo gencon: YAC first order conservative weights from curvilinear (362x332) to lonlat (360x180) grid, with source mask (65294) cdo gencon: Processed 120184 values from 1 variable over 1 timestep [0.78s 91MB] cdo-test.sh: line 17: 29992 Segmentation fault: 11 cdo remap,r360x180,$DIR/weights.nc $DIR/onlytos-ipsl.nc $DIR/onlytos-ipsl-remap5.nc YES!
Am I doing something wrong?
Thanks a lot for any hint!
onlytos-ipsl.nc (10.1 MB) onlytos-ipsl.nc |
Replies (4)
RE: Possible bug in 2.4.4 with REMAP_AREA_MIN` - Added by Uwe Schulzweida 22 days ago
Hi Paolo,
Thank you for this report! We will fix this bug in the next CDO release 2.5.1.
Cheers,
Uwe
RE: Possible bug in 2.4.4 with REMAP_AREA_MIN` - Added by Uwe Schulzweida 22 days ago
Your data contains duplicate coordinates in the first and last column. This is typical for raw model data from an ocean model. However, these two columns must be removed before interpolation with remapcon, otherwise this interpolation method will produce incorrect results. You can use sethalo,-1,-1 to remove them:
cdo remapcon,<targetgrid> -sethalo,-1,-1 infile outfile
RE: Possible bug in 2.4.4 with REMAP_AREA_MIN` - Added by Paolo Davini 19 days ago
Thanks Uwe!
You are right, great to point it out, you are right old NEMO data has this issue. However, this is not connected to the segfault from above, correct?
Cheers,
Paolo
RE: Possible bug in 2.4.4 with REMAP_AREA_MIN` - Added by Uwe Schulzweida 19 days ago
Right, this is not connected to the segfault!