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

Flexible splits #125

Merged
merged 12 commits into from
Apr 11, 2022
Merged

Flexible splits #125

merged 12 commits into from
Apr 11, 2022

Conversation

uhager
Copy link
Contributor

@uhager uhager commented Mar 26, 2022

Allow more flexible splitting.

Dimensions to split along are specified using output formatting to avoid mismatch between formatting and splitting.
Possible splits for GRIB files are all metadata fields, like shortName, typeOfLevel, date, time, step, forecastTime, etc.
Possible splits for NetCDF files are 'level', 'time', 'variable'. If the specified dimension (time, level) is not in the file, and exception will the thrown.

Output formatting can be given using an output template that contains formatting marks, or an output directory with an additional formatting string. If an output directory is specified without formatting, file type-specific defaults are used.

Let the user specify along which dimensions to split.

To avoid mismatches between the split dimensions and the output
file pattern, the split dimensions are extracted directly from
the output formatting.
@uhager uhager requested a review from alxmrs March 26, 2022 21:50
Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

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

Part 1 of this CL review. Will work on the next review now, but this should give you stuff to work on sooner.

weather_sp/README.md Outdated Show resolved Hide resolved
weather_sp/README.md Outdated Show resolved Hide resolved
weather_sp/README.md Show resolved Hide resolved
weather_sp/README.md Show resolved Hide resolved
weather_sp/README.md Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_name_utils.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_name_utils.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_name_utils.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_name_utils.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

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

Will look at the core of NetCDF splitting tomorrow.

weather_sp/splitter_pipeline/file_name_utils_test.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/splitter_pipeline/file_splitters.py Outdated Show resolved Hide resolved
weather_sp/README.md Outdated Show resolved Hide resolved
@uhager uhager requested a review from alxmrs April 8, 2022 23:44
weather_sp/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

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

LGTM!

@uhager uhager merged commit 61f0295 into main Apr 11, 2022
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.

2 participants