-
Notifications
You must be signed in to change notification settings - Fork 87
Add inline post option to the SRW App #538
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 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
81bf5e0
Add write_dopost for inline post
chan-hoo b5f86a5
Remove unnecessary swp file
chan-hoo a381732
Add dots to write_dopost
chan-hoo 28a92f6
Add inline_post to run_fcst script
chan-hoo 929692f
Turn off run_post when true
chan-hoo 120cfe0
Add postprod to run_fcst script
chan-hoo 4b080cf
Match format of output files
chan-hoo b922d98
Update workflow template for inline post
chan-hoo 1ad5d3b
Add a WE2E test for inline post
chan-hoo 5215e70
Add header to we2e config file
chan-hoo 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 |
|---|---|---|
|
|
@@ -250,8 +250,6 @@ Cannot create symlink because target does not exist: | |
| target = \"$target\"" | ||
| fi | ||
|
|
||
|
|
||
|
|
||
| relative_or_null="" | ||
| if [ "${RUN_TASK_MAKE_OROG}" = "TRUE" ] && [ "${MACHINE}" != "WCOSS_CRAY" ] ; then | ||
| relative_or_null="--relative" | ||
|
|
@@ -290,7 +288,6 @@ Cannot create symlink because target does not exist: | |
| target = \"$target\"" | ||
| fi | ||
|
|
||
|
|
||
| # | ||
| # If using the FV3_HRRR physics suite, there are two files (that contain | ||
| # statistics of the orography) that are needed by the gravity wave drag | ||
|
|
@@ -317,7 +314,6 @@ Cannot create symlink because target does not exist: | |
|
|
||
| fi | ||
|
|
||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
|
|
@@ -444,6 +440,27 @@ ln_vrfy -sf ${relative_or_null} ${DATA_TABLE_FP} ${run_dir} | |
| ln_vrfy -sf ${relative_or_null} ${FIELD_TABLE_FP} ${run_dir} | ||
| ln_vrfy -sf ${relative_or_null} ${NEMS_CONFIG_FP} ${run_dir} | ||
|
|
||
|
|
||
| if [ ${WRITE_DOPOST} = "TRUE" ]; then | ||
| cp_vrfy ${EMC_POST_DIR}/parm/nam_micro_lookup.dat ./eta_micro_lookup.dat | ||
| if [ ${USE_CUSTOM_POST_CONFIG_FILE} = "TRUE" ]; then | ||
| post_config_fp="${CUSTOM_POST_CONFIG_FP}" | ||
| print_info_msg " | ||
| ==================================================================== | ||
| CUSTOM_POST_CONFIG_FP = \"${CUSTOM_POST_CONFIG_FP}\" | ||
| ====================================================================" | ||
| else | ||
| post_config_fp="${EMC_POST_DIR}/parm/postxconfig-NT-fv3lam.txt" | ||
| print_info_msg " | ||
| ==================================================================== | ||
| post_config_fp = \"${post_config_fp}\" | ||
| ====================================================================" | ||
| fi | ||
| cp_vrfy ${post_config_fp} ./postxconfig-NT_FH00.txt | ||
| cp_vrfy ${post_config_fp} ./postxconfig-NT.txt | ||
| cp_vrfy ${EMC_POST_DIR}/parm/params_grib2_tbl_new . | ||
| fi | ||
|
|
||
| if [ "${DO_ENSEMBLE}" = TRUE ]; then | ||
| set_FV3nml_stoch_params cdate="$cdate" || print_err_msg_exit "\ | ||
| Call to function to create the ensemble-based namelist for the current | ||
|
|
@@ -507,6 +524,46 @@ $APRUN ${FV3_EXEC_FP} || print_err_msg_exit "\ | |
| Call to executable to run FV3-LAM forecast returned with nonzero exit | ||
| code." | ||
| # | ||
| # Only for inline post, create the directory where post-processing output | ||
| # are stored (postprd_dir) | ||
| if [ ${WRITE_DOPOST} = "TRUE" ]; then | ||
| if [ "${RUN_ENVIR}" = "nco" ]; then | ||
| COMOUT="${COMOUT_BASEDIR}/$RUN.$PDY/$cyc${SLASH_ENSMEM_SUBDIR}" | ||
| postprd_dir="$COMOUT" | ||
| else | ||
| postprd_dir="${run_dir}/postprd" | ||
| fi | ||
| mkdir_vrfy -p "${postprd_dir}" | ||
|
|
||
| cd_vrfy ${postprd_dir} | ||
|
|
||
| yyyymmdd=${cdate:0:8} | ||
| hh=${cdate:8:2} | ||
| cyc=$hh | ||
| tmmark="tm00" | ||
| fmn="00" | ||
|
|
||
| for fhr in $(seq -f "%02g" 0 ${FCST_LEN_HRS}); do | ||
| echo $fhr | ||
|
Collaborator
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. Remove echo?
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. I'll fix this in a new PR for the nco mode. |
||
| post_time=$( date --utc --date "${yyyymmdd} ${hh} UTC + ${fhr} hours + ${fmn} minutes" "+%Y%m%d%H%M" ) | ||
| post_mn=${post_time:10:2} | ||
| post_mn_or_null="" | ||
| post_fn_suffix="GrbF${fhr}" | ||
| post_renamed_fn_suffix="f0${fhr}${post_mn_or_null}.${tmmark}.grib2" | ||
|
|
||
| basetime=$( date --date "$yyyymmdd $hh" +%y%j%H%M ) | ||
| symlink_suffix="_${basetime}f0${fhr}${post_mn}" | ||
| fids=( "bgdawp" "bgrd3d" ) | ||
| for fid in "${fids[@]}"; do | ||
| FID="${fid^^}" | ||
| post_orig_fn="${FID}.${post_fn_suffix}" | ||
| post_renamed_fn="${NET}.t${cyc}z.${fid}${post_renamed_fn_suffix}" | ||
| mv_vrfy ../${post_orig_fn} ${post_renamed_fn} | ||
| ln_vrfy -fs ${post_renamed_fn} ${FID}${symlink_suffix} | ||
| done | ||
| done | ||
| fi | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Print message indicating successful completion of script. | ||
|
|
||
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,18 @@ | ||
| RUN_ENVIR="community" | ||
| PREEXISTING_DIR_METHOD="rename" | ||
|
|
||
| PREDEF_GRID_NAME="RRFS_CONUS_25km" | ||
| WRITE_DOPOST="TRUE" | ||
| QUILTING="TRUE" | ||
|
|
||
| CCPP_PHYS_SUITE="FV3_GFS_v15p2" | ||
| FCST_LEN_HRS="06" | ||
| LBC_SPEC_INTVL_HRS="3" | ||
|
|
||
| DATE_FIRST_CYCL="20190701" | ||
| DATE_LAST_CYCL="20190701" | ||
| CYCL_HRS=( "00" ) | ||
|
|
||
| EXTRN_MDL_NAME_ICS="FV3GFS" | ||
| EXTRN_MDL_NAME_LBCS="FV3GFS" | ||
| USE_USER_STAGED_EXTRN_FILES="TRUE" |
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
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.
I think
cycis being used here before being set (below) since I don't see it set in JREGIONAL_RUN_FCST or FV3LAM_wflow.xml. Maybe this was missed because the WE2E test is in community mode.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.
@gsketefian, I'll fix this in a new PR for the nco mode.