ecmwf-ifs / ecrad

ECMWF atmospheric radiation scheme
https://confluence.ecmwf.int/display/ECRAD
Apache License 2.0
45 stars 30 forks source link

Crash using netcdf-fortran >=4.6 #16

Open hippalectryon-0 opened 3 months ago

hippalectryon-0 commented 3 months ago

I recently recompiled ecrad using the latest netcdf fortran library (4.6.1), and noticed a new crash in a config that worked fine before:

*** Error defining variable pressure_hl: NetCDF: Name contains illegal characters
Error writing NetCDF file
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
ERROR STOP 1

Error termination. Backtrace:
#0  0x7f9c74223960 in ???
#1  0x7f9c742244d9 in ???
#2  0x7f9c74225bb2 in ???
#3  0x55cc96b506ed in __radiation_io_MOD_radiation_abort
        at ecrad/utilities/radiation_io.F90:52
#4  0x55cc96b4434e in __easy_netcdf_MOD_define_variable
        at ecrad/utilities/easy_netcdf.F90:2072
#5  0x55cc96a8a4a2 in __radiation_save_MOD_save_fluxes
        at ecrad/radiation/radiation_save.F90:156
#6  0x55cc96a4c368 in ecrad_driver
        at ecrad/driver/ecrad_driver.F90:376
#7  0x55cc96a4a738 in main
        at ecrad/driver/ecrad_driver.F90:33

After some investigation, I can confirm that the command used to obtain this error ../bin/ecrad conf.nam nc1.nc nc_out.nc works fine with version 4.5.4, but doesn't work with 4.6.0 and 4.6.1.

reuterbal commented 3 weeks ago

Thanks for this. We have found similar problems and found out that this is an issue in HDF5 1.14.3. The problem has been fixed in 1.14.4. Because NetCDF uses HDF5 under the hood this problem occurs.

Please check whether you may be using a 1.14 release of HDF5 that is older than 1.14.4

Bug report: https://github.com/HDFGroup/hdf5/issues/3831 "Fix" commit (if you can call that a fix): https://github.com/HDFGroup/hdf5/commit/e0d095ebf020706ec7d7c82e6674b18f1a0a2d5b