-
Notifications
You must be signed in to change notification settings - Fork 40
Switch global ocean forward steps to use graph.info from initial state, not mesh #203
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
Merged
xylar
merged 2 commits into
MPAS-Dev:master
from
xylar:pass_graph_info_through_initial_state
Aug 10, 2021
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,7 @@ def __init__(self, test_case, mesh, initial_condition, with_bgc): | |
| Whether to include biogeochemistry (BGC) in the initial condition | ||
| """ | ||
| if initial_condition not in ['PHC', 'EN4_1900']: | ||
| raise ValueError('Unknown initial_condition {}'.format( | ||
| initial_condition)) | ||
| raise ValueError(f'Unknown initial_condition {initial_condition}') | ||
|
|
||
| super().__init__(test_case=test_case, name='initial_state') | ||
| self.mesh = mesh | ||
|
|
@@ -51,7 +50,7 @@ def __init__(self, test_case, mesh, initial_condition, with_bgc): | |
| # generate the namelist, replacing a few default options | ||
| self.add_namelist_file(package, 'namelist.init', mode='init') | ||
| self.add_namelist_file( | ||
| package, 'namelist.{}'.format(initial_condition.lower()), | ||
| package, f'namelist.{initial_condition.lower()}', | ||
| mode='init') | ||
| if mesh.with_ice_shelf_cavities: | ||
| self.add_namelist_file(package, 'namelist.wisc', mode='init') | ||
|
|
@@ -115,25 +114,25 @@ def __init__(self, test_case, mesh, initial_condition, with_bgc): | |
|
|
||
| self.add_input_file( | ||
| filename='mesh.nc', | ||
| work_dir_target='{}/culled_mesh.nc'.format(mesh_path)) | ||
| work_dir_target=f'{mesh_path}/culled_mesh.nc') | ||
|
|
||
| self.add_input_file( | ||
| filename='critical_passages.nc', | ||
| work_dir_target='{}/critical_passages_mask_final.nc'.format( | ||
| mesh_path)) | ||
| work_dir_target=f'{mesh_path}/critical_passages_mask_final.nc') | ||
|
|
||
| self.add_input_file( | ||
| filename='graph.info', | ||
| work_dir_target='{}/culled_graph.info'.format(mesh_path)) | ||
| work_dir_target=f'{mesh_path}/culled_graph.info') | ||
|
|
||
| if mesh.with_ice_shelf_cavities: | ||
| self.add_input_file( | ||
| filename='land_ice_mask.nc', | ||
| work_dir_target='{}/land_ice_mask.nc'.format(mesh_path)) | ||
| work_dir_target=f'{mesh_path}/land_ice_mask.nc') | ||
|
|
||
| self.add_model_as_input() | ||
|
|
||
| for file in ['initial_state.nc', 'init_mode_forcing_data.nc']: | ||
| for file in ['initial_state.nc', 'init_mode_forcing_data.nc', | ||
| 'graph.info']: | ||
|
Comment on lines
-136
to
+135
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is one of two main change. |
||
| self.add_output_file(filename=file) | ||
|
|
||
| def setup(self): | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other main change.