remap using weight file: problems when using cdo version => 2.5.2
Moin,
I would like to do a conservative remapping using cdo. As the same remapping should be applied to a large number of files I would prefer using a pre-generated weight file to re-calculating the remapping weights for each file. The following command works totally fine for cdo version 2.5.0:
module load cdo/2.5.0-gcc-11.2.0
cdo -s remap,r360x180,weights.nc testfile.nc testfile_out.nc # works with v. 2.5.0
However, switching to a newer cdo version, the same command fails:
module swap cdo/2.5.3-gcc-11.2.0
cdo -s remap,r360x180,weights.nc testfile.nc testfile_out.nc
cdo remap (Abort): Source grid cell corner coordinates missing! # doesn't work with v. 2.5.3
However, when not using a pre-generated weight file but calculating the weights on the fly everything works fine also with version 2.5.3:
cdo -s remapcon,r360x180 testfile.nc testfile_out.nc # works
Also, deleting a random variable prior to interpolation seems to do the job:
cdo -s remap,r360x180,weights.nc -delname,sp_10m testfile.nc testfile_out.nc # works
cdo -s remap,r360x180,weights.nc -delname,t_g testfile.nc testfile_out.nc # works as well
cdo -s remap,r360x180,weights.nc -delname,u_10m testfile.nc testfile_out.nc # works as well
So it seems to be totally irrelevant which variable I delete. I wondered if the problem might be related to memory issues or so, so what I also tried is to artificially duplicate one variable under a different name:
cdo merge testfile.nc -setname,duplicate_of_sp_10m -selvar,sp_10m testfile.nc testfile_mod.nc
cdo -s remap,r360x180,weights.nc testfile_mod.nc testfile_out.nc # doesn't work
cdo remap (Abort): Source grid cell corner coordinates missing!
cdo -s remap,r360x180,weights.nc -delname,sp_10m testfile_mod.nc testfile_out.nc # works
This behaviour was reproducable on two machines (levante and the HPC system of DWD), in both cases version 2.5.0 was the last version that works. On the DWD system the test was done using version 2.5.2 instead of 2.5.3 (availability of installed versions slightly differed between the two machines). The problem seems to persist for any version newer than 2.5.2.
Any ideas what might cause this?
Best,
Ralf
| testfile.nc (100 MB) testfile.nc | testfile containing monthly mean 2D data | ||
| weights.nc (18.3 MB) weights.nc | pre-generated remap weights file |
Replies (2)
RE: remap using weight file: problems when using cdo version => 2.5.2 - Added by Ralf Hand 9 days ago
P.S.: I just saw that the case reported by Stephan Hagemann about 3 month ago might be closely related. So I also tried the following, unfortunately without success:
IGNORE_ATT_COORDINATES=1 cdo -s remap,r360x180,weights.nc testfile.nc testfile_out.nc
cdo remap (Abort): Reference to source grid not found!
IGNORE_ATT_COORDINATES=1 cdo -s remap,r360x180,weights.nc -setgrid,/pool/data/icon-xpp/0030/icon_grid_0030_R02B05_G.nc testfile.nc testfile_out.nc
cdo remap (Abort): Reference to source grid not found!
terminate called without an active exception
Aborted
RE: remap using weight file: problems when using cdo version => 2.5.2 - Added by Uwe Schulzweida 9 days ago
Moin Ralf,
Thank you for this bug report!
Unfortunately, an error occurred during optimisation. The error only affects remap when used in combination with conservative remapping.
We will fix the problem in the next CDO release 2.6.4. As a workaround, I would suggest adding a ‘copy’ here:
cdo -s remap,r360x180,weights.nc -copy testfile.nc testfile_out.ncCheers,
Uwe