-
Notifications
You must be signed in to change notification settings - Fork 130
[develop] Integrate 'online-cmaq' branch into 'develop' branch: Part 1, jjob and ex- scripts #536
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
MichaelLueken
merged 3 commits into
ufs-community:develop
from
chan-hoo:feature/aqm_part1
Jan 17, 2023
Merged
Changes from all commits
Commits
Show all changes
3 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 |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| #!/bin/bash | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # This script adds extra species for air quality modeling (AQM) to the | ||
| # initial conditions (ICs). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Source the variable definitions file and the bash utility functions. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| . $USHdir/source_util_funcs.sh | ||
| source_config_for_task "cpl_aqm_parm" ${GLOBAL_VAR_DEFNS_FP} | ||
| . $USHdir/job_preamble.sh | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Save current shell options (in a global array). Then set new options | ||
| # for this script/function. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Get the full path to the file in which this script/function is located | ||
| # (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in | ||
| # which the file is located (scrfunc_dir). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) | ||
| scrfunc_fn=$( basename "${scrfunc_fp}" ) | ||
| scrfunc_dir=$( dirname "${scrfunc_fp}" ) | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Print message indicating entry into script. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| print_info_msg " | ||
| ======================================================================== | ||
| Entering script: \"${scrfunc_fn}\" | ||
| In directory: \"${scrfunc_dir}\" | ||
|
|
||
| This is the J-job script for the task that copies/fetches to a local | ||
| directory (either from disk or HPSS) the aqm boundary conditions from | ||
| which the model needs. | ||
| ========================================================================" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Set the name of and create the directory in which the output from this | ||
| # script will be placed (if it doesn't already exist). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| if [ $RUN_ENVIR = "nco" ]; then | ||
| export INPUT_DATA="${COMIN}" | ||
| else | ||
| export INPUT_DATA="${COMIN}${SLASH_ENSMEM_SUBDIR}/INPUT" | ||
| fi | ||
| mkdir_vrfy -p "${INPUT_DATA}" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Set the run directory | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}}" | ||
| mkdir_vrfy -p "${DATA}" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Call the ex-script for this J-job and pass to it the necessary variables. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| $SCRIPTSdir/exregional_aqm_ics.sh || \ | ||
| print_err_msg_exit "\ | ||
| Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Run job postamble. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| job_postamble | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Restore the shell options saved at the beginning of this script/function. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { restore_shell_opts; } > /dev/null 2>&1 | ||
|
|
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,108 @@ | ||
| #!/bin/bash | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # This script adds extra species for air quality modeling (AQM) to the | ||
| # lateral boundary conditions (LBCs) files. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Source the variable definitions file and the bash utility functions. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| . $USHdir/source_util_funcs.sh | ||
| source_config_for_task "task_get_extrn_lbcs|task_make_orog|task_make_lbcs|cpl_aqm_parm" ${GLOBAL_VAR_DEFNS_FP} | ||
| . $USHdir/job_preamble.sh | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Save current shell options (in a global array). Then set new options | ||
| # for this script/function. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Get the full path to the file in which this script/function is located | ||
| # (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in | ||
| # which the file is located (scrfunc_dir). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) | ||
| scrfunc_fn=$( basename "${scrfunc_fp}" ) | ||
| scrfunc_dir=$( dirname "${scrfunc_fp}" ) | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Print message indicating entry into script. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| print_info_msg " | ||
| ======================================================================== | ||
| Entering script: \"${scrfunc_fn}\" | ||
| In directory: \"${scrfunc_dir}\" | ||
|
|
||
| This is the J-job script for the task that copies/fetches to a local | ||
| directory (either from disk or HPSS) the aqm boundary conditions from | ||
| which the model needs. | ||
| ========================================================================" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Set the name of and create the directory in which the output from this | ||
| # script will be placed (if it doesn't already exist). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| if [ $RUN_ENVIR = "nco" ]; then | ||
| export INPUT_DATA="${COMIN}" | ||
| else | ||
| export INPUT_DATA="${COMIN}${SLASH_ENSMEM_SUBDIR}/INPUT" | ||
| fi | ||
| mkdir_vrfy -p "${INPUT_DATA}" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Set the run directory | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}}" | ||
| mkdir_vrfy -p "${DATA}" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Call the ex-script for this J-job and pass to it the necessary variables. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| $SCRIPTSdir/exregional_aqm_lbcs.sh || \ | ||
| print_err_msg_exit "\ | ||
| Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Run job postamble. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| job_postamble | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Restore the shell options saved at the beginning of this script/function. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { restore_shell_opts; } > /dev/null 2>&1 | ||
|
|
||
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,101 @@ | ||
| #!/bin/bash | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # This script runs BIAS-CORRECTION-O3. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
|
|
||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Source the variable definitions file and the bash utility functions. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| . $USHdir/source_util_funcs.sh | ||
| source_config_for_task "cpl_aqm_parm|task_run_post" ${GLOBAL_VAR_DEFNS_FP} | ||
| . $USHdir/job_preamble.sh | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Save current shell options (in a global array). Then set new options | ||
| # for this script/function. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Get the full path to the file in which this script/function is located | ||
| # (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in | ||
| # which the file is located (scrfunc_dir). | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) | ||
| scrfunc_fn=$( basename "${scrfunc_fp}" ) | ||
| scrfunc_dir=$( dirname "${scrfunc_fp}" ) | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Print message indicating entry into script. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| print_info_msg " | ||
| ======================================================================== | ||
| Entering script: \"${scrfunc_fn}\" | ||
| In directory: \"${scrfunc_dir}\" | ||
|
|
||
| This is the J-job script for the task that runs BIAS-CORRECTION-O3. | ||
| ========================================================================" | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Set the run directory. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}}" | ||
|
|
||
| export PARMaqm_utils="${PARMaqm_utils:-${HOMEdir}/sorc/AQM-utils/parm}" | ||
|
|
||
| TMP_STDAY=`${NDATE} -8760 ${PDY}${cyc} | cut -c1-8` # 1 year back | ||
| # The earliest day of training data is August 1 2020 | ||
| if [ ${TMP_STDAY} -le 20220810 ]; then | ||
| TMP_STDAY=20220810 | ||
| fi | ||
| export BC_STDAY=${BC_STDAY:-${TMP_STDAY}} | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Call the ex-script for this J-job and pass to it the necessary varia- | ||
| # bles. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| $SCRIPTSdir/exregional_bias_correction_o3.sh || \ | ||
| print_err_msg_exit "\ | ||
| Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Run job postamble. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| job_postamble | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| # Restore the shell options saved at the beginning of this script/func- | ||
| # tion. | ||
| # | ||
| #----------------------------------------------------------------------- | ||
| # | ||
| { restore_shell_opts; } > /dev/null 2>&1 | ||
|
|
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.