diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 4ca00af53..01027b4ac 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -49,48 +49,6 @@ 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 the name of and create the directory in which the output from this # script will be placed (if that directory doesn't already exist). # @@ -106,8 +64,7 @@ mkdir_vrfy -p "${ics_dir}" #----------------------------------------------------------------------- # $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..b46d0e950 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -49,49 +49,6 @@ 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 -# -#----------------------------------------------------------------------- -# # Set the name of and create the directory in which the output from this # script will be placed (if it doesn't already exist). # @@ -107,8 +64,7 @@ mkdir_vrfy -p "${lbcs_dir}" #----------------------------------------------------------------------- # $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 04cc14652..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. # @@ -102,26 +144,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..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. # @@ -102,26 +144,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 # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index bb5fbfe68..468f64622 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 e6c0485c7..721bc944c 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 @@ -616,8 +599,6 @@ Copying the FV3-LAM executable (exec_fp) to the executables directory EXECDIR = \"$EXECDIR\"" cp_vrfy "${exec_fp}" "${FV3_EXEC_FP}" fi - - # #----------------------------------------------------------------------- # @@ -654,7 +635,7 @@ if [ "${CCPP_PHYS_SUITE}" = "FV3_GSD_v0" ] || \ print_err_msg_exit "\ The value to set the variable lsoil to in the FV3 namelist file (FV3_NML_FP) has not been specified for the following combination of physics suite and -external models for ICs and LBCs: +external model ICs: CCPP_PHYS_SUITE = \"${CCPP_PHYS_SUITE}\" EXTRN_MDL_NAME_ICS = \"${EXTRN_MDL_NAME_ICS}\" Please change one or more of these parameters or provide a value for lsoil @@ -1054,6 +1035,3 @@ Stopping. " exit 1 fi - - - 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 diff --git a/ush/setup.sh b/ush/setup.sh index d03813090..c0979a8ee 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -550,31 +550,6 @@ check_var_valid_value \ # #----------------------------------------------------------------------- # -# 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 -# -#----------------------------------------------------------------------- -# # Check that DATE_FIRST_CYCL and DATE_LAST_CYCL are strings consisting # of exactly 8 digits. # @@ -1169,7 +1144,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. @@ -1183,9 +1158,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" @@ -1200,6 +1172,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: @@ -2098,95 +2081,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 -