-
Notifications
You must be signed in to change notification settings - Fork 50
add incr-update with IAU #129
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 2 commits
Commits
Show all changes
5 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,30 @@ pwd=$(pwd) | |
| # Utilities | ||
| export NLN=${NLN:-"/bin/ln -sf"} | ||
|
|
||
| # function that converts a soca incr to something MOM6 is happy with | ||
| function socaincr2mom6 { | ||
| incr=$1 | ||
| bkg=$2 | ||
| grid=$3 | ||
| incr_out=$4 | ||
|
|
||
| scratch=scratch_socaincr2mom6 | ||
| mkdir -p $scratch | ||
| cd $scratch | ||
|
|
||
| echo "at socaincr2mom6" $bkg $grid | ||
|
|
||
| cp $incr inc.nc # TODO: use accumulated incremnet, not outerloop intermediates | ||
| ncks -A -C -v h $bkg inc.nc # Replace h incrememnt (all 0's) by h background (expected by MOM) | ||
| ncrename -d zaxis_1,Layer inc.nc # Rename zaxis_1 to Layer | ||
| ncks -A -C -v Layer $bkg inc.nc # Replace dimension-less Layer with dimensional Layer | ||
| mv inc.nc inc_tmp.nc # ... dummy copy | ||
| ncwa -O -a Time inc_tmp.nc inc.nc # Remove degenerate Time dimension | ||
| ncks -A -C -v lon $grid inc.nc # Add longitude | ||
| ncks -A -C -v lat $grid inc.nc # Add latitude | ||
| mv inc.nc $incr_out | ||
| } | ||
|
|
||
| function bump_vars() | ||
| { | ||
| tmp=$(ls -d ${1}_* ) | ||
|
|
@@ -108,6 +132,13 @@ concatenate_bump 'bump3d' | |
| clean_yaml var.yaml | ||
| $APRUN_SOCAANAL $JEDI_BIN/soca_var.x var.yaml 2>var.err | ||
|
|
||
|
|
||
| # increment update for MOM6 iau | ||
| # Make sure the last (most recent) increment file put into socaincr2mom6 as $1 | ||
|
Contributor
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. I don't know what this comment means ...
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. updated |
||
| ( socaincr2mom6 `ls -t ${DATA}/Data/ocn.*iter*.incr* | head -1` ${DATA}/INPUT/MOM.res.nc ${DATA}/soca_gridspec.nc ${DATA}/Data/inc.nc ) | ||
|
hyunchul386 marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
|
|
||
| ################################################################################ | ||
| set +x | ||
| if [ $VERBOSE = "YES" ]; then | ||
|
|
||
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
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.
remove comment once you point to the total increment.
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.
updated
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.
doesn't look like it, I still see
# TODO: use accumulated incremnet, not outerloop intermediates... which presumably was done