Skip to content

Adding basic impact diagnostics - #4427

Open
lauracasp wants to merge 44 commits into
mainfrom
impact_diagnostics
Open

Adding basic impact diagnostics#4427
lauracasp wants to merge 44 commits into
mainfrom
impact_diagnostics

Conversation

@lauracasp

@lauracasp lauracasp commented May 7, 2026

Copy link
Copy Markdown

Description

Addition of basic impact diagnostics as listed in Table 1 of Elling et al 2026

! NOTE: In order to use the ORAS5 datasets on levante, the following configuration must be added to the .config/esmvaltool/data-hpc-dkrz.yml file in the native6 section:

      oras5:
        type: esmvalcore.io.local.LocalDataSource
        rootpath: /work/bd1083/b382555/extraobsraw
        dirname_template: "Tier{tier}/{dataset}/single_level" #{version}/{frequency}/{short_name}"
        filename_template: "{raw_name}_*.nc"

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

New or updated recipe/diagnostic


To help with the number of pull requests:

@CLAassistant

CLAassistant commented May 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@lauracasp
lauracasp marked this pull request as ready for review August 7, 2026 13:04
@lauracasp
lauracasp requested review from LisaBock and schlunma August 7, 2026 13:04
@LisaBock LisaBock added in scientific review diagnostic requires new ESMValCore release A new release of ESMValCore is needed to solve this issue/merge this pull request.. labels Aug 10, 2026

@LisaBock LisaBock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lauracasp for this great diagnostics! It looks already quite good to me.

My comments are:

  • I think, it would be helpful to include the used threshold in the output filename. Then it would be possible to collect all output files in the end in one directory.
  • There are a lot empty files in the recipe. You can delete some of them.
  • Other comments are below.

Comment thread esmvaltool/recipes/climatic_impact-drivers/recipe_impacts_map.yml Outdated
Comment thread esmvaltool/recipes/climatic_impact-drivers/recipe_impacts_map.yml Outdated
Comment thread esmvaltool/recipes/cmorizers/recipe_daily_era5.yml
Comment thread .zenodo.json
Comment thread esmvaltool/recipes/climatic_impact-drivers/recipe_impacts_map.yml Outdated
Comment thread esmvaltool/recipes/climatic_impact-drivers/recipe_impacts_map.yml Outdated
Comment thread esmvaltool/recipes/climatic_impact-drivers/recipe_impacts_timeseries.yml Outdated
Comment thread esmvaltool/diag_scripts/climatic_impact-drivers/multi_datasets_with_threshold.py Outdated
Comment thread doc/sphinx/source/recipes/recipe_climatic_impact-drivers.rst Outdated
Comment thread esmvaltool/diag_scripts/monitor/multi_datasets.py Outdated
@lauracasp

lauracasp commented Aug 13, 2026

Copy link
Copy Markdown
Author

Thank you for the review and the suggestions! These should be implemented now, except for the .zenodo.json file, I will do that tomorrow.
About the filenames: I changed the default filenames to include the threshold, but kept the folder structure as it is for now. Would you recommend to change the folder structure also? Moreover, would be great if you could also take a quick look at the other changes if they resolve the issues sufficiently.

@LisaBock

Copy link
Copy Markdown
Member

Thanks @lauracasp for all the changes!

Yes, I agree the folder structure is good as it is.

There are two more open comments regarding the files .zenodo.json and recipe_daily_era5.yml.

@lauracasp

Copy link
Copy Markdown
Author

@LisaBock thanks! Both of the comments should also be resolved now.

@LisaBock LisaBock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lauracasp ! Looks fine now to me!

@schlunma schlunma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lauracasp, looks great already! 🚀

I have a couple of (mostly minor) comments no the code, mostly about the figure caption and the ORAS5 dataset.

Comment thread doc/sphinx/source/recipes/recipe_climatic_impact-drivers.rst Outdated
Available recipes and diagnostics
---------------------------------

