From 650c4e7fe5d48e4092cf093b2ddc3aa2f071acb0 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 09:39:21 -0600 Subject: [PATCH 1/8] Fix indentation. --- scripts/exregional_make_ics.sh | 39 +++++++++++++++++++-------------- scripts/exregional_make_lbcs.sh | 35 +++++++++++++++++------------ 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 04cc14652..f62c37a84 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -102,26 +102,33 @@ cd_vrfy $workdir varmap_file="" case "${CCPP_PHYS_SUITE}" in - -"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional" | "FV3_GFS_v16beta" | \ -"FV3_GFS_v15p2" | "FV3_CPT_v0" ) - varmap_file="GFSphys_var_map.txt" - ;; -"FV3_GSD_v0" | "FV3_GSD_SAR" | \ -"FV3_RRFS_v1beta" ) - if [ "${EXTRN_MDL_NAME_ICS}" = "RAPX" ] || [ "${EXTRN_MDL_NAME_ICS}" = "HRRRX" ]; then +# + "FV3_GFS_2017_gfdlmp" | \ + "FV3_GFS_2017_gfdlmp_regional" | \ + "FV3_GFS_v16beta" | \ + "FV3_GFS_v15p2" | "FV3_CPT_v0" ) + varmap_file="GFSphys_var_map.txt" + ;; +# + "FV3_GSD_v0" | \ + "FV3_GSD_SAR" | \ + "FV3_RRFS_v1beta" ) + if [ "${EXTRN_MDL_NAME_ICS}" = "RAPX" ] || \ + [ "${EXTRN_MDL_NAME_ICS}" = "HRRRX" ]; then varmap_file="GSDphys_var_map.txt" - elif [ "${EXTRN_MDL_NAME_ICS}" = "NAM" ] || [ "${EXTRN_MDL_NAME_ICS}" = "FV3GFS" ] || \ - [ "${EXTRN_MDL_NAME_ICS}" = "GSMGFS" ]; then + elif [ "${EXTRN_MDL_NAME_ICS}" = "NAM" ] || \ + [ "${EXTRN_MDL_NAME_ICS}" = "FV3GFS" ] || \ + [ "${EXTRN_MDL_NAME_ICS}" = "GSMGFS" ]; then varmap_file="GFSphys_var_map.txt" - fi - ;; -*) - print_err_msg_exit "\ + fi + ;; +# + *) + print_err_msg_exit "\ A variable mapping table has not yet been defined for this physics suite: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" - ;; - + ;; +# esac # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 6f074ae5d..243577fd6 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -102,26 +102,33 @@ cd_vrfy $workdir varmap_file="" case "${CCPP_PHYS_SUITE}" in - -"FV3_GFS_2017_gfdlmp" | "FV3_GFS_2017_gfdlmp_regional" | "FV3_GFS_v16beta" | \ -"FV3_GFS_v15p2" | "FV3_CPT_v0" ) - varmap_file="GFSphys_var_map.txt" - ;; -"FV3_GSD_v0" | "FV3_GSD_SAR" | \ -"FV3_RRFS_v1beta" ) - if [ "${EXTRN_MDL_NAME_LBCS}" = "RAPX" ] || [ "${EXTRN_MDL_NAME_LBCS}" = "HRRRX" ]; then +# + "FV3_GFS_2017_gfdlmp" | \ + "FV3_GFS_2017_gfdlmp_regional" | \ + "FV3_GFS_v16beta" | \ + "FV3_GFS_v15p2" | "FV3_CPT_v0" ) + varmap_file="GFSphys_var_map.txt" + ;; +# + "FV3_GSD_v0" | \ + "FV3_GSD_SAR" | \ + "FV3_RRFS_v1beta" ) + if [ "${EXTRN_MDL_NAME_LBCS}" = "RAPX" ] || \ + [ "${EXTRN_MDL_NAME_LBCS}" = "HRRRX" ]; then varmap_file="GSDphys_var_map.txt" - elif [ "${EXTRN_MDL_NAME_LBCS}" = "NAM" ] || [ "${EXTRN_MDL_NAME_LBCS}" = "FV3GFS" ] || \ - [ "${EXTRN_MDL_NAME_LBCS}" = "GSMGFS" ]; then + elif [ "${EXTRN_MDL_NAME_LBCS}" = "NAM" ] || \ + [ "${EXTRN_MDL_NAME_LBCS}" = "FV3GFS" ] || \ + [ "${EXTRN_MDL_NAME_LBCS}" = "GSMGFS" ]; then varmap_file="GFSphys_var_map.txt" - fi - ;; -*) + fi + ;; +# + *) print_err_msg_exit "\ A variable mapping table has not yet been defined for this physics suite: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" ;; - +# esac # #----------------------------------------------------------------------- From 35eea6c30611ff166ad2e170042aee3a2cd3ab8e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 09:43:17 -0600 Subject: [PATCH 2/8] Comment out modifications to LD_LIBRARY_PATH. --- scripts/exregional_run_fcst.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 2168b985f..662fd96f6 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -106,7 +106,7 @@ case $MACHINE in ulimit -s unlimited ulimit -a APRUN="srun" - LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" OMP_NUM_THREADS=4 ;; # @@ -114,7 +114,7 @@ case $MACHINE in ulimit -s unlimited ulimit -a APRUN="srun" - LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" OMP_NUM_THREADS=4 ;; # @@ -132,7 +132,7 @@ case $MACHINE in module list nprocs=$(( NNODES_RUN_FCST*PPN_RUN_FCST )) APRUN="mpirun -np $nprocs" - LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" + #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ;; # From 80a9ef6769141fda026ecf13765bd0e14e340243 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 09:53:30 -0600 Subject: [PATCH 3/8] Remove temporary codes that fix bugs in the FV3_GFS_2017_gfdlmp_regional suite definition file because those bugs have been fixed (in the ufs-weather-model repo). --- ush/generate_FV3LAM_wflow.sh | 34 +++---- ush/setup.sh | 188 +++++++++++++++++++---------------- 2 files changed, 117 insertions(+), 105 deletions(-) diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index 8ffe98768..a6d2afc05 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -532,23 +532,23 @@ Copying the fixed file containing cloud condensation nuclei (CCN) data directory..." cp_vrfy "${FIXgsm}/CCN_ACTIVATE.BIN" "$EXPTDIR" fi -# -#----------------------------------------------------------------------- -# -# This if-statement is a temporary fix that makes corrections to the suite -# definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite -# that EMC uses. -# -# IMPORTANT: -# This if-statement must be removed once these corrections are made to -# the suite definition file in the dtc/develop branch of the NCAR fork -# of the fv3atm repository. -# -#----------------------------------------------------------------------- -# -if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then - mv_vrfy "${CCPP_PHYS_SUITE_FP}.tmp" "${CCPP_PHYS_SUITE_FP}" -fi +## +##----------------------------------------------------------------------- +## +## This if-statement is a temporary fix that makes corrections to the suite +## definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite +## that EMC uses. +## +## IMPORTANT: +## This if-statement must be removed once these corrections are made to +## the suite definition file in the dtc/develop branch of the NCAR fork +## of the fv3atm repository. +## +##----------------------------------------------------------------------- +## +#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then +# mv_vrfy "${CCPP_PHYS_SUITE_FP}.tmp" "${CCPP_PHYS_SUITE_FP}" +#fi diff --git a/ush/setup.sh b/ush/setup.sh index 1bd70a6ed..0193e1a71 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -987,6 +987,18 @@ fi # #----------------------------------------------------------------------- # +# Call the function that sets the ozone parameterization being used and +# modifies associated parameters accordingly. +# +#----------------------------------------------------------------------- +# +set_ozone_param \ + ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ + output_varname_ozone_param="OZONE_PARAM" +# +# +#----------------------------------------------------------------------- +# # If the base directory (EXPT_BASEDIR) in which the experiment subdirectory # (EXPT_SUBDIR) will be located does not start with a "/", then it is # either set to a null string or contains a relative directory. In both @@ -2131,94 +2143,94 @@ mkdir_vrfy -p "$EXPTDIR" -# -#----------------------------------------------------------------------- -# -# This if-statement is a temporary fix that makes corrections to the suite -# definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite -# that EMC uses. The corrections are: -# -# 1) Add a "fast_physics" group name to the beginning of the file. -# 2) Replace the ozphys parameterization with the ozphys_2015 parameterization. -# -# Note that this must be done before the call to the function set_ozone_param -# below because that function reads in the ozone parameterization in the -# suite definition file in order to set the ozone parameterization being -# used in the experiment; thus, the suite definition file must have the -# correct ozone parameterization specified before the call to set_ozone_param. -# -# IMPORTANT: -# This if-statement must be removed once these corrections are made to -# the suite definition file in the dtc/develop branch of the NCAR fork -# of the fv3atm repository. -# -#----------------------------------------------------------------------- -# -if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then - - CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP}.tmp" - cp_vrfy "${CCPP_PHYS_SUITE_IN_CCPP_FP}" "${CCPP_PHYS_SUITE_FP}" - - grep "fast_physics" "${CCPP_PHYS_SUITE_FP}" || { \ - fast_phys_group='\ - \ - \ - fv_sat_adj\ - \ - ' ; - sed -i -r "5i${fast_phys_group}" "${CCPP_PHYS_SUITE_FP}" || \ - print_err_msg_exit "\ -Attempt to insert the \"fast_physics\" group into the suite definition -file (CCPP_PHYS_SUITE_FP) failed: - CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; - } - - grep "ozphys" "${CCPP_PHYS_SUITE_FP}" && { \ - sed -i "s/ozphys/ozphys_2015/g" "${CCPP_PHYS_SUITE_FP}" || \ - print_err_msg_exit "\ -Attempt to replace the \"ozphys\" scheme with the \"ozphys_2015\" scheme -in the suite definition file (CCPP_PHYS_SUITE_FP) failed: - CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; - } -# -#----------------------------------------------------------------------- -# -# Call the function that sets the ozone parameterization being used and -# modifies associated parameters accordingly. -# -# This is a repeat of the same call in setup.sh. It must be redone because -# the contents of CCPP_PHYS_SUITE_FP have been modified, and the function -# set_ozone_param depends on that file to set elements of the workflow -# arrays CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING and FIXgsm_FILES_TO_COPY_TO_FIXam. -# -#----------------------------------------------------------------------- -# - set_ozone_param \ - ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_FP}" \ - output_varname_ozone_param="OZONE_PARAM" - - CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP%.tmp}" - -else -# -#----------------------------------------------------------------------- -# -# Call the function that sets the ozone parameterization being used and -# modifies associated parameters accordingly. -# -#----------------------------------------------------------------------- -# -# NOTE: -# After the temporary code above in the "if" part of the if-statement is -# removed, this "else" part can be moved back up to before the creation -# of EXPTDIR (above). -# -set_ozone_param \ - ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ - output_varname_ozone_param="OZONE_PARAM" - - -fi +## +##----------------------------------------------------------------------- +## +## This if-statement is a temporary fix that makes corrections to the suite +## definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite +## that EMC uses. The corrections are: +## +## 1) Add a "fast_physics" group name to the beginning of the file. +## 2) Replace the ozphys parameterization with the ozphys_2015 parameterization. +## +## Note that this must be done before the call to the function set_ozone_param +## below because that function reads in the ozone parameterization in the +## suite definition file in order to set the ozone parameterization being +## used in the experiment; thus, the suite definition file must have the +## correct ozone parameterization specified before the call to set_ozone_param. +## +## IMPORTANT: +## This if-statement must be removed once these corrections are made to +## the suite definition file in the dtc/develop branch of the NCAR fork +## of the fv3atm repository. +## +##----------------------------------------------------------------------- +## +#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then +# +# CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP}.tmp" +# cp_vrfy "${CCPP_PHYS_SUITE_IN_CCPP_FP}" "${CCPP_PHYS_SUITE_FP}" +# +# grep "fast_physics" "${CCPP_PHYS_SUITE_FP}" || { \ +# fast_phys_group='\ +# \ +# \ +# fv_sat_adj\ +# \ +# ' ; +# sed -i -r "5i${fast_phys_group}" "${CCPP_PHYS_SUITE_FP}" || \ +# print_err_msg_exit "\ +#Attempt to insert the \"fast_physics\" group into the suite definition +#file (CCPP_PHYS_SUITE_FP) failed: +# CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; +# } +# +# grep "ozphys" "${CCPP_PHYS_SUITE_FP}" && { \ +# sed -i "s/ozphys/ozphys_2015/g" "${CCPP_PHYS_SUITE_FP}" || \ +# print_err_msg_exit "\ +#Attempt to replace the \"ozphys\" scheme with the \"ozphys_2015\" scheme +#in the suite definition file (CCPP_PHYS_SUITE_FP) failed: +# CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; +# } +## +##----------------------------------------------------------------------- +## +## Call the function that sets the ozone parameterization being used and +## modifies associated parameters accordingly. +## +## This is a repeat of the same call in setup.sh. It must be redone because +## the contents of CCPP_PHYS_SUITE_FP have been modified, and the function +## set_ozone_param depends on that file to set elements of the workflow +## arrays CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING and FIXgsm_FILES_TO_COPY_TO_FIXam. +## +##----------------------------------------------------------------------- +## +# set_ozone_param \ +# ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_FP}" \ +# output_varname_ozone_param="OZONE_PARAM" +# +# CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP%.tmp}" +# +#else +## +##----------------------------------------------------------------------- +## +## Call the function that sets the ozone parameterization being used and +## modifies associated parameters accordingly. +## +##----------------------------------------------------------------------- +## +## NOTE: +## After the temporary code above in the "if" part of the if-statement is +## removed, this "else" part can be moved back up to before the creation +## of EXPTDIR (above). +## +#set_ozone_param \ +# ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ +# output_varname_ozone_param="OZONE_PARAM" +# +# +#fi From 64fe235505ac3978217051bdf88abb7eb11b297e Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 09:57:06 -0600 Subject: [PATCH 4/8] Remove block of code that is no longer necessary because chgres_cube can now initialize from external model data with either 4 or 9 soil levels, and run with LSMs of either 4 or 9 soil levels. --- ush/setup.sh | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/ush/setup.sh b/ush/setup.sh index 0193e1a71..56b729df1 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -547,31 +547,31 @@ The CCPP physics suite specified in CCPP_PHYS_SUITE is not supported: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" check_var_valid_value \ "CCPP_PHYS_SUITE" "valid_vals_CCPP_PHYS_SUITE" "${err_msg}" +## +##----------------------------------------------------------------------- +## +## If using CCPP with the GFS_2017_gfdlmp physics suite, only allow +## "GSMGFS" and "FV3GFS" as the external models for ICs and LBCs. +## +##----------------------------------------------------------------------- +## +#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ]; then +# +# if [ "${EXTRN_MDL_NAME_ICS}" != "GSMGFS" -a \ +# "${EXTRN_MDL_NAME_ICS}" != "FV3GFS" ] || \ +# [ "${EXTRN_MDL_NAME_LBCS}" != "GSMGFS" -a \ +# "${EXTRN_MDL_NAME_LBCS}" != "FV3GFS" ]; then +# print_info_msg "$VERBOSE" " +#The following combination of physics suite and external model(s) for ICs +#and LBCs is not allowed: +# CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\" +# EXTRN_MDL_NAME_ICS = \"${EXTRN_MDL_NAME_ICS}\" +# EXTRN_MDL_NAME_LBCS = \"${EXTRN_MDL_NAME_LBCS}\" +#For this physics suite, the only external models that the workflow cur- +#rently allows are \"GSMGFS\" and \"FV3GFS\"." +# fi # -#----------------------------------------------------------------------- -# -# If using CCPP with the GFS_2017_gfdlmp physics suite, only allow -# "GSMGFS" and "FV3GFS" as the external models for ICs and LBCs. -# -#----------------------------------------------------------------------- -# -if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ]; then - - if [ "${EXTRN_MDL_NAME_ICS}" != "GSMGFS" -a \ - "${EXTRN_MDL_NAME_ICS}" != "FV3GFS" ] || \ - [ "${EXTRN_MDL_NAME_LBCS}" != "GSMGFS" -a \ - "${EXTRN_MDL_NAME_LBCS}" != "FV3GFS" ]; then - print_info_msg "$VERBOSE" " -The following combination of physics suite and external model(s) for ICs -and LBCs is not allowed: - CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\" - EXTRN_MDL_NAME_ICS = \"${EXTRN_MDL_NAME_ICS}\" - EXTRN_MDL_NAME_LBCS = \"${EXTRN_MDL_NAME_LBCS}\" -For this physics suite, the only external models that the workflow cur- -rently allows are \"GSMGFS\" and \"FV3GFS\"." - fi - -fi +#fi # #----------------------------------------------------------------------- # From 5a0ea748d030fadfc66d91f4a79d6c53171bf137 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 10:15:23 -0600 Subject: [PATCH 5/8] Remove unused file. --- ush/load_fv3gfs_modules.sh | 42 -------------------------------------- 1 file changed, 42 deletions(-) delete mode 100755 ush/load_fv3gfs_modules.sh diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh deleted file mode 100755 index f95b0237a..000000000 --- a/ush/load_fv3gfs_modules.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -#set -x - -############################################################### -# Setup runtime environment by loading modules -ulimit_s=$( ulimit -S -s ) -ulimit -S -s 10000 - -# Find module command and purge: -source "$HOMEgfs/modulefiles/module-setup.sh.inc" - -# Load our modules: -module use "$HOMEgfs/modulefiles" - -if [[ -d /lfs4 ]] ; then - # We are on NOAA Jet - module load module_base.jet -elif [[ -d /scratch3 ]] ; then - # We are on NOAA Theia - module load module_base.theia -elif [[ -d /gpfs/hps && -e /etc/SuSE-release ]] ; then - # We are on NOAA Luna or Surge - module load module_base.wcoss_c -elif [[ -L /usrx && "$( readlink /usrx 2> /dev/null )" =~ dell ]] ; then - # We are on NOAA Mars or Venus - module load module_base.wcoss_dell_p3 -elif [[ -d /dcom && -d /hwrf ]] ; then - # We are on NOAA Tide or Gyre - module load module_base.wcoss -elif [[ -d /glade ]] ; then - # We are on NCAR Yellowstone - module load module_base.cheyenne -elif [[ -d /lustre && -d /ncrc ]] ; then - # We are on GAEA. - module load module_base.gaea -else - echo WARNING: UNKNOWN PLATFORM -fi - -# Restore stack soft limit: -ulimit -S -s "$ulimit_s" -unset ulimit_s From 17a50acf92a06321a460b832f41b069a5f9d4f48 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 10:22:57 -0600 Subject: [PATCH 6/8] Bug fix: Move call to set_ozone_param to after the variable CCPP_PHYS_SUITE_IN_CCPP_FP is set because the latter is used as an input argument to set_ozone_param. --- ush/setup.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/ush/setup.sh b/ush/setup.sh index 56b729df1..90d7c8322 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -985,17 +985,6 @@ drag related orography files for the FV3_RRFS_v1beta is empty: fi fi # -#----------------------------------------------------------------------- -# -# Call the function that sets the ozone parameterization being used and -# modifies associated parameters accordingly. -# -#----------------------------------------------------------------------- -# -set_ozone_param \ - ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ - output_varname_ozone_param="OZONE_PARAM" -# # #----------------------------------------------------------------------- # @@ -1214,7 +1203,7 @@ NEMS_CONFIG_TMPL_FP="${TEMPLATE_DIR}/${NEMS_CONFIG_TMPL_FN}" # #----------------------------------------------------------------------- # -# If using CCPP, set: +# Set: # # 1) the variable CCPP_PHYS_SUITE_FN to the name of the CCPP physics # suite definition file. @@ -1228,9 +1217,6 @@ NEMS_CONFIG_TMPL_FP="${TEMPLATE_DIR}/${NEMS_CONFIG_TMPL_FN}" # each cycle, the forecast launch script will create a link in the cycle # run directory to the copy of this file at CCPP_PHYS_SUITE_FP. # -# Note that if not using CCPP, the variables described above will get -# set to null strings. -# #----------------------------------------------------------------------- # CCPP_PHYS_SUITE_FN="suite_${CCPP_PHYS_SUITE}.xml" @@ -1245,6 +1231,17 @@ fi # #----------------------------------------------------------------------- # +# Call the function that sets the ozone parameterization being used and +# modifies associated parameters accordingly. +# +#----------------------------------------------------------------------- +# +set_ozone_param \ + ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ + output_varname_ozone_param="OZONE_PARAM" +# +#----------------------------------------------------------------------- +# # Set the full paths to those forecast model input files that are cycle- # independent, i.e. they don't include information about the cycle's # starting day/time. These are: From 5c8e5cf10f4f38bb32b7bcaadab34cb44695d78b Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 10:50:57 -0600 Subject: [PATCH 7/8] For the make_ics and make_lbcs tasks, move the setting of APRUN and other machine-specific actions from the J-job to the ex-script in order to be consistent with the other workflow tasks. --- jobs/JREGIONAL_MAKE_ICS | 90 +++++++++++++++++---------------- jobs/JREGIONAL_MAKE_LBCS | 84 +++++++++++++++--------------- scripts/exregional_make_ics.sh | 44 +++++++++++++++- scripts/exregional_make_lbcs.sh | 44 +++++++++++++++- 4 files changed, 175 insertions(+), 87 deletions(-) diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 4ca00af53..1fb5b900d 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -46,48 +46,48 @@ This is the J-job script for the task that generates initial condition (IC), surface, and zeroth-hour lateral boundary condition (LBC0) files for the FV3 (in NetCDF format). ========================================================================" -# -#----------------------------------------------------------------------- -# -# Set machine-dependent parameters. -# -#----------------------------------------------------------------------- -# -case "$MACHINE" in - - "WCOSS_CRAY") - ulimit -s unlimited - APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" - ;; - - "WCOSS_DELL_P3") - ulimit -s unlimited - APRUN="mpirun" - ;; - - "HERA") - ulimit -s unlimited - APRUN="srun" - ;; - - "JET") - ulimit -s unlimited - APRUN="srun" - ;; - - "ODIN") - APRUN="srun" - ;; - - "CHEYENNE") - nprocs=$(( NNODES_MAKE_ICS*PPN_MAKE_ICS )) - APRUN="mpirun -np $nprocs" - ;; - "STAMPEDE") - APRUN="ibrun" - ;; - -esac +## +##----------------------------------------------------------------------- +## +## Set machine-dependent parameters. +## +##----------------------------------------------------------------------- +## +#case "$MACHINE" in +# +# "WCOSS_CRAY") +# ulimit -s unlimited +# APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" +# ;; +# +# "WCOSS_DELL_P3") +# ulimit -s unlimited +# APRUN="mpirun" +# ;; +# +# "HERA") +# ulimit -s unlimited +# APRUN="srun" +# ;; +# +# "JET") +# ulimit -s unlimited +# APRUN="srun" +# ;; +# +# "ODIN") +# APRUN="srun" +# ;; +# +# "CHEYENNE") +# nprocs=$(( NNODES_MAKE_ICS*PPN_MAKE_ICS )) +# APRUN="mpirun -np $nprocs" +# ;; +# "STAMPEDE") +# APRUN="ibrun" +# ;; +# +#esac # #----------------------------------------------------------------------- # @@ -105,9 +105,11 @@ mkdir_vrfy -p "${ics_dir}" # #----------------------------------------------------------------------- # +#$SCRIPTSDIR/exregional_make_ics.sh \ +# ics_dir="${ics_dir}" \ +# APRUN="${APRUN}" || \ $SCRIPTSDIR/exregional_make_ics.sh \ - ics_dir="${ics_dir}" \ - APRUN="${APRUN}" || \ + ics_dir="${ics_dir}" || \ print_err_msg_exit "\ Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." # diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 43bd27b5d..100e902b1 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -46,49 +46,49 @@ This is the J-job script for the task that generates lateral boundary condition (LBC) files (in NetCDF format) for all LBC update hours (except hour zero). ========================================================================" +## +##----------------------------------------------------------------------- +## +## Set machine-dependent parameters. +## +##----------------------------------------------------------------------- +## +#case "$MACHINE" in # -#----------------------------------------------------------------------- +# "WCOSS_CRAY") +# ulimit -s unlimited +# APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" +# ;; # -# Set machine-dependent parameters. +# "WCOSS_DELL_P3") +# ulimit -s unlimited +# APRUN="mpirun" +# ;; # -#----------------------------------------------------------------------- +# "HERA") +# ulimit -s unlimited +# APRUN="srun" +# ;; # -case "$MACHINE" in - - "WCOSS_CRAY") - ulimit -s unlimited - APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" - ;; - - "WCOSS_DELL_P3") - ulimit -s unlimited - APRUN="mpirun" - ;; - - "HERA") - ulimit -s unlimited - APRUN="srun" - ;; - - "JET") - ulimit -s unlimited - APRUN="srun" - ;; - - "ODIN") - APRUN="srun" - ;; - - "CHEYENNE") - nprocs=$(( NNODES_MAKE_LBCS*PPN_MAKE_LBCS )) - APRUN="mpirun -np $nprocs" - ;; - - "STAMPEDE") - APRUN="ibrun" - ;; - -esac +# "JET") +# ulimit -s unlimited +# APRUN="srun" +# ;; +# +# "ODIN") +# APRUN="srun" +# ;; +# +# "CHEYENNE") +# nprocs=$(( NNODES_MAKE_LBCS*PPN_MAKE_LBCS )) +# APRUN="mpirun -np $nprocs" +# ;; +# +# "STAMPEDE") +# APRUN="ibrun" +# ;; +# +#esac # #----------------------------------------------------------------------- # @@ -106,9 +106,11 @@ mkdir_vrfy -p "${lbcs_dir}" # #----------------------------------------------------------------------- # +#$SCRIPTSDIR/exregional_make_lbcs.sh \ +# lbcs_dir="${lbcs_dir}" \ +# APRUN="${APRUN}" || \ $SCRIPTSDIR/exregional_make_lbcs.sh \ - lbcs_dir="${lbcs_dir}" \ - APRUN="${APRUN}" || \ + lbcs_dir="${lbcs_dir}" || \ print_err_msg_exit "\ Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed." # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index f62c37a84..7463de5fb 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -57,7 +57,6 @@ This is the ex-script for the task that generates initial condition # valid_args=( \ "ics_dir" \ -"APRUN" \ ) process_args valid_args "$@" # @@ -73,6 +72,49 @@ print_input_args valid_args # #----------------------------------------------------------------------- # +# Set machine-dependent parameters. +# +#----------------------------------------------------------------------- +# +case "$MACHINE" in + + "WCOSS_CRAY") + ulimit -s unlimited + APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" + ;; + + "WCOSS_DELL_P3") + ulimit -s unlimited + APRUN="mpirun" + ;; + + "HERA") + ulimit -s unlimited + APRUN="srun" + ;; + + "JET") + ulimit -s unlimited + APRUN="srun" + ;; + + "ODIN") + APRUN="srun" + ;; + + "CHEYENNE") + nprocs=$(( NNODES_MAKE_ICS*PPN_MAKE_ICS )) + APRUN="mpirun -np $nprocs" + ;; + + "STAMPEDE") + APRUN="ibrun" + ;; + +esac +# +#----------------------------------------------------------------------- +# # Source the file containing definitions of variables associated with the # external model for ICs. # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 243577fd6..7967c68dd 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -57,7 +57,6 @@ hour zero). # valid_args=( \ "lbcs_dir" \ -"APRUN" \ ) process_args valid_args "$@" # @@ -73,6 +72,49 @@ print_input_args valid_args # #----------------------------------------------------------------------- # +# Set machine-dependent parameters. +# +#----------------------------------------------------------------------- +# +case "$MACHINE" in + + "WCOSS_CRAY") + ulimit -s unlimited + APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" + ;; + + "WCOSS_DELL_P3") + ulimit -s unlimited + APRUN="mpirun" + ;; + + "HERA") + ulimit -s unlimited + APRUN="srun" + ;; + + "JET") + ulimit -s unlimited + APRUN="srun" + ;; + + "ODIN") + APRUN="srun" + ;; + + "CHEYENNE") + nprocs=$(( NNODES_MAKE_LBCS*PPN_MAKE_LBCS )) + APRUN="mpirun -np $nprocs" + ;; + + "STAMPEDE") + APRUN="ibrun" + ;; + +esac +# +#----------------------------------------------------------------------- +# # Source the file containing definitions of variables associated with the # external model for LBCs. # From 99af7618cefa294181546fb3e41c5870fe9ca536 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 14 Oct 2020 10:57:31 -0600 Subject: [PATCH 8/8] Remove commented-out code. --- jobs/JREGIONAL_MAKE_ICS | 45 ------------- jobs/JREGIONAL_MAKE_LBCS | 46 ------------- scripts/exregional_run_fcst.sh | 4 -- ush/generate_FV3LAM_wflow.sh | 17 ----- ush/setup.sh | 114 --------------------------------- 5 files changed, 226 deletions(-) diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 1fb5b900d..01027b4ac 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -46,48 +46,6 @@ This is the J-job script for the task that generates initial condition (IC), surface, and zeroth-hour lateral boundary condition (LBC0) files for the FV3 (in NetCDF format). ========================================================================" -## -##----------------------------------------------------------------------- -## -## Set machine-dependent parameters. -## -##----------------------------------------------------------------------- -## -#case "$MACHINE" in -# -# "WCOSS_CRAY") -# ulimit -s unlimited -# APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" -# ;; -# -# "WCOSS_DELL_P3") -# ulimit -s unlimited -# APRUN="mpirun" -# ;; -# -# "HERA") -# ulimit -s unlimited -# APRUN="srun" -# ;; -# -# "JET") -# ulimit -s unlimited -# APRUN="srun" -# ;; -# -# "ODIN") -# APRUN="srun" -# ;; -# -# "CHEYENNE") -# nprocs=$(( NNODES_MAKE_ICS*PPN_MAKE_ICS )) -# APRUN="mpirun -np $nprocs" -# ;; -# "STAMPEDE") -# APRUN="ibrun" -# ;; -# -#esac # #----------------------------------------------------------------------- # @@ -105,9 +63,6 @@ mkdir_vrfy -p "${ics_dir}" # #----------------------------------------------------------------------- # -#$SCRIPTSDIR/exregional_make_ics.sh \ -# ics_dir="${ics_dir}" \ -# APRUN="${APRUN}" || \ $SCRIPTSDIR/exregional_make_ics.sh \ ics_dir="${ics_dir}" || \ print_err_msg_exit "\ diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 100e902b1..b46d0e950 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -46,49 +46,6 @@ This is the J-job script for the task that generates lateral boundary condition (LBC) files (in NetCDF format) for all LBC update hours (except hour zero). ========================================================================" -## -##----------------------------------------------------------------------- -## -## Set machine-dependent parameters. -## -##----------------------------------------------------------------------- -## -#case "$MACHINE" in -# -# "WCOSS_CRAY") -# ulimit -s unlimited -# APRUN="aprun -b -j1 -n48 -N12 -d1 -cc depth" -# ;; -# -# "WCOSS_DELL_P3") -# ulimit -s unlimited -# APRUN="mpirun" -# ;; -# -# "HERA") -# ulimit -s unlimited -# APRUN="srun" -# ;; -# -# "JET") -# ulimit -s unlimited -# APRUN="srun" -# ;; -# -# "ODIN") -# APRUN="srun" -# ;; -# -# "CHEYENNE") -# nprocs=$(( NNODES_MAKE_LBCS*PPN_MAKE_LBCS )) -# APRUN="mpirun -np $nprocs" -# ;; -# -# "STAMPEDE") -# APRUN="ibrun" -# ;; -# -#esac # #----------------------------------------------------------------------- # @@ -106,9 +63,6 @@ mkdir_vrfy -p "${lbcs_dir}" # #----------------------------------------------------------------------- # -#$SCRIPTSDIR/exregional_make_lbcs.sh \ -# lbcs_dir="${lbcs_dir}" \ -# APRUN="${APRUN}" || \ $SCRIPTSDIR/exregional_make_lbcs.sh \ lbcs_dir="${lbcs_dir}" || \ print_err_msg_exit "\ diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 662fd96f6..8c86f4db1 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -106,7 +106,6 @@ case $MACHINE in ulimit -s unlimited ulimit -a APRUN="srun" - #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" OMP_NUM_THREADS=4 ;; # @@ -114,7 +113,6 @@ case $MACHINE in ulimit -s unlimited ulimit -a APRUN="srun" - #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" OMP_NUM_THREADS=4 ;; # @@ -132,7 +130,6 @@ case $MACHINE in module list nprocs=$(( NNODES_RUN_FCST*PPN_RUN_FCST )) APRUN="mpirun -np $nprocs" - #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ;; # @@ -141,7 +138,6 @@ case $MACHINE in module list APRUN="ibrun -np ${PE_MEMBER01}" - #LD_LIBRARY_PATH="${UFS_WTHR_MDL_DIR}/FV3/ccpp/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" ;; esac diff --git a/ush/generate_FV3LAM_wflow.sh b/ush/generate_FV3LAM_wflow.sh index a6d2afc05..02140cfe3 100755 --- a/ush/generate_FV3LAM_wflow.sh +++ b/ush/generate_FV3LAM_wflow.sh @@ -532,23 +532,6 @@ Copying the fixed file containing cloud condensation nuclei (CCN) data directory..." cp_vrfy "${FIXgsm}/CCN_ACTIVATE.BIN" "$EXPTDIR" fi -## -##----------------------------------------------------------------------- -## -## This if-statement is a temporary fix that makes corrections to the suite -## definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite -## that EMC uses. -## -## IMPORTANT: -## This if-statement must be removed once these corrections are made to -## the suite definition file in the dtc/develop branch of the NCAR fork -## of the fv3atm repository. -## -##----------------------------------------------------------------------- -## -#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then -# mv_vrfy "${CCPP_PHYS_SUITE_FP}.tmp" "${CCPP_PHYS_SUITE_FP}" -#fi diff --git a/ush/setup.sh b/ush/setup.sh index 90d7c8322..d25fdd6c0 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -547,31 +547,6 @@ The CCPP physics suite specified in CCPP_PHYS_SUITE is not supported: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\"" check_var_valid_value \ "CCPP_PHYS_SUITE" "valid_vals_CCPP_PHYS_SUITE" "${err_msg}" -## -##----------------------------------------------------------------------- -## -## If using CCPP with the GFS_2017_gfdlmp physics suite, only allow -## "GSMGFS" and "FV3GFS" as the external models for ICs and LBCs. -## -##----------------------------------------------------------------------- -## -#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp" ]; then -# -# if [ "${EXTRN_MDL_NAME_ICS}" != "GSMGFS" -a \ -# "${EXTRN_MDL_NAME_ICS}" != "FV3GFS" ] || \ -# [ "${EXTRN_MDL_NAME_LBCS}" != "GSMGFS" -a \ -# "${EXTRN_MDL_NAME_LBCS}" != "FV3GFS" ]; then -# print_info_msg "$VERBOSE" " -#The following combination of physics suite and external model(s) for ICs -#and LBCs is not allowed: -# CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\" -# EXTRN_MDL_NAME_ICS = \"${EXTRN_MDL_NAME_ICS}\" -# EXTRN_MDL_NAME_LBCS = \"${EXTRN_MDL_NAME_LBCS}\" -#For this physics suite, the only external models that the workflow cur- -#rently allows are \"GSMGFS\" and \"FV3GFS\"." -# fi -# -#fi # #----------------------------------------------------------------------- # @@ -2140,95 +2115,6 @@ mkdir_vrfy -p "$EXPTDIR" -## -##----------------------------------------------------------------------- -## -## This if-statement is a temporary fix that makes corrections to the suite -## definition file for the "FV3_GFS_2017_gfdlmp_regional" physics suite -## that EMC uses. The corrections are: -## -## 1) Add a "fast_physics" group name to the beginning of the file. -## 2) Replace the ozphys parameterization with the ozphys_2015 parameterization. -## -## Note that this must be done before the call to the function set_ozone_param -## below because that function reads in the ozone parameterization in the -## suite definition file in order to set the ozone parameterization being -## used in the experiment; thus, the suite definition file must have the -## correct ozone parameterization specified before the call to set_ozone_param. -## -## IMPORTANT: -## This if-statement must be removed once these corrections are made to -## the suite definition file in the dtc/develop branch of the NCAR fork -## of the fv3atm repository. -## -##----------------------------------------------------------------------- -## -#if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_2017_gfdlmp_regional" ]; then -# -# CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP}.tmp" -# cp_vrfy "${CCPP_PHYS_SUITE_IN_CCPP_FP}" "${CCPP_PHYS_SUITE_FP}" -# -# grep "fast_physics" "${CCPP_PHYS_SUITE_FP}" || { \ -# fast_phys_group='\ -# \ -# \ -# fv_sat_adj\ -# \ -# ' ; -# sed -i -r "5i${fast_phys_group}" "${CCPP_PHYS_SUITE_FP}" || \ -# print_err_msg_exit "\ -#Attempt to insert the \"fast_physics\" group into the suite definition -#file (CCPP_PHYS_SUITE_FP) failed: -# CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; -# } -# -# grep "ozphys" "${CCPP_PHYS_SUITE_FP}" && { \ -# sed -i "s/ozphys/ozphys_2015/g" "${CCPP_PHYS_SUITE_FP}" || \ -# print_err_msg_exit "\ -#Attempt to replace the \"ozphys\" scheme with the \"ozphys_2015\" scheme -#in the suite definition file (CCPP_PHYS_SUITE_FP) failed: -# CCPP_PHYS_SUITE_FP = \"${CCPP_PHYS_SUITE_FP}\"" ; -# } -## -##----------------------------------------------------------------------- -## -## Call the function that sets the ozone parameterization being used and -## modifies associated parameters accordingly. -## -## This is a repeat of the same call in setup.sh. It must be redone because -## the contents of CCPP_PHYS_SUITE_FP have been modified, and the function -## set_ozone_param depends on that file to set elements of the workflow -## arrays CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING and FIXgsm_FILES_TO_COPY_TO_FIXam. -## -##----------------------------------------------------------------------- -## -# set_ozone_param \ -# ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_FP}" \ -# output_varname_ozone_param="OZONE_PARAM" -# -# CCPP_PHYS_SUITE_FP="${CCPP_PHYS_SUITE_FP%.tmp}" -# -#else -## -##----------------------------------------------------------------------- -## -## Call the function that sets the ozone parameterization being used and -## modifies associated parameters accordingly. -## -##----------------------------------------------------------------------- -## -## NOTE: -## After the temporary code above in the "if" part of the if-statement is -## removed, this "else" part can be moved back up to before the creation -## of EXPTDIR (above). -## -#set_ozone_param \ -# ccpp_phys_suite_fp="${CCPP_PHYS_SUITE_IN_CCPP_FP}" \ -# output_varname_ozone_param="OZONE_PARAM" -# -# -#fi -