Skip to content
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

Improve rose edit and simplify include files #1055

Merged
merged 7 commits into from
Jan 23, 2025
Merged

Conversation

jfrost-mo
Copy link
Member

@jfrost-mo jfrost-mo commented Jan 17, 2025

This is a bit of a monster PR, however it is mostly replacements or automatically generated code. In this pull request I've done the following:

  1. Renamed the MODEL_NUMBER internal variable to MODEL_IDENTIFIERS to reflect its changing role.
  2. Created a small script to generate the rose-meta.conf. This allows doing loops and such that make it much easier to make a change that has to be repeated many times, like in the per-model configuration, and opens the possibility to automatically pick up include files in future.
  3. Removed many obsolete settings from rose edit.
  4. Improved the help text on many settings.
  5. Notably I've change how the variable lists work, so they are now just a simple 1D list of strings, rather than a 2D table. This allows us to make use of the variable translation we now have.
  6. Converted all include files to use this new variable format.

As the rose-meta.conf is now automatically generated, I wouldn't bother looking too hard at it. Instead look at the rose-meta.conf.jinja2, which it is generated from.

Contribution checklist

Aim to have all relevant checks ticked off before merging. See the developer's guide for more detail.

  • Documentation has been updated to reflect change.
  • New code has tests, and affected old tests have been updated.
  • All tests and CI checks pass.
  • Ensured the pull request title is descriptive.
  • Conda lock files have been updated if dependencies have changed.
  • Attributed any Generative AI, such as GitHub Copilot, used in this PR.
  • Marked the PR as ready to review.

@jfrost-mo jfrost-mo added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request cleanup Non-functional improvement labels Jan 17, 2025
@jfrost-mo jfrost-mo self-assigned this Jan 17, 2025
@jfrost-mo

This comment was marked as resolved.

Copy link
Contributor

github-actions bot commented Jan 17, 2025

Coverage

@jfrost-mo jfrost-mo force-pushed the improve_rose_edit branch 3 times, most recently from 82e818c to fada613 Compare January 17, 2025 16:37
@jfrost-mo jfrost-mo marked this pull request as ready for review January 17, 2025 16:50
@jfrost-mo jfrost-mo force-pushed the data_loading_improvements branch 2 times, most recently from 79ea3e7 to 645ccac Compare January 21, 2025 12:44
@jfrost-mo jfrost-mo mentioned this pull request Jan 21, 2025
7 tasks
Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

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

Looks good from a science perspective. A few minor comments where a bit more clarity might be needed. Also one that might be a bit more work on potential of streamlining for UX.

cset-workflow/includes/basic_qq_plot.cylc Outdated Show resolved Hide resolved
cset-workflow/meta/diagnostics/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/diagnostics/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/diagnostics/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/diagnostics/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/rose-meta.conf Show resolved Hide resolved
cset-workflow/meta/rose-meta.conf Outdated Show resolved Hide resolved
cset-workflow/meta/rose-meta.conf Outdated Show resolved Hide resolved
cset-workflow/meta/rose-meta.conf.jinja2 Outdated Show resolved Hide resolved
Base automatically changed from data_loading_improvements to main January 23, 2025 11:07
This reflects the non-sequential nature of the variable, and how it will soon
contain multiple values.
This change switches to a generated rose-meta.conf, so it is much easier
to maintain. It also removes a number of obsolete keys, updates descriptions,
makes analysis_offset and analysis_period per-model, and removes
the s/crimes against rose edit/mapping between model and fieldname/.

One of the biggest changes is the move to a simple list for model fields
instead of the complicated table affair we had before.

Fixes #667
Fixes #808
Fixes #817
Fixes #859

Update example rose-suite.conf
This will cause it to be marked as such on GitHub, and not clutter up
pull request diffs.
This allows comparing different variables from the same plot.
Most of the time this is what you want. You only need to set the offset
if data isn't output on the first timestep.
Use PT1H as that is what a lot of data is output at. Urban data is often
15 minutely, but is sufficiently niche to require changing an accessible
setting.
@jfrost-mo jfrost-mo requested a review from daflack January 23, 2025 12:54
Copy link
Contributor

@daflack daflack left a comment

Choose a reason for hiding this comment

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

Looks good and happy to approve, one minor point of clarification (not sure if you are missing something or not).

Extra thought, which I am happy to be put in a different issue if felt needed: in the q-q plot would that mean we would be specifying the same variable twice as we have variable A and variable B for the different models?

cset-workflow/rose-suite.conf.example Show resolved Hide resolved
@jfrost-mo
Copy link
Member Author

Indeed, if you wanted to compare the same variable between different models, you would have to put the variable name in both. It would be good to have a chat about it during the quest next week, to clarify what is desired.

Also tweak a few help descriptions.
@jfrost-mo jfrost-mo removed the request for review from Sylviabohnenstengel January 23, 2025 14:38
@jfrost-mo jfrost-mo merged commit a54f24c into main Jan 23, 2025
8 checks passed
@jfrost-mo jfrost-mo deleted the improve_rose_edit branch January 23, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cleanup Non-functional improvement documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants