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

Ensemble ingestation with read operator #157

Merged
merged 4 commits into from
Aug 2, 2023
Merged

Conversation

jfrost-mo
Copy link
Member

@jfrost-mo jfrost-mo commented Jul 11, 2023

Improves the read operator so it can read from multiple files, and correctly tag ensemble data with a realization coordinate.

Still to do:

  • Add tests of new functionality
  • Add documentation of new functionality
  • Allow more generic templating for where the ensemble number is in the name? Depends if this is different for partners. We'll leave this for now as it is basically impossible to know all the naming conventions until partners actually use it, and its an easy thing to change.
  • Give it another review myself, so I can remember what is actually in it.

Fixes #133

@jfrost-mo jfrost-mo added the enhancement New feature or request label Jul 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2023

Coverage

@jfrost-mo jfrost-mo marked this pull request as ready for review July 13, 2023 13:38
@jfrost-mo jfrost-mo requested review from jwarner8 and removed request for jwarner8 July 13, 2023 15:12
@jfrost-mo jfrost-mo mentioned this pull request Jul 13, 2023
@jfrost-mo jfrost-mo force-pushed the ensemble-ingestation branch 2 times, most recently from fad32a0 to 69df812 Compare July 13, 2023 15:59
@jfrost-mo jfrost-mo requested a review from jwarner8 July 13, 2023 16:03
src/CSET/operators/read.py Outdated Show resolved Hide resolved
@jfrost-mo jfrost-mo force-pushed the ensemble-ingestation branch 2 times, most recently from 36c631c to 9438a45 Compare July 14, 2023 09:36
@jfrost-mo jfrost-mo mentioned this pull request Jul 14, 2023
2 tasks
@jfrost-mo
Copy link
Member Author

I think this PR is ready to merge, but I've sort of forgotten what is in it over the past two weeks, and want to refamiliarise myself with it first.

@jfrost-mo jfrost-mo self-assigned this Aug 1, 2023
src/CSET/operators/filters.py Outdated Show resolved Hide resolved
src/CSET/operators/filters.py Outdated Show resolved Hide resolved
src/CSET/operators/read.py Show resolved Hide resolved
src/CSET/recipes/ensemble_3_hour_air_temp.yaml Outdated Show resolved Hide resolved
Allow read_cubes operator to read from multiple files

This is done by giving the path to a directory. A shell wildcard
can also be given to match only specific files there.

Add reading code for ensemble data

Reads ensemble data, and will add the member number/realization from
the file name if it is missing.

read_cubes now reads ensemble data & adds realization

Actually add realization to deterministic cubes

Make realization number detection more robust

Expand documentation of read_cubes operator

Simplify ensemble realization retrieval from file name

The naming conventions aren't really knowable until partners actually
use it.
Add test stubs for ensemble reading

Added tests for ensemble loading with read_cube

Also added some ensemble test data which is a 2 member ensemble
cropped down to just Exeter.

Test read_cubes with ensemble and constraint

Test fieldsfile ensemble filename parser
@jfrost-mo
Copy link
Member Author

I've had a look back over and rebased this PR, so with your approval @jwarner8 it is ready to merge.

Copy link
Contributor

@jwarner8 jwarner8 left a comment

Choose a reason for hiding this comment

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

Great work on this PR!

@jfrost-mo jfrost-mo merged commit 98b8d50 into main Aug 2, 2023
5 checks passed
@jfrost-mo jfrost-mo deleted the ensemble-ingestation branch August 2, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Read forecasts split into multiple files
2 participants