plesager / ece3-postproc

Suite of processing tools for EC-Earth3 output
5 stars 8 forks source link

hiresclim2 fails on cca with hdf/netcdf error #26

Closed tommibergman closed 6 years ago

tommibergman commented 6 years ago

On ECMWF CCA hiresclim fails with the following error:

Error (cdf_create) : /scratch/ms/nl/nktb/ECEARTH-RUNS/crsp/post/mon/Post_2001/crsp_2001_q.nc4: Permission denied
HDF5-DIAG: Error detected in HDF5 (1.8.12) thread 0:
  #000: H5Adeprec.c line 320 in H5Aget_num_attrs(): illegal object atom
    major: Invalid arguments to routine
    minor: Unable to find atom information (already closed?)
Error (cdf_close) : NetCDF: HDF error
cdf_create         : ncid = -1  mode = 4352  file = /scratch/ms/nl/nktb/ECEARTH-RUNS/crsp/post/mon/Post_2001/crsp_2001_q.nc4
cdf_create         : chunksizehint 0

However, following command (which should be the same as in the script) works fine from the command line : cdo -f nc4c -z zip -r -R -t /home/ms/nl/nktb/ECEARTH/ece3-postproc/hiresclim2/script/ecearth.tab selvar,q tmp/hireclim2_crsp_6UOaKm/icmgg_2001.grb /scratch/ms/nl/nktb/ECEARTH-RUNS/crsp/post/mon/Post_2001/crsp_2001_q.nc4

plesager commented 6 years ago

Looks like an issue with the libraries. Since I am loading lots of modules in bash.rc, I do not load the netcdf with the following block in conf/cca/conf_hiresclim_cca.sh

for soft in nco netcdf python cdo cdftools

Can you try to remove netcdf from that line of code, and add these lines before it:

module unload cray-hdf5-parallel module unload cray-netcdf-hdf5parallel module load cray-hdf5-parallel/1.8.14 module load cray-netcdf-hdf5parallel/4.3.3.1

I am not sure how robust it is (depending on what people load in their bash.rc), but let see if that works for you.

tommibergman commented 6 years ago

Ok, that did not help and the error comes with a command with splitvar instead the one quoted above. And this command doesn't work even on the command line.

But, I think I have a solution. In CRESCENDO runs I have q both as model and pressure level output (just in case), and this seems to confuse cdo/netcdf/hdf when doing splitvar. So when I make a new file without model levels from output, this command:

cdo -f nc4c -z zip -R -t /home/ms/nl/nktb/ECEARTH/ece3-postproc/hiresclim2/script/ecearth.tab splitvar -selvar,q tmp/hireclim2_crsp_Gqt5fV/icmgg2000.grb 2000

works fine. And I don't think we necessarily need to be able to handle this automatically, but I need to figure out how to process the run that I have.

plesager commented 6 years ago

I see. Since hiresclim (actually cdo) does not work with mixed (be it time and/or levels) output, you need to filter the output beforehand. This is done with grib_filter. But you do not have to do it manually, because it has been incorporated into hiresclim. Indeed you can activate a pass through grib_filter just by uncommenting the lines in conf/cca/conf_hiresclim_cca.sh that start with: FILTERGG2D FILTERGG3D FILTERGGSH As written now, these filters work for PRIMAVERA output, and may just work out of the box for CRESCENDO.

plesager commented 6 years ago

Actually, if you only added model levels to the IFS output, you can just activate FILTERGG3D, that maybe enough.

tommibergman commented 6 years ago

FILTERGG3D alone is not enough, FILTERGG3D is in if block with FILTERGG2D so that needs to be on as well. Then it works.

plesager commented 6 years ago

Updated the README.