-
Notifications
You must be signed in to change notification settings - Fork 5
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
Complete support for time step modification #58
Merged
dafyddstephenson
merged 10 commits into
CWorthy-ocean:main
from
dafyddstephenson:fix_time_step
Sep 4, 2024
Merged
Complete support for time step modification #58
dafyddstephenson
merged 10 commits into
CWorthy-ocean:main
from
dafyddstephenson:fix_time_step
Sep 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Move DataSource out of base/input_dataset.py and into dedicated module base/datasource.py - Expand DataSource to check if location is a directory or local repository - Rename AdditionalCode.source_repo to AdditionalCode.source and change type to DataSource - Make checkout_target an optional attribute to AdditionalCode (default None) - Wrap existing AdditionalCode.get() inside conditional check for 'url','repository' - Rename 'source' and 'source_repo' to 'location' in Case.from_blueprint, Case.persist, and cstar_blueprint_roms_marbl_example.yaml Still todo: - update docstrings - update example notebook
- update AdditionalCode.get() to support copying local files - swap out os for pathlib in additional_code.py and datasource.py - fix typo in input_dataset.py - minor changes to case.py with additional type checking
…st and modify/run with the copy (roms/component.py) - Update pre-commit file to replace remaining instance of cstar_ocean with cstar - Update InputDataset.local_path to point to the symlink created by InputDataset.get() after call (if dataset is local) - Update test_roms_marb_example.py to also include local paths to additional code in 2nd case
…ional code file support - Rename "source" (DataSource) to "location" (str) in __init__ for AdditionalCode and InputDataset. The method uses this arg to create the "source" attribute using source=DataSource(location). This avoids requiring the user to create and supply a DataSource object which itself is just instantiated from a location string. - Rename "local_path" to "local_dir" in AdditionalCode.get to avoid confusion with AdditionalCode.local_path - Add an attribute AdditionalCode.modified_namelists to keep track of edited namelists based on templates - Add logic in AdditionalCode.get() that makes copies of any namelist files with the suffix _TEMPLATE to a file without this suffix and adds it to AdditionalCode.modified_namelists, e.g.: AdditionalCode.namelists = ["roms.in_TEMPLATE",] -> AdditionalCode.modified_namelists = ["roms.in",] - Update ROMSComponent.pre_run() and ROMSComponent.run() to reflect this namelist handling - Minor changes to __str__ in component.py (addressing inconsistencies) - Update cstar_example_notebook.ipynb to reflect all of the above changes
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…amelists) returns False; update error message in datasource.py to 'file or directory'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Branched from #55 , do not merge until merging PR55.
Closes #57 .
This PR:
roms/component.py
to replace this placeholder string withROMSComponent.time_step