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

Fixes to search_data_catalogs #92

Merged
merged 14 commits into from Nov 28, 2022
Merged

Fixes to search_data_catalogs #92

merged 14 commits into from Nov 28, 2022

Conversation

RondeauG
Copy link
Contributor

@RondeauG RondeauG commented Sep 28, 2022

Pull Request Checklist:

  • pre-commit hooks are installed/active in my local clone ($ pre-commit install)
  • This PR addresses an already opened issue (for bug fixes / features)
  • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • If a merge request has been made in parallel to this PR in xscen-notebooks, it is merged and the submodules have been updated.
  • HISTORY.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

  • search_data_catalogs no longer crashes if it finds nothing. It now returns an empty dictionary and a warning.
  • _dispatch_historical_to_future no longer duplicates fixed fields if they exist in both periods.
  • If a fixed field is missing from the search, it is looked for in other experiments or members.

Does this PR introduce a breaking change?

Other information:

@RondeauG RondeauG changed the title search_data_catalogs no longer crashes if it finds nothing Fixes to search_data_catalogs Sep 28, 2022
@RondeauG
Copy link
Contributor Author

RondeauG commented Oct 3, 2022

Question:
I have 3 members for the same model: 'r1i1p1f1_NorESM2-MM_gn_NCC', 'r2i1p1f1_NorESM2-MM_gn_NCC', and 'r3i1p1f1_NorESM2-MM_gn_NCC'. For some reason, r1, r2, and r3 all have orog and areacella, but only r2 has sftlf.

Should we provide an option to broadcast fixed fields to other members or is that too dangerous?

@Zeitsperre
Copy link
Contributor

Should we provide an option to broadcast fixed fields to other members or is that too dangerous?

I can say that for CORDEX-related datasets, this is how the fixed field data is presented between experiment runs. If you feel it's dangerous, you could add warnings when this is being assumed.

Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

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

I have a few changes I want to make to _dispatch_historical_future from an issue encountered by Chris. I could do them here, but it can also wait for another PR.

xscen/extract.py Outdated Show resolved Hide resolved
@RondeauG RondeauG marked this pull request as ready for review November 11, 2022 18:51
@RondeauG RondeauG mentioned this pull request Nov 18, 2022
14 tasks
# Conflicts:
#	HISTORY.rst
@RondeauG RondeauG merged commit d78cb02 into main Nov 28, 2022
@RondeauG RondeauG deleted the fix-42-81 branch November 28, 2022 21:35
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.

Manage fixed fields in both historical and future periods search_data_catalog crashes if the result is empty
4 participants