-
Notifications
You must be signed in to change notification settings - Fork 155
Yaml tables for ensembles and nests #1585
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
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4b2d74a
add the capability for an ensemble of nest to have its own data_table…
uramirez8707 448ac28
add the capability for an ensemble of nest to have its own diag_table…
uramirez8707 a1de22c
Minor documentation updates
uramirez8707 34b50c7
minor corrections to the logic
uramirez8707 f2ea7f6
add a test to check that the code fails when both diag_table.yaml and…
uramirez8707 1093e13
add the capability for an ensemble or nest to have its own field_tabl…
uramirez8707 58156c2
fix line length limit and remove trailing whitespace
uramirez8707 d38b76c
Merge branch 'main' of github.com:NOAA-GFDL/FMS into ensemble_yaml
uramirez8707 1698bbe
Modify to the diag manager test to be more robust
uramirez8707 0e8c359
Fix logic when checking if multiple tables exist
uramirez8707 1b2e050
Add documentation, use filename macro instead of harcoding length
uramirez8707 a440d01
include FMS_FILE_LEN in data_override_mod
uramirez8707 e0ddce0
move the failure test
uramirez8707 32db3c0
refactor unit test to hopefully prevent unit test failures
uramirez8707 ee11233
Merge branch 'main' of github.com:NOAA-GFDL/FMS into ensemble_yaml
uramirez8707 f7e0b9b
revert unwanted changes in some data_override test scripts
uramirez8707 8875194
one more revert
uramirez8707 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
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
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 |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| #!/bin/sh | ||
|
|
||
| #*********************************************************************** | ||
| #* GNU Lesser General Public License | ||
| #* | ||
| #* This file is part of the GFDL Flexible Modeling System (FMS). | ||
| #* | ||
| #* FMS is free software: you can redistribute it and/or modify it under | ||
| #* the terms of the GNU Lesser General Public License as published by | ||
| #* the Free Software Foundation, either version 3 of the License, or (at | ||
| #* your option) any later version. | ||
| #* | ||
| #* FMS is distributed in the hope that it will be useful, but WITHOUT | ||
| #* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| #* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| #* for more details. | ||
| #* | ||
| #* You should have received a copy of the GNU Lesser General Public | ||
| #* License along with FMS. If not, see <http://www.gnu.org/licenses/>. | ||
| #*********************************************************************** | ||
| # | ||
| # Copyright (c) 2019-2021 Ed Hartnett, Uriel Ramirez, Seth Underwood | ||
|
|
||
| # Set common test settings. | ||
| . ../test-lib.sh | ||
|
|
||
| output_dir | ||
| [ ! -d "INPUT" ] && mkdir -p "INPUT" | ||
|
|
||
| cat <<_EOF > data_table.ens_01.yaml | ||
| data_table: | ||
| - grid_name: OCN | ||
| fieldname_in_model: runoff | ||
| override_file: | ||
| - fieldname_in_file: runoff | ||
| file_name: INPUT/runoff.daitren.clim.1440x1080.v20180328_ens_01.nc | ||
| interp_method: none | ||
| factor: 1.0 | ||
| _EOF | ||
|
|
||
| cat <<_EOF > data_table.ens_02.yaml | ||
| data_table: | ||
| - grid_name: OCN | ||
| fieldname_in_model: runoff | ||
| override_file: | ||
| - fieldname_in_file: runoff | ||
| file_name: INPUT/runoff.daitren.clim.1440x1080.v20180328_ens_02.nc | ||
| interp_method: none | ||
| factor: 1.0 | ||
| _EOF | ||
|
|
||
| cat <<_EOF > input.nml | ||
| &data_override_nml | ||
| use_data_table_yaml = .True. | ||
| / | ||
|
|
||
| &test_data_override_ongrid_nml | ||
| test_case = 5 | ||
| / | ||
|
|
||
| &ensemble_nml | ||
| ensemble_size = 2 | ||
| / | ||
| _EOF | ||
|
|
||
| #The test only runs with yaml | ||
| if [ -z $parser_skip ]; then | ||
| for KIND in r4 r8 | ||
| do | ||
| rm -rf INPUT/. | ||
| test_expect_success "test_data_override with two ensembles -yaml (${KIND})" ' | ||
| mpirun -n 12 ../test_data_override_ongrid_${KIND} | ||
| ' | ||
| done | ||
| fi | ||
|
|
||
| cat <<_EOF > data_table.yaml | ||
| data_table: | ||
| - grid_name: OCN | ||
| fieldname_in_model: runoff | ||
| override_file: | ||
| - fieldname_in_file: runoff | ||
| file_name: INPUT/runoff.daitren.clim.1440x1080.v20180328_ens_02.nc | ||
| interp_method: none | ||
| factor: 1.0 | ||
| _EOF | ||
|
|
||
| test_expect_failure "test_data_override with both data_table.yaml and data_table.ens_xx.yaml files" ' | ||
| mpirun -n 12 ../test_data_override_ongrid_${KIND} | ||
| ' | ||
| rm -rf INPUT | ||
| test_done |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.