Project

General

Profile

Remap works only for timestep 1, rest is missing values

Added by Jonni Lehtiranta 9 months ago

Hi! Using CDO 2.2.1,


Replies (7)

RE: Remap works only for timestep 1, rest is missing values - Added by Jonni Lehtiranta 9 months ago

Running the following, the result file eremap.nc will only include one good field, and the rest of the timesteps are set to missing value.
With the same files, it worked on cdo 1.9.3.
With 2.0.3, I had to make an ecarea.nc file that has the number of identical timesteps that I want, but this no longer works in 2.2.1.

cdo -L -remap,ecarea.nc,ec_upscaleweights.nc 2023081200_ecmwf_NEMO_90h.nc eremap.nc

I add the files I'm using.

RE: Remap works only for timestep 1, rest is missing values - Added by Uwe Schulzweida 9 months ago

Thanks for the example. This unfortunately broke in CDO release 2.2.0. We will fix this error in 2.2.2!

RE: Remap works only for timestep 1, rest is missing values - Added by Jonni Lehtiranta 9 months ago

Thank you for the reply! Are you aware of any workaround on how to do the same thing with 2.2.1? Right now it's the version I have available on the supercomputer.

RE: Remap works only for timestep 1, rest is missing values - Added by Uwe Schulzweida 9 months ago

Yes, the fields with missing values cause the problem. These are only in the first time step.
If you do the interpolation in 2 steps the result is correct. In the first step only the first time step is interpolated and in the second step the rest. Afterwards both parts are merged with the operator cat.

cdo -P 4 -L -remapbil,ecarea.nc -seltimestep,1 2023081200_ecmwf_NEMO_90h.nc  result_1
cdo -P 4 -L -remapbil,ecarea.nc -seltimestep,2/-1 2023081200_ecmwf_NEMO_90h.nc  result_2_to_N
cdo -L -O cat result_1 result_2_to_N result
rm result_1 result_2_to_N
In one command it looks like this:
cdo -P 4 -L -O -cat -remapbil,ecarea.nc -seltimestep,1 2023081200_ecmwf_NEMO_90h.nc  -remapbil,ecarea.nc -seltimestep,2/-1 2023081200_ecmwf_NEMO_90h.nc  result

RE: Remap works only for timestep 1, rest is missing values - Added by Jonni Lehtiranta 9 months ago

Thank you! That, done in three cdo calls, works!

However, in one command, it SEGFAULTs. Mostly I get no further error, but sometimes I get something like this. I'm letting you know in case it's useful or interesting, I get around the problem now.

cdo(1) remapbil: Process started
cdo(2) seltimestep: Process started
cdo(3) remapbil: Process started
cdo(4) seltimestep: Process started
HDF5-DIAG: Error detected in HDF5 (1.10.5) thread 0:
#000: ../../src/H5.c line 847 in H5open(): library initialization failed
major: Function entry/exit
minor: Unable to initialize object
#001: ../../src/H5.c line 219 in H5_init_library(): unable to initialize datatype interface
major: Function entry/exit
minor: Unable to initialize object
#002: ../../src/H5T.c line 578 in H5T_init(): interface initialization failed
major: Function entry/exit
minor: Unable to initialize object
#003: ../../src/H5T.c line 790 in H5T__init_package(): not a datatype object
major: Invalid arguments to routine
minor: Inappropriate type
Segmentation fault

RE: Remap works only for timestep 1, rest is missing values - Added by Jonni Lehtiranta 9 months ago

Seems also that I can solve this with -setmisstoc,0 because it's all the same for my further processing.

    (1-7/7)