From 638684e0bfcd06700cc8695f09824891a0a1eee1 Mon Sep 17 00:00:00 2001 From: Kate Friedman Date: Wed, 14 Feb 2024 14:55:21 -0500 Subject: [PATCH 1/4] Remove `finddate.sh` from system (#2308) * Retire finddate.sh usage from system * Update gfs-utils hash to 7a84c88 - New hash includes removal of finddate.sh Refs #2279 --- sorc/gfs_utils.fd | 2 +- sorc/link_workflow.sh | 2 +- ush/syndat_getjtbul.sh | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sorc/gfs_utils.fd b/sorc/gfs_utils.fd index 6ddd1460d9..7a84c884d2 160000 --- a/sorc/gfs_utils.fd +++ b/sorc/gfs_utils.fd @@ -1 +1 @@ -Subproject commit 6ddd1460d9f7c292f04573ab2bdc988a05ed618b +Subproject commit 7a84c884d210960bd9f59e6ae09c2e7f0e1e39b1 diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 39e2a7785f..21bc30faa4 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -155,7 +155,7 @@ cd "${HOMEgfs}/ush" || exit 8 for file in emcsfc_ice_blend.sh global_cycle_driver.sh emcsfc_snow.sh global_cycle.sh; do ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_utils.fd/ush/${file}" . done -for file in finddate.sh make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name.sh ; do +for file in make_ntc_bull.pl make_NTC_file.pl make_tif.sh month_name.sh ; do ${LINK_OR_COPY} "${HOMEgfs}/sorc/gfs_utils.fd/ush/${file}" . done diff --git a/ush/syndat_getjtbul.sh b/ush/syndat_getjtbul.sh index c17067ff72..a68187868a 100755 --- a/ush/syndat_getjtbul.sh +++ b/ush/syndat_getjtbul.sh @@ -52,8 +52,6 @@ hour=$(echo $CDATE10 | cut -c9-10) echo $PDYm1 pdym1=$PDYm1 -#pdym1=$(sh $utilscript/finddate.sh $pdy d-1) - echo " " >> $pgmout echo "Entering sub-shell syndat_getjtbul.sh to recover JTWC Bulletins" \ >> $pgmout From d465ea06e8b2a8f3a5eb1120647c1e2ce5197d66 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Thu, 15 Feb 2024 19:25:02 +0000 Subject: [PATCH 2/4] Set HOMEgfs for module_setup in CI driver (#2321) Hotfixes to CI Bash system from updates with sourcing `detect_machine.sh` in `ush/module-setup.sh` using **HOMEgfs**. --- ci/scripts/check_ci.sh | 23 ++++++++++++----------- ci/scripts/driver.sh | 3 +++ ci/scripts/run_ci.sh | 13 +++++++------ 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/ci/scripts/check_ci.sh b/ci/scripts/check_ci.sh index cda2d4e9f2..4ff7eefd26 100755 --- a/ci/scripts/check_ci.sh +++ b/ci/scripts/check_ci.sh @@ -8,7 +8,7 @@ set -eux # to run from within a cron job in the CI Managers account ##################################################################################### -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )" +HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )" scriptname=$(basename "${BASH_SOURCE[0]}") echo "Begin ${scriptname} at $(date -u)" || true export PS4='+ $(basename ${BASH_SOURCE})[${LINENO}]' @@ -20,11 +20,11 @@ REPO_URL="https://github.com/NOAA-EMC/global-workflow.git" # Set up runtime environment varibles for accounts on supproted machines ######################################################################### -source "${ROOT_DIR}/ush/detect_machine.sh" +source "${HOMEgfs}/ush/detect_machine.sh" case ${MACHINE_ID} in hera | orion | hercules) echo "Running Automated Testing on ${MACHINE_ID}" - source "${ROOT_DIR}/ci/platforms/config.${MACHINE_ID}" + source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}" ;; *) echo "Unsupported platform. Exiting with error." @@ -32,9 +32,10 @@ case ${MACHINE_ID} in ;; esac set +x -source "${ROOT_DIR}/ush/module-setup.sh" -source "${ROOT_DIR}/ci/scripts/utils/ci_utils.sh" -module use "${ROOT_DIR}/modulefiles" +export HOMEgfs +source "${HOMEgfs}/ush/module-setup.sh" +source "${HOMEgfs}/ci/scripts/utils/ci_utils.sh" +module use "${HOMEgfs}/modulefiles" module load "module_gwsetup.${MACHINE_ID}" module list set -x @@ -57,7 +58,7 @@ pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db" pr_list="" if [[ -f "${pr_list_dbfile}" ]]; then - pr_list=$("${ROOT_DIR}/ci/scripts/pr_list_database.py" --dbfile "${pr_list_dbfile}" --display | grep -v Failed | grep Running | awk '{print $1}') || true + pr_list=$("${HOMEgfs}/ci/scripts/pr_list_database.py" --dbfile "${pr_list_dbfile}" --display | grep -v Failed | grep Running | awk '{print $1}') || true fi if [[ -z "${pr_list+x}" ]]; then echo "no PRs open and ready to run cases on .. exiting" @@ -89,13 +90,13 @@ for pr in ${pr_list}; do sed -i "1 i\`\`\`" "${output_ci}" sed -i "1 i\All CI Test Cases Passed on ${MACHINE_ID^}:" "${output_ci}" "${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${output_ci}" - "${ROOT_DIR}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}" + "${HOMEgfs}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}" # Check to see if this PR that was opened by the weekly tests and if so close it if it passed on all platforms weekly_labels=$(${GH} pr view "${pr}" --repo "${REPO_URL}" --json headRefName,labels,author --jq 'select(.author.login | contains("emcbot")) | select(.headRefName | contains("weekly_ci")) | .labels[].name ') || true if [[ -n "${weekly_labels}" ]]; then - num_platforms=$(find "${ROOT_DIR}/ci/platforms" -type f -name "config.*" | wc -l) + num_platforms=$(find "${HOMEgfs}/ci/platforms" -type f -name "config.*" | wc -l) passed=0 - for platforms in "${ROOT_DIR}"/ci/platforms/config.*; do + for platforms in "${HOMEgfs}"/ci/platforms/config.*; do machine=$(basename "${platforms}" | cut -d. -f2) if [[ "${weekly_labels}" == *"CI-${machine^}-Passed"* ]]; then ((passed=passed+1)) @@ -139,7 +140,7 @@ for pr in ${pr_list}; do } >> "${output_ci}" sed -i "1 i\`\`\`" "${output_ci}" "${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${output_ci}" - "${ROOT_DIR}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}" + "${HOMEgfs}/ci/scripts/pr_list_database.py" --remove_pr "${pr}" --dbfile "${pr_list_dbfile}" for kill_cases in "${pr_dir}/RUNTESTS/"*; do pslot=$(basename "${kill_cases}") cancel_slurm_jobs "${pslot}" diff --git a/ci/scripts/driver.sh b/ci/scripts/driver.sh index 5fc13ea524..f37b5e3f2e 100755 --- a/ci/scripts/driver.sh +++ b/ci/scripts/driver.sh @@ -47,12 +47,15 @@ esac ###################################################### # setup runtime env for correct python install and git ###################################################### +HOMEgfs=${ROOT_DIR} +export HOMEgfs set +x source "${ROOT_DIR}/ci/scripts/utils/ci_utils.sh" source "${ROOT_DIR}/ush/module-setup.sh" module use "${ROOT_DIR}/modulefiles" module load "module_gwsetup.${MACHINE_ID}" set -x +unset HOMEgfs ############################################################ # query repo and get list of open PRs with tags {machine}-CI diff --git a/ci/scripts/run_ci.sh b/ci/scripts/run_ci.sh index 4a390a23f2..f50a4465d0 100755 --- a/ci/scripts/run_ci.sh +++ b/ci/scripts/run_ci.sh @@ -9,7 +9,7 @@ set -eux # Abstract TODO ##################################################################################### -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )" +HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )" scriptname=$(basename "${BASH_SOURCE[0]}") echo "Begin ${scriptname} at $(date -u)" || true export PS4='+ $(basename ${BASH_SOURCE})[${LINENO}]' @@ -18,11 +18,11 @@ export PS4='+ $(basename ${BASH_SOURCE})[${LINENO}]' # Set up runtime environment varibles for accounts on supproted machines ######################################################################### -source "${ROOT_DIR}/ush/detect_machine.sh" +source "${HOMEgfs}/ush/detect_machine.sh" case ${MACHINE_ID} in hera | orion | hercules) echo "Running Automated Testing on ${MACHINE_ID}" - source "${ROOT_DIR}/ci/platforms/config.${MACHINE_ID}" + source "${HOMEgfs}/ci/platforms/config.${MACHINE_ID}" ;; *) echo "Unsupported platform. Exiting with error." @@ -30,8 +30,9 @@ case ${MACHINE_ID} in ;; esac set +x -source "${ROOT_DIR}/ush/module-setup.sh" -module use "${ROOT_DIR}/modulefiles" +export HOMEgfs +source "${HOMEgfs}/ush/module-setup.sh" +module use "${HOMEgfs}/modulefiles" module load "module_gwsetup.${MACHINE_ID}" module list set -eux @@ -47,7 +48,7 @@ pr_list_dbfile="${GFS_CI_ROOT}/open_pr_list.db" pr_list="" if [[ -f "${pr_list_dbfile}" ]]; then - pr_list=$("${ROOT_DIR}/ci/scripts/pr_list_database.py" --display --dbfile "${pr_list_dbfile}" | grep -v Failed | grep Open | grep Running | awk '{print $1}' | head -"${max_concurrent_pr}") || true + pr_list=$("${HOMEgfs}/ci/scripts/pr_list_database.py" --display --dbfile "${pr_list_dbfile}" | grep -v Failed | grep Open | grep Running | awk '{print $1}' | head -"${max_concurrent_pr}") || true fi if [[ -z "${pr_list}" ]]; then echo "no open and built PRs that are ready for the cases to advance with rocotorun .. exiting" From 094e3b86da44f1d3fc1d99f68f6fdfcd36deb09f Mon Sep 17 00:00:00 2001 From: Cory Martin Date: Thu, 15 Feb 2024 14:43:55 -0500 Subject: [PATCH 3/4] Move IMS remapping files from COM_OBS to FIXgdas (#2322) * Add in IMS obs fix directory and update submodule for gdas --- parm/config/gfs/config.base.emc.dyn | 1 + sorc/gdas.cd | 2 +- sorc/link_workflow.sh | 2 +- ush/python/pygfs/task/land_analysis.py | 2 +- versions/fix.ver | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/parm/config/gfs/config.base.emc.dyn b/parm/config/gfs/config.base.emc.dyn index 1f6568c3ee..48b66ab1b1 100644 --- a/parm/config/gfs/config.base.emc.dyn +++ b/parm/config/gfs/config.base.emc.dyn @@ -39,6 +39,7 @@ export FIXcice="${FIXgfs}/cice" export FIXmom="${FIXgfs}/mom6" export FIXreg2grb2="${FIXgfs}/reg2grb2" export FIXugwd="${FIXgfs}/ugwd" +export FIXgdas="${FIXgfs}/gdas" ######################################################################## diff --git a/sorc/gdas.cd b/sorc/gdas.cd index 831b08a3f9..b37680be78 160000 --- a/sorc/gdas.cd +++ b/sorc/gdas.cd @@ -1 +1 @@ -Subproject commit 831b08a3f947e8d743e2afbd6d38ecc4b0dec3b1 +Subproject commit b37680be78560343b940352b9b2c6727190a642c diff --git a/sorc/link_workflow.sh b/sorc/link_workflow.sh index 21bc30faa4..3e0ff4db64 100755 --- a/sorc/link_workflow.sh +++ b/sorc/link_workflow.sh @@ -190,7 +190,7 @@ if [[ -d "${HOMEgfs}/sorc/gdas.cd" ]]; then cd "${HOMEgfs}/fix" || exit 1 [[ ! -d gdas ]] && mkdir -p gdas cd gdas || exit 1 - for gdas_sub in fv3jedi gsibec; do + for gdas_sub in fv3jedi gsibec obs; do if [[ -d "${gdas_sub}" ]]; then rm -rf "${gdas_sub}" fi diff --git a/ush/python/pygfs/task/land_analysis.py b/ush/python/pygfs/task/land_analysis.py index 821caf2305..90ab997de1 100644 --- a/ush/python/pygfs/task/land_analysis.py +++ b/ush/python/pygfs/task/land_analysis.py @@ -153,7 +153,7 @@ def prepare_IMS(self) -> None: # create a temporary dict of all keys needed in this method localconf = AttrDict() keys = ['DATA', 'current_cycle', 'COM_OBS', 'COM_ATMOS_RESTART_PREV', - 'OPREFIX', 'CASE', 'OCNRES', 'ntiles'] + 'OPREFIX', 'CASE', 'OCNRES', 'ntiles', 'FIXgdas'] for key in keys: localconf[key] = self.task_config[key] diff --git a/versions/fix.ver b/versions/fix.ver index 13d9b56dd2..f230188dbb 100644 --- a/versions/fix.ver +++ b/versions/fix.ver @@ -10,6 +10,7 @@ export datm_ver=20220805 export gdas_crtm_ver=20220805 export gdas_fv3jedi_ver=20220805 export gdas_gsibec_ver=20221031 +export gdas_obs_ver=20240213 export glwu_ver=20220805 export gsi_ver=20230911 export lut_ver=20220805 From cf83885548bb3a6740c033f42479ce2ad283a4a9 Mon Sep 17 00:00:00 2001 From: Jessica Meixner Date: Fri, 16 Feb 2024 01:55:02 -0500 Subject: [PATCH 4/4] Add unstructured grid for HR3/GFS (#2230) This adds the capability to use unstructured grids in the global workflow, which will be used in HR3. There are new fix files for a low-resolution 100km grid and a grid closer to our targeted GFSv17 grid which has the resolution combined from the older multi_1 and GFSv16 grids. The fix file update is here: NOAA-EMC/global-workflow#2229 Note: This now means that GFS tests need a new build option: `./build_all.sh -w` So that PDLIB=ON is turned on for compiling relevant UFS and WW3 codes. Resolves NOAA-EMC/global-workflow#1547 --- ci/cases/pr/C48_S2SWA_gefs.yaml | 5 ++++ ci/cases/pr/C48mx500_3DVarAOWCDA.yaml | 2 +- ci/cases/yamls/build.yaml | 2 +- ci/scripts/clone-build_ci.sh | 2 +- docs/source/clone.rst | 7 ++++++ env/WCOSS2.env | 2 ++ parm/config/gfs/config.base.emc.dyn | 8 +++---- parm/config/gfs/config.resources | 4 ++-- parm/config/gfs/config.stage_ic | 16 ++++++------- parm/config/gfs/config.ufs | 10 +++++++- parm/config/gfs/config.wave | 14 +++++++++++- parm/wave/at_10m_interp.inp.tmpl | 2 +- parm/wave/ep_10m_interp.inp.tmpl | 2 +- parm/wave/glo_15mxt_interp.inp.tmpl | 6 ++--- parm/wave/glo_200_interp.inp.tmpl | 12 ++++++++++ parm/wave/glo_30m_interp.inp.tmpl | 6 ++--- parm/wave/wc_10m_interp.inp.tmpl | 2 +- scripts/exgfs_wave_init.sh | 13 ++++++++--- sorc/build_all.sh | 14 ++++++++---- sorc/build_ufs.sh | 4 +++- sorc/build_ww3prepost.sh | 33 +++++++++++++++++++-------- ush/wave_grid_moddef.sh | 16 +++++++++---- versions/fix.ver | 2 +- 23 files changed, 130 insertions(+), 54 deletions(-) create mode 100755 parm/wave/glo_200_interp.inp.tmpl diff --git a/ci/cases/pr/C48_S2SWA_gefs.yaml b/ci/cases/pr/C48_S2SWA_gefs.yaml index d42f4cd15b..de677a70b6 100644 --- a/ci/cases/pr/C48_S2SWA_gefs.yaml +++ b/ci/cases/pr/C48_S2SWA_gefs.yaml @@ -16,3 +16,8 @@ arguments: idate: 2021032312 edate: 2021032312 yaml: {{ HOMEgfs }}/ci/cases/yamls/gefs_ci_defaults.yaml + +skip_ci_on_hosts: + - hera + - orion + - hercules diff --git a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml index 6e9fc6d3de..d9156e38f3 100644 --- a/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml +++ b/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml @@ -17,7 +17,7 @@ arguments: start: warm yaml: {{ HOMEgfs }}/ci/cases/yamls/soca_gfs_defaults_ci.yaml -skip_ci_on_host: +skip_ci_on_hosts: - orion - hera - hercules diff --git a/ci/cases/yamls/build.yaml b/ci/cases/yamls/build.yaml index 5398fa1889..2ff008d372 100644 --- a/ci/cases/yamls/build.yaml +++ b/ci/cases/yamls/build.yaml @@ -1,3 +1,3 @@ builds: - gefs: './build_all.sh' - - gfs: './build_all.sh -gu' \ No newline at end of file + - gfs: './build_all.sh -wgu' diff --git a/ci/scripts/clone-build_ci.sh b/ci/scripts/clone-build_ci.sh index 798c98bf50..989afabb80 100755 --- a/ci/scripts/clone-build_ci.sh +++ b/ci/scripts/clone-build_ci.sh @@ -74,7 +74,7 @@ set +e source "${HOMEgfs}/ush/module-setup.sh" export BUILD_JOBS=8 rm -rf log.build -./build_all.sh -gu >> log.build 2>&1 +./build_all.sh -guw >> log.build 2>&1 build_status=$? DATE=$(date +'%D %r') diff --git a/docs/source/clone.rst b/docs/source/clone.rst index bad3f0e9f6..4f47eb230f 100644 --- a/docs/source/clone.rst +++ b/docs/source/clone.rst @@ -39,6 +39,13 @@ For coupled cycling (include new UFSDA) use the `-gu` options during build: ./build_all.sh -gu +For building with PDLIB for the wave model, use the `-w` options during build: + +:: + + ./build_all.sh -w + + Build workflow components and link workflow artifacts such as executables, etc. :: diff --git a/env/WCOSS2.env b/env/WCOSS2.env index bbf4de2ae3..e247a37bc9 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -176,6 +176,8 @@ elif [[ "${step}" = "fcst" ]] || [[ "${step}" = "efcs" ]]; then if [[ "${step}" = "fcst" ]]; then export OMP_PLACES=cores export OMP_STACKSIZE=2048M + export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" + export FI_OFI_RXM_SAR_LIMIT=3145728 elif [[ "${step}" = "efcs" ]]; then export MPICH_MPIIO_HINTS="*:romio_cb_write=disable" export FI_OFI_RXM_SAR_LIMIT=3145728 diff --git a/parm/config/gfs/config.base.emc.dyn b/parm/config/gfs/config.base.emc.dyn index 48b66ab1b1..4301679fbb 100644 --- a/parm/config/gfs/config.base.emc.dyn +++ b/parm/config/gfs/config.base.emc.dyn @@ -183,16 +183,16 @@ export ICERES="${OCNRES}" # These are the currently recommended grid-combinations case "${CASE}" in "C48") - export waveGRD='glo_500' + export waveGRD='uglo_100km' ;; "C96" | "C192") - export waveGRD='glo_200' + export waveGRD='uglo_100km' ;; "C384") - export waveGRD='glo_025' + export waveGRD='uglo_100km' ;; "C768" | "C1152") - export waveGRD='mx025' + export waveGRD='uglo_m1g16' ;; *) echo "FATAL ERROR: Unrecognized CASE ${CASE}, ABORT!" diff --git a/parm/config/gfs/config.resources b/parm/config/gfs/config.resources index ced6e6a3d8..afebc70ae2 100644 --- a/parm/config/gfs/config.resources +++ b/parm/config/gfs/config.resources @@ -737,7 +737,7 @@ case ${step} in export npe_genesis=1 export nth_genesis=1 export npe_node_genesis=1 - export memory_genesis="4G" + export memory_genesis="10G" ;; "genesis_fsu") @@ -745,7 +745,7 @@ case ${step} in export npe_genesis_fsu=1 export nth_genesis_fsu=1 export npe_node_genesis_fsu=1 - export memory_genesis_fsu="4G" + export memory_genesis_fsu="10G" ;; "fit2obs") diff --git a/parm/config/gfs/config.stage_ic b/parm/config/gfs/config.stage_ic index 7f3956af4d..dc224b72db 100644 --- a/parm/config/gfs/config.stage_ic +++ b/parm/config/gfs/config.stage_ic @@ -21,16 +21,16 @@ case "${CASE}" in export CPL_WAVIC=workflow_C384_refactored ;; "C768") - export CPL_ATMIC=HR2_refactored - export CPL_ICEIC=HR1_refactored - export CPL_OCNIC=HR1_refactored - export CPL_WAVIC=HR1_refactored + export CPL_ATMIC=HR3C768 + export CPL_ICEIC=HR3marine + export CPL_OCNIC=HR3marine + export CPL_WAVIC=HR3marine ;; "C1152") - export CPL_ATMIC=HR2_C1152_refactored - export CPL_ICEIC=HR3_refactored - export CPL_OCNIC=HR3_refactored - export CPL_WAVIC=HR1_refactored + export CPL_ATMIC=HR3C1152 + export CPL_ICEIC=HR3marine + export CPL_OCNIC=HR3marine + export CPL_WAVIC=HR3marine ;; *) echo "FATAL ERROR Unrecognized resolution: ${CASE}" diff --git a/parm/config/gfs/config.ufs b/parm/config/gfs/config.ufs index c8ce216899..2e299fddf7 100644 --- a/parm/config/gfs/config.ufs +++ b/parm/config/gfs/config.ufs @@ -15,7 +15,7 @@ if (( $# <= 1 )); then echo "--fv3 C48|C96|C192|C384|C768|C1152|C3072" echo "--mom6 500|100|025" echo "--cice6 500|100|025" - echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|glo_025|glo_200|glo_500|mx025" + echo "--ww3 gnh_10m;aoc_9km;gsh_15m|gwes_30m|glo_025|glo_200|glo_500|mx025|uglo_100km|uglo_m1g16" echo "--gocart" exit 1 @@ -416,6 +416,14 @@ if [[ "${skip_ww3}" == "false" ]]; then "mx025") ntasks_ww3=80 ;; + "uglo_100km") + ntasks_ww3=40 + nthreads_ww3=1 + ;; + "uglo_m1g16") + ntasks_ww3=1000 + nthreads_ww3=1 + ;; *) echo "FATAL ERROR: Unsupported WW3 resolution = ${ww3_res}, ABORT!" exit 1 diff --git a/parm/config/gfs/config.wave b/parm/config/gfs/config.wave index acb4c518ba..74f5b78937 100644 --- a/parm/config/gfs/config.wave +++ b/parm/config/gfs/config.wave @@ -80,7 +80,19 @@ case "${waveGRD}" in export wavepostGRD='glo_500' export waveuoutpGRD=${waveGRD} ;; - *) + "uglo_100km") + #unstructured 100km grid + export waveinterpGRD='glo_200' + export wavepostGRD='' + export waveuoutpGRD=${waveGRD} + ;; + "uglo_m1g16") + #unstructured m1v16 grid + export waveinterpGRD='glo_15mxt' + export wavepostGRD='' + export waveuoutpGRD=${waveGRD} + ;; + *) echo "FATAL ERROR: No grid specific wave config values exist for ${waveGRD}. Aborting." exit 1 ;; diff --git a/parm/wave/at_10m_interp.inp.tmpl b/parm/wave/at_10m_interp.inp.tmpl index b2a80081e1..6f4c1f7099 100755 --- a/parm/wave/at_10m_interp.inp.tmpl +++ b/parm/wave/at_10m_interp.inp.tmpl @@ -5,7 +5,7 @@ $ Start Time DT NSteps $ Total number of grids 2 $ Grid extensions - 'gnh_10m' + 'uglo_m1g16' 'at_10m' $ 0 diff --git a/parm/wave/ep_10m_interp.inp.tmpl b/parm/wave/ep_10m_interp.inp.tmpl index 0848854ccf..23cfd50c2e 100755 --- a/parm/wave/ep_10m_interp.inp.tmpl +++ b/parm/wave/ep_10m_interp.inp.tmpl @@ -5,7 +5,7 @@ $ Start Time DT NSteps $ Total number of grids 2 $ Grid extensions - 'gnh_10m' + 'uglo_m1g16' 'ep_10m' $ 0 diff --git a/parm/wave/glo_15mxt_interp.inp.tmpl b/parm/wave/glo_15mxt_interp.inp.tmpl index 74bc9eebf4..19e9dae684 100755 --- a/parm/wave/glo_15mxt_interp.inp.tmpl +++ b/parm/wave/glo_15mxt_interp.inp.tmpl @@ -3,11 +3,9 @@ $------------------------------------------------ $ Start Time DT NSteps TIME DT NSTEPS $ Total number of grids - 4 + 2 $ Grid extensions - 'gnh_10m' - 'aoc_9km' - 'gsh_15m' + 'uglo_m1g16' 'glo_15mxt' $ 0 diff --git a/parm/wave/glo_200_interp.inp.tmpl b/parm/wave/glo_200_interp.inp.tmpl new file mode 100755 index 0000000000..c238a6fe0b --- /dev/null +++ b/parm/wave/glo_200_interp.inp.tmpl @@ -0,0 +1,12 @@ +$ Input file for interpolation of GLO30m_ext Grid +$------------------------------------------------ +$ Start Time DT NSteps + TIME DT NSTEPS +$ Total number of grids + 2 +$ Grid extensions + 'uglo_100km' + 'glo_200' +$ + 0 +$ diff --git a/parm/wave/glo_30m_interp.inp.tmpl b/parm/wave/glo_30m_interp.inp.tmpl index ea1baf7fc4..c62881202c 100755 --- a/parm/wave/glo_30m_interp.inp.tmpl +++ b/parm/wave/glo_30m_interp.inp.tmpl @@ -3,11 +3,9 @@ $------------------------------------------------ $ Start Time DT NSteps TIME DT NSTEPS $ Total number of grids - 4 + 2 $ Grid extensions - 'gnh_10m' - 'aoc_9km' - 'gsh_15m' + 'uglo_m1g16' 'glo_30m' $ 0 diff --git a/parm/wave/wc_10m_interp.inp.tmpl b/parm/wave/wc_10m_interp.inp.tmpl index abb51b4dfc..8338c91d0c 100755 --- a/parm/wave/wc_10m_interp.inp.tmpl +++ b/parm/wave/wc_10m_interp.inp.tmpl @@ -5,7 +5,7 @@ $ Start Time DT NSteps $ Total number of grids 2 $ Grid extensions - 'gnh_10m' + 'uglo_m1g16' 'wc_10m' $ 0 diff --git a/scripts/exgfs_wave_init.sh b/scripts/exgfs_wave_init.sh index ce903a2284..03fd93bf48 100755 --- a/scripts/exgfs_wave_init.sh +++ b/scripts/exgfs_wave_init.sh @@ -118,6 +118,13 @@ source "${HOMEgfs}/ush/preamble.sh" err=2;export err;${errchk} fi + + if [ -f ${FIXwave}/${grdID}.msh ] + then + cp "${FIXwave}/${grdID}.msh" "${grdID}.msh" + fi + #TO DO: how do we say "it's unstructured, and therefore need to have error check here" + [[ ! -d "${COM_WAVE_PREP}" ]] && mkdir -m 775 -p "${COM_WAVE_PREP}" if [ ${CFP_MP:-"NO"} = "YES" ]; then echo "$nmoddef $USHwave/wave_grid_moddef.sh $grdID > $grdID.out 2>&1" >> cmdfile @@ -166,7 +173,7 @@ source "${HOMEgfs}/ush/preamble.sh" exit=$? fi - if [ "$exit" != '0' ] + if [[ "$exit" != '0' ]] then set +x echo ' ' @@ -195,9 +202,9 @@ source "${HOMEgfs}/ush/preamble.sh" echo '********************************************** ' echo '*** FATAL ERROR : NO MODEL DEFINITION FILE *** ' echo '********************************************** ' - echo " grdID = $grdID" + echo " grdID = ${grdID}" echo ' ' - sed "s/^/$grdID.out : /g" $grdID.out + sed "s/^/${grdID}.out : /g" "${grdID}.out" set_trace err=3;export err;${errchk} fi diff --git a/sorc/build_all.sh b/sorc/build_all.sh index c337374428..dd74c53487 100755 --- a/sorc/build_all.sh +++ b/sorc/build_all.sh @@ -16,7 +16,7 @@ function _usage() { Builds all of the global-workflow components by calling the individual build scripts in sequence. -Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-h][-j n][-v] +Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-h][-j n][-v][-w] -a UFS_app: Build a specific UFS app instead of the default -g: @@ -29,6 +29,8 @@ Usage: ${BASH_SOURCE[0]} [-a UFS_app][-c build_config][-h][-j n][-v] Build UFS-DA -v: Execute all build scripts with -v option to turn on verbose where supported + -w: + Use unstructured wave grid EOF exit 1 } @@ -40,10 +42,11 @@ _build_ufs_opt="" _build_ufsda="NO" _build_gsi="NO" _verbose_opt="" +_wave_unst="" _build_job_max=20 # Reset option counter in case this script is sourced OPTIND=1 -while getopts ":a:ghj:uv" option; do +while getopts ":a:ghj:uvw" option; do case "${option}" in a) _build_ufs_opt+="-a ${OPTARG} ";; g) _build_gsi="YES" ;; @@ -51,6 +54,7 @@ while getopts ":a:ghj:uv" option; do j) _build_job_max="${OPTARG} ";; u) _build_ufsda="YES" ;; v) _verbose_opt="-v";; + w) _wave_unst="-w";; :) echo "[${BASH_SOURCE[0]}]: ${option} requires an argument" _usage @@ -113,7 +117,7 @@ declare -A build_opts big_jobs=0 build_jobs["ufs"]=8 big_jobs=$((big_jobs+1)) -build_opts["ufs"]="${_verbose_opt} ${_build_ufs_opt}" +build_opts["ufs"]="${_wave_unst} ${_verbose_opt} ${_build_ufs_opt}" build_jobs["upp"]=6 # The UPP is hardcoded to use 6 cores build_opts["upp"]="" @@ -125,11 +129,11 @@ build_jobs["gfs_utils"]=1 build_opts["gfs_utils"]="${_verbose_opt}" build_jobs["ww3prepost"]=3 -build_opts["ww3prepost"]="${_verbose_opt} ${_build_ufs_opt}" +build_opts["ww3prepost"]="${_wave_unst} ${_verbose_opt} ${_build_ufs_opt}" # Optional DA builds if [[ "${_build_ufsda}" == "YES" ]]; then - if [[ "${MACHINE_ID}" != "orion" && "${MACHINE_ID}" != "hera.intel" && "${MACHINE_ID}" != "hercules" ]]; then + if [[ "${MACHINE_ID}" != "orion" && "${MACHINE_ID}" != "hera" && "${MACHINE_ID}" != "hercules" ]]; then echo "NOTE: The GDAS App is not supported on ${MACHINE_ID}. Disabling build." else build_jobs["gdas"]=8 diff --git a/sorc/build_ufs.sh b/sorc/build_ufs.sh index 3e3f879f1a..24ee8c5f13 100755 --- a/sorc/build_ufs.sh +++ b/sorc/build_ufs.sh @@ -7,12 +7,13 @@ cwd=$(pwd) APP="S2SWA" CCPP_SUITES="FV3_GFS_v17_p8_ugwpv1,FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: does the g-w need to build with all these CCPP_SUITES? -while getopts ":da:j:v" option; do +while getopts ":da:j:vw" option; do case "${option}" in d) BUILD_TYPE="DEBUG";; a) APP="${OPTARG}";; j) BUILD_JOBS="${OPTARG}";; v) export BUILD_VERBOSE="YES";; + w) PDLIB="ON";; :) echo "[${BASH_SOURCE[0]}]: ${option} requires an argument" ;; @@ -28,6 +29,7 @@ source "./tests/detect_machine.sh" source "./tests/module-setup.sh" MAKE_OPT="-DAPP=${APP} -D32BIT=ON -DCCPP_SUITES=${CCPP_SUITES}" +[[ ${PDLIB:-"OFF"} = "ON" ]] && MAKE_OPT+=" -DPDLIB=ON" [[ ${BUILD_TYPE:-"Release"} = "DEBUG" ]] && MAKE_OPT+=" -DDEBUG=ON" COMPILE_NR=0 CLEAN_BEFORE=YES diff --git a/sorc/build_ww3prepost.sh b/sorc/build_ww3prepost.sh index 919afaacb3..19cdba98da 100755 --- a/sorc/build_ww3prepost.sh +++ b/sorc/build_ww3prepost.sh @@ -6,12 +6,15 @@ cd "${script_dir}" || exit 1 # Default settings APP="S2SWA" +PDLIB="OFF" -while getopts ":j:a:v" option; do +while getopts ":j:a:dvw" option; do case "${option}" in a) APP="${OPTARG}";; + d) BUILD_TYPE="DEBUG";; j) BUILD_JOBS="${OPTARG}";; v) export BUILD_VERBOSE="YES";; + w) PDLIB="ON";; :) echo "[${BASH_SOURCE[0]}]: ${option} requires an argument" usage @@ -23,14 +26,16 @@ while getopts ":j:a:v" option; do esac done - # Determine which switch to use -if [[ "${APP}" == "ATMW" ]]; then +if [[ "${APP}" == "ATMW" ]]; then ww3switch="model/esmf/switch" -else - ww3switch="model/bin/switch_meshcap" -fi - +else + if [[ "${PDLIB}" == "ON" ]]; then + ww3switch="model/bin/switch_meshcap_pdlib" + else + ww3switch="model/bin/switch_meshcap" + fi +fi # Check final exec folder exists if [[ ! -d "../exec" ]]; then @@ -64,6 +69,8 @@ mkdir -p "${path_build}" || exit 1 cd "${path_build}" || exit 1 echo "Forcing a SHRD build" +buildswitch="${path_build}/switch" + cat "${SWITCHFILE}" > "${path_build}/tempswitch" sed -e "s/DIST/SHRD/g"\ @@ -73,15 +80,21 @@ sed -e "s/DIST/SHRD/g"\ -e "s/MPI / /g"\ -e "s/B4B / /g"\ -e "s/PDLIB / /g"\ + -e "s/SCOTCH / /g"\ + -e "s/METIS / /g"\ -e "s/NOGRB/NCEP2/g"\ "${path_build}/tempswitch" > "${path_build}/switch" rm "${path_build}/tempswitch" -echo "Switch file is ${path_build}/switch with switches:" -cat "${path_build}/switch" +echo "Switch file is ${buildswitch} with switches:" +cat "${buildswitch}" + +#define cmake build options +MAKE_OPT="-DCMAKE_INSTALL_PREFIX=install" +[[ ${BUILD_TYPE:-"Release"} = "DEBUG" ]] && MAKE_OPT+=" -DDEBUG=ON" #Build executables: -cmake "${WW3_DIR}" -DSWITCH="${path_build}/switch" -DCMAKE_INSTALL_PREFIX=install +cmake "${WW3_DIR}" -DSWITCH="${buildswitch}" "${MAKE_OPT}" rc=$? if (( rc != 0 )); then echo "Fatal error in cmake." diff --git a/ush/wave_grid_moddef.sh b/ush/wave_grid_moddef.sh index 5b1b212a16..f704c74af4 100755 --- a/ush/wave_grid_moddef.sh +++ b/ush/wave_grid_moddef.sh @@ -83,8 +83,16 @@ source "$HOMEgfs/ush/preamble.sh" rm -f ww3_grid.inp ln -sf ../ww3_grid.inp.$grdID ww3_grid.inp + + if [ -f ../${grdID}.msh ] + then + rm -f ${grdID}.msh + ln -sf ../${grdID}.msh ${grdID}.msh + fi + + - $EXECwave/ww3_grid 1> grid_${grdID}.out 2>&1 + "${EXECwave}/ww3_grid" 1> "grid_${grdID}.out" 2>&1 err=$? if [ "$err" != '0' ] @@ -99,10 +107,10 @@ source "$HOMEgfs/ush/preamble.sh" exit 3 fi - if [ -f mod_def.ww3 ] + if [[ -f mod_def.ww3 ]] then cp mod_def.ww3 "${COM_WAVE_PREP}/${RUN}wave.mod_def.${grdID}" - mv mod_def.ww3 ../mod_def.$grdID + mv mod_def.ww3 "../mod_def.${grdID}" else set +x echo ' ' @@ -118,6 +126,6 @@ source "$HOMEgfs/ush/preamble.sh" # 3. Clean up cd .. -rm -rf moddef_$grdID +rm -rf "moddef_${grdID}" # End of ww3_mod_def.sh ------------------------------------------------- # diff --git a/versions/fix.ver b/versions/fix.ver index f230188dbb..a2a9caf8e3 100644 --- a/versions/fix.ver +++ b/versions/fix.ver @@ -18,6 +18,6 @@ export mom6_ver=20231219 export orog_ver=20231027 export reg2grb2_ver=20220805 export sfc_climo_ver=20220805 -export ugwd_ver=20220805 +export ugwd_ver=20231027 export verif_ver=20220805 export wave_ver=20240105