Skip to content

Radiation budget: labelling plots with alias#4292

Open
NParsonsMO wants to merge 11 commits intomainfrom
4291-amend-radiation-budget-to-use-alias
Open

Radiation budget: labelling plots with alias#4292
NParsonsMO wants to merge 11 commits intomainfrom
4291-amend-radiation-budget-to-use-alias

Conversation

@NParsonsMO
Copy link
Copy Markdown
Contributor

@NParsonsMO NParsonsMO commented Dec 17, 2025

Changing the f-strings in the plot titles to use a dataset's alias instead of its name.


Before you get started

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

New or updated data reformatting script


To help with the number of pull requests:

@NParsonsMO NParsonsMO self-assigned this Dec 17, 2025
@NParsonsMO NParsonsMO linked an issue Dec 17, 2025 that may be closed by this pull request
@NParsonsMO NParsonsMO changed the title Amending plot f-strings Radiation budget: labelling plots with alias Dec 17, 2025
@NParsonsMO
Copy link
Copy Markdown
Contributor Author

NParsonsMO commented Dec 17, 2025

Output before change:
image

@NParsonsMO
Copy link
Copy Markdown
Contributor Author

Output after change:
image

@NParsonsMO NParsonsMO requested a review from ehogan December 17, 2025 15:34
@NParsonsMO
Copy link
Copy Markdown
Contributor Author

@ehogan I'm not sure if I should change the picture in the documentation? Or mention alias in there somewhere?

@valeriupredoi
Copy link
Copy Markdown
Contributor

@ehogan yet again GH notifies me of a PR that's being created by a MO bod, though I'm neither assigned nor requested as a reviewer - heck, am not even of an owner of the code that's being changed; I noticed this previously with your guys' work on RTW, do you folks at the MO have a config setting that says "ping V everytime we open a PR"? 🤣

@ehogan
Copy link
Copy Markdown
Contributor

ehogan commented Dec 17, 2025

@ehogan yet again GH notifies me of a PR that's being created by a MO bod, though I'm neither assigned nor requested as a reviewer - heck, am not even of an owner of the code that's being changed; I noticed this previously with your guys' work on RTW, do you folks at the MO have a config setting that says "ping V everytime we open a PR"? 🤣

🤣 Not to my knowledge! 🤪 I can't see why you would have been notified?! 🤯

@NParsonsMO NParsonsMO marked this pull request as ready for review January 5, 2026 08:10
Copy link
Copy Markdown
Contributor

@ehogan ehogan left a comment

Choose a reason for hiding this comment

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

Thanks @NParsonsMO 🥳

@@ -294,6 +294,7 @@ def plot_data(
model_dataset,
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.

model_dataset is now no longer used in plot_data; would it be possible to remove it, please? 😊

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I also noticed that I hadn't added the new variable to the docstring, so have now done so:

d35f17c

all_model_data = derive_additional_variables(unordered_model_data)
model_data = order_data(all_model_data, obs_names, obs_unit)
model_period = f"{group[0]['start_year']} - {group[0]['end_year']}"
model_label = group[0]["alias"]
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.

If I remember correctly, we wanted to affect alias via CMEW by adding alias to a given dataset in the recipe. I'm debating whether we should, now that you have shared before and after images showing the introduction of the alias, specify the alias in the dataset so that the images are the same as before? 🤔

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.

Also, and this has nothing to do with what you have done, but group[0] is a bit dubious. An assumption has been made that the start_year and end_year from the first variable in the list (for a given dataset) is the same as all the others. This might be a reasonable assumption to make! We should either add a comment stating this assumption, or do a check to ensure that these values are consistent across variables (they really should be, and I don't know what we would do if they weren't!).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If I remember correctly, we wanted to affect alias via CMEW by adding alias to a given dataset in the recipe. I'm debating whether we should, now that you have shared before and after images showing the introduction of the alias, specify the alias in the dataset so that the images are the same as before? 🤔

b7e7b8e

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Also, and this has nothing to do with what you have done, but group[0] is a bit dubious. An assumption has been made that the start_year and end_year from the first variable in the list (for a given dataset) is the same as all the others. This might be a reasonable assumption to make! We should either add a comment stating this assumption, or do a check to ensure that these values are consistent across variables (they really should be, and I don't know what we would do if they weren't!).

Done within the function:

1feb6ba

Do you want it documented elsewhere as well?

@ehogan
Copy link
Copy Markdown
Contributor

ehogan commented Mar 16, 2026

@ehogan I'm not sure if I should change the picture in the documentation? Or mention alias in there somewhere?

Good question. I wonder whether it's worth adding something to ESMValTool documentation: Radiation Budget: User settings in recipe to mention that alias can be added to the dataset? The only documentation I can find about what should be in this section is in the template, and it doesn't mention "settings for dataset" but hopefully it's ok to add something about that here? 🤔

@NParsonsMO
Copy link
Copy Markdown
Contributor Author

NParsonsMO commented Mar 20, 2026

@ehogan I'm not sure if I should change the picture in the documentation? Or mention alias in there somewhere?

Good question. I wonder whether it's worth adding something to ESMValTool documentation: Radiation Budget: User settings in recipe to mention that alias can be added to the dataset? The only documentation I can find about what should be in this section is in the template, and it doesn't mention "settings for dataset" but hopefully it's ok to add something about that here? 🤔

I put it in "User settings in recipe".

e172b65

@NParsonsMO NParsonsMO requested a review from ehogan March 20, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Amend radiation budget slightly to label plots with an alias

3 participants