Skip to content

Many IrisLoadWarning in logs #2718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
schlunma opened this issue Apr 25, 2025 · 11 comments
Open

Many IrisLoadWarning in logs #2718

schlunma opened this issue Apr 25, 2025 · 11 comments
Labels
iris Related to the Iris package
Milestone

Comments

@schlunma
Copy link
Contributor

After updating to the latest Iris version, logs are full of

IrisLoadWarning: Not all file objects were parsed correctly. See iris.loading.LOAD_PROBLEMS for details.

I got this when running a recipe that uses lots of native data (ICON), there are probably less warnings for CMIP models.

@schlunma schlunma added the iris Related to the Iris package label Apr 25, 2025
@schlunma schlunma added this to the v2.13.0 milestone Apr 25, 2025
@valeriupredoi
Copy link
Contributor

Probably a side effect or related in one way or another to #2716 🍺

@schlunma
Copy link
Contributor Author

schlunma commented May 8, 2025

No, looks like this is actually a new feature of Iris 3.12.0: https://scitools-iris.readthedocs.io/en/stable/generated/api/iris.loading.html#iris.loading.LoadProblems

One can print iris.loading.LoadProblems to get a list of problems that occurred during loading of files.

How do we want to deal with this? I can think of several options:

  1. Simply ignore them (probably not a good idea).
  2. Log all load problem in the debug log.
  3. Log all load problems in the CMOR log (it's kind of related to CMOR since those problems usually come from data not following the CF concentions).
  4. Introduce a new iris_log.txt file (or whatever you want to call it) that contains those load problems.

@ESMValGroup/technical-lead-development-team

@bettina-gier
Copy link
Contributor

Debug log is already hard to parse as is, I'd say we leave a message at the end of each preproc block with the iris load warning (only ONCE per block) in the debug log and then route the more verbose warnings in either cmor log or a new iris_log. Probably cmor since as you said it's most likely related.

@bouweandela
Copy link
Member

It would be good to distuinguish between two kinds of load problems:

  1. problems that are dealt with by a subsequent fix -> these should be ignored
  2. problems that are not handled -> these should be shown and shouldn't be too many (hopefully)

@bouweandela
Copy link
Member

The simplest way to deal with category 1. would be to apply the fixes using ncdata before loading into iris, so the warning never appears. That does not work for legacy code, so we may want to use something like warnings.filterwarnings in those cases if it's not too much work.

@schlunma
Copy link
Contributor Author

schlunma commented May 8, 2025

The simplest way to deal with category 1. would be to apply the fixes using ncdata before loading into iris, so the warning never appears. That does not work for legacy code, so we may want to use something like warnings.filterwarnings in those cases if it's not too much work.

Yeah, sounds like a good approach for the future (would need something like #2579 before though).

Unfortunately I don't see an easy way of determining which problem is fixed and which not for our present fixes. For example, this is the content of iris.loading.LOAD_PROBLEMS after reading a single (!) ICON file (sometimes we read 100s of those files):

<iris.loading.LoadProblems object at 0x7f926fd59010>:
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'rain_gsp' is not a valid standard_name", {'standard_name': 'rain_gsp'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'thb_t' is not a valid standard_name", {'standard_name': 'thb_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'umfl_s' is not a valid standard_name", {'standard_name': 'umfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'t_seasfc' is not a valid standard_name", {'standard_name': 't_seasfc'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'albvisdif' is not a valid standard_name", {'standard_name': 'albvisdif'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'t_2m' is not a valid standard_name", {'standard_name': 't_2m'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'qhfl_s' is not a valid standard_name", {'standard_name': 'qhfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sod_t' is not a valid standard_name", {'standard_name': 'sod_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'rain_con_rate' is not a valid standard_name", {'standard_name': 'rain_con_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'tqi_dia' is not a valid standard_name", {'standard_name': 'tqi_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'condhf_ice' is not a valid standard_name", {'standard_name': 'condhf_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'t_s' is not a valid standard_name", {'standard_name': 't_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'h_ice' is not a valid standard_name", {'standard_name': 'h_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'vmfl_s' is not a valid standard_name", {'standard_name': 'vmfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'tqv' is not a valid standard_name", {'standard_name': 'tqv'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sp_10m' is not a valid standard_name", {'standard_name': 'sp_10m'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'albvisdir' is not a valid standard_name", {'standard_name': 'albvisdir'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sou_s' is not a valid standard_name", {'standard_name': 'sou_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'fr_seaice' is not a valid standard_name", {'standard_name': 'fr_seaice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'tqv_dia' is not a valid standard_name", {'standard_name': 'tqv_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'rain_gsp_rate' is not a valid standard_name", {'standard_name': 'rain_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'albnirdir' is not a valid standard_name", {'standard_name': 'albnirdir'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'albnirdif' is not a valid standard_name", {'standard_name': 'albnirdif'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'tot_prec_rate' is not a valid standard_name", {'standard_name': 'tot_prec_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'clct' is not a valid standard_name", {'standard_name': 'clct'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'rain_con' is not a valid standard_name", {'standard_name': 'rain_con'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'prec_gsp_rate' is not a valid standard_name", {'standard_name': 'prec_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'qifl_s' is not a valid standard_name", {'standard_name': 'qifl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'shfl_s' is not a valid standard_name", {'standard_name': 'shfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'meltpot_ice' is not a valid standard_name", {'standard_name': 'meltpot_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'t_ice' is not a valid standard_name", {'standard_name': 't_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sob_s' is not a valid standard_name", {'standard_name': 'sob_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'ice_gsp_rate' is not a valid standard_name", {'standard_name': 'ice_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sou_t' is not a valid standard_name", {'standard_name': 'sou_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'sob_t' is not a valid standard_name", {'standard_name': 'sob_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'snow_con_rate' is not a valid standard_name", {'standard_name': 'snow_con_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'thb_s' is not a valid standard_name", {'standard_name': 'thb_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'tqc_dia' is not a valid standard_name", {'standard_name': 'tqc_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'mean sea level pressure' is not a valid standard_name", {'standard_name': 'mean sea level pressure'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'lhfl_s' is not a valid standard_name", {'standard_name': 'lhfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'prec_con' is not a valid standard_name", {'standard_name': 'prec_con'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20000101T000000Z.nc: "'snow_gsp_rate' is not a valid standard_name", {'standard_name': 'snow_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'rain_gsp' is not a valid standard_name", {'standard_name': 'rain_gsp'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'thb_t' is not a valid standard_name", {'standard_name': 'thb_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'umfl_s' is not a valid standard_name", {'standard_name': 'umfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'t_seasfc' is not a valid standard_name", {'standard_name': 't_seasfc'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'albvisdif' is not a valid standard_name", {'standard_name': 'albvisdif'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'t_2m' is not a valid standard_name", {'standard_name': 't_2m'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'qhfl_s' is not a valid standard_name", {'standard_name': 'qhfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sod_t' is not a valid standard_name", {'standard_name': 'sod_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'rain_con_rate' is not a valid standard_name", {'standard_name': 'rain_con_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'tqi_dia' is not a valid standard_name", {'standard_name': 'tqi_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'condhf_ice' is not a valid standard_name", {'standard_name': 'condhf_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'t_s' is not a valid standard_name", {'standard_name': 't_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'h_ice' is not a valid standard_name", {'standard_name': 'h_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'vmfl_s' is not a valid standard_name", {'standard_name': 'vmfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'tqv' is not a valid standard_name", {'standard_name': 'tqv'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sp_10m' is not a valid standard_name", {'standard_name': 'sp_10m'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'albvisdir' is not a valid standard_name", {'standard_name': 'albvisdir'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sou_s' is not a valid standard_name", {'standard_name': 'sou_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'fr_seaice' is not a valid standard_name", {'standard_name': 'fr_seaice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'tqv_dia' is not a valid standard_name", {'standard_name': 'tqv_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'rain_gsp_rate' is not a valid standard_name", {'standard_name': 'rain_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'albnirdir' is not a valid standard_name", {'standard_name': 'albnirdir'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'albnirdif' is not a valid standard_name", {'standard_name': 'albnirdif'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'tot_prec_rate' is not a valid standard_name", {'standard_name': 'tot_prec_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'clct' is not a valid standard_name", {'standard_name': 'clct'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'rain_con' is not a valid standard_name", {'standard_name': 'rain_con'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'prec_gsp_rate' is not a valid standard_name", {'standard_name': 'prec_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'qifl_s' is not a valid standard_name", {'standard_name': 'qifl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'shfl_s' is not a valid standard_name", {'standard_name': 'shfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'meltpot_ice' is not a valid standard_name", {'standard_name': 'meltpot_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'t_ice' is not a valid standard_name", {'standard_name': 't_ice'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sob_s' is not a valid standard_name", {'standard_name': 'sob_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'ice_gsp_rate' is not a valid standard_name", {'standard_name': 'ice_gsp_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sou_t' is not a valid standard_name", {'standard_name': 'sou_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'sob_t' is not a valid standard_name", {'standard_name': 'sob_t'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'snow_con_rate' is not a valid standard_name", {'standard_name': 'snow_con_rate'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'thb_s' is not a valid standard_name", {'standard_name': 'thb_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'tqc_dia' is not a valid standard_name", {'standard_name': 'tqc_dia'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'mean sea level pressure' is not a valid standard_name", {'standard_name': 'mean sea level pressure'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'lhfl_s' is not a valid standard_name", {'standard_name': 'lhfl_s'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'prec_con' is not a valid standard_name", {'standard_name': 'prec_con'}
  /work/mh0287/b364148/Icon/Git_lev/icon.nwp.hdext.intno/experiments/tvp1826_001/tvp1826_001_atm_2d_ml_20010101T000000Z.nc: "'snow_gsp_rate' is not a valid standard_name", {'standard_name': 'snow_gsp_rate'}

In practice, we would need to check the content of iris.loading.LOAD_PROBLEMS and then decide if we want to raise the warning or not. And we would probably need to expand the code later when Iris adds more problems. I don't think that's worth it.

For data where we expect lots of problems (native model output), we could simple ignore the warning within the config file. For the other cases we could show the problems in the debug or CMOR log?

@schlunma
Copy link
Contributor Author

schlunma commented May 8, 2025

Actually, I think a possible solution could also be to reroute ALL iris warnings into a dedicated iris_log.txt file. Iris is very verbose when it comes to warnings, and in complex recipes our log can be full of confusing warnings like

UserWarning: WARNING: missing_value not used since it cannot be safely cast to variable data type

I don't think anyone takes those serious...

We could do it the same way we do it for the CMOR log: If there have been problems, issue a single warning at the end of our log saying that there have been problems.

@bouweandela
Copy link
Member

If you're happy about the way the ICON data is loaded, it should be safe to add the warning from the top post to list of ignored warnings for the ICON project in config-developer.yml and that should solve most of the problem.

If there are other warnings related to loading data outside of the ICON project, we could move that setting from config-developer.yml to the extra facets facility to ignore warnings in a more fine grained way of ignoring load warnings for CMIP6 and CMIP7 data as a short term solution, until we have moved things to fixing before loading?

In most cases, it should be fairly straightforward to see from the fix if a problem has been fixed or not. E.g. the example with the invalid missing or fill value above would be a bit of code using masked_equal.

@schlunma
Copy link
Contributor Author

This is probably the safest approach. One problem I see with this is that it requires a lot of work: you need to find out where the warning is raised, which dataset raises it, if it's safe to ignore, etc.

Here is an example log of the run that I used to create the multi-model plot of our new paper:

main_log.txt

From the more than 5000 lines in the log, more than 4000 are Iris warnings. They are most likely raised in the area_statistics code, but one would need to check that. I think it would be much more user-friendly to show those warnings in a separate file.

@bouweandela
Copy link
Member

Hiding these warnings in a separate log file where nobody will look at them defeats the purpose of having them at all. Can't we just silence the irrelevant warnings from area_statistics? Another option could be to issue each warning only once? The 1582 warnings in that log file are reduced to only 12 unique warnings.

@schlunma
Copy link
Contributor Author

I agree that it's certainly not optimal, but having 1500 warnings in a user's log also kind of defeats the purpose of them. No one will read them.

The warnings from area_statistics is just one example - there are many more preprocessors that emit them. Thus, I think that hiding them in a separate file and then trying to address them is a good compromise (in terms of user-friendliness vs. being careful). I can start on another PR that ignores the area_statistics warnings once we reached a conclusion here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iris Related to the Iris package
Projects
None yet
Development

No branches or pull requests

4 participants