Recipes are stored in `recipes/climatic_impact-drivers`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Recipes are stored in `recipes/climatic_impact-drivers`
Recipes are stored in `recipes/climatic_impact_drivers`

To be consistent with other diagnostics, please use underscores in directory names

Comment on lines +30 to +31
A full list of all possible configuration options that can be specified in the
recipe is given at the beginning of the diagnostic script (see previous section).

@schlunma schlunma Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a relative easy way to link the docstring of you diagnostic script here. For example, this is done in #4565:

The important files here are

  • doc/sphinx/source/api/esmvaltool.diag_scripts.tropopause.cpt_hovmoeller.rst
  • doc/sphinx/source/api/esmvaltool.rst

You can link to the diagnostic in the recipe documentation via

:ref:`cpt_hovmoeller.py <api.esmvaltool.diag_scripts.tropopause.cpt_hovmoeller>`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do "max", "mean", and "min" mean in this context? From what I understand, you're calculating the number of days where 40C is exceeded for each year and grid cell, and then calculate the max, mean, and min across all grid cells? Is that correct? If yes, I would remove the "Average" (why does it show max if it says "Average") and "at some point" (suggests you're looking at a single grid cell) from the plot title.

Comment on lines +16 to +20
Supported pre-processing options
--------------------------------
- ``threshold_conversion``: Replace the given dataset by the count of
on how many days the data exceeds a
certian threshold at some point of time.

@schlunma schlunma Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you choose to put this into a separate options setting? I think it would be simpler to just add this to the other recipe configuration options below without the additional options layer.

Comment on lines +550 to +552
if cube.coords("day_of_year"):
msg = "Reusing already aggregated cube"
warnings.warn(msg, UserWarning, stacklevel=2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of our preprocessors may add this coordinate without calculating a threshold (e.g., daily_statistics), so this is rather dangerous. It might be better to check if the long name already contains "Average number of days per year on which the"

Comment thread esmvaltool/diag_scripts/climatic_impact-drivers/multi_datasets_with_threshold.py Outdated
Comment thread esmvaltool/diag_scripts/climatic_impact-drivers/multi_datasets_with_threshold.py Outdated
Comment thread esmvaltool/diag_scripts/climatic_impact-drivers/multi_datasets_with_threshold.py Outdated

plot_sst:
additional_datasets:
- {dataset: ORAS5, project: native6, mip: Omon, type: OBS6, version: 'CONS_v0.1', tier: 2, ugrid: false, var_name: tos, raw_name: sosstsst, raw_units: deg_C, supplementary_variables: [{short_name: areacello, skip: true},{short_name: sftof, skip: true}], horizontal_grid: /work/bd1083/b382555/extraobsraw/Tier2/ORAS5/grids/oras5_mesh_T.nc, reference_for_monitor_diags: true}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest either replacing ORAS5 with another dataset if possible or removing this variable altogether. Having absolute paths in a published recipe is never a good idea (the recipe won't run on other machines than Levante), and there is no way to use ORAS5 without explicitly specifying a horizontal grid (which IMHO is really bad):

https://github.com/ESMValGroup/ESMValCore/blob/936450c81d6b00ede72947310fc04e322c7654c1/esmvalcore/cmor/_fixes/native6/oras5.py#L126-L135

This comment applies to all appearances of ORAS5 in both recipes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had another look at this. Turns out the grid file can be given relative to the auxiliary_data_dir, which at least avoids having to specify absolute paths in recipes. Nevertheless, we would need to set up a proper ORAS5 directory in our OBS pool on Levante (and on other machines in the future, too) before we can include this so that this recipe can be run without special configuration settings @ESMValGroup/obs-maintainers. This should have been done before merging ESMValGroup/ESMValCore#2422.

lauracasp and others added 4 commits September 1, 2026 12:15
Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
…_with_threshold.py

Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
…_with_threshold.py

Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
…_with_threshold.py

Co-authored-by: Manuel Schlund <32543114+schlunma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved by scientific reviewer diagnostic requires new ESMValCore release A new release of ESMValCore is needed to solve this issue/merge this pull request..

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants