Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…r-model into feature/optional_args_again
  • Loading branch information
dustinswales committed Feb 12, 2025
2 parents 533bbed + 38da98c commit a96f7bd
Show file tree
Hide file tree
Showing 61 changed files with 3,511 additions and 4,095 deletions.
11 changes: 11 additions & 0 deletions .cicd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ def generateStage(nodeLabel) {
catch(err) {
echo "Error: Post Results from ${nodeLabel}"
}
sh '''
export machine=${NODE_NAME}
export CHANGE_ID=${CHANGE_ID}
GIT_OWNER=$(echo $GIT_URL | cut -d '/' -f4)
GIT_REPO_NAME=$(echo $GIT_URL | cut -d '/' -f5 | cut -d '.' -f1)
set +x
echo "Testing concluded...removing label ${label} for ${machine} from ${GIT_URL}"
echo "https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels /${machine}-${label}"
curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels/{$machine-RT,$machine-BL}
'''
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions .cicd/scripts/disk_usage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ echo "script_dir=${script_dir}"
declare workspace
if [[ -d "${WORKSPACE}/${UFS_PLATFORM}" ]]; then
workspace="${WORKSPACE}/${UFS_PLATFORM}"
outfile="${4:-${workspace}-${UFS_PLATFORM}-${UFS_COMPILER}-disk-usage${STAGE_NAME%% *}.csv}"
outfile="${4:-${WORKSPACE}/${UFS_PLATFORM}-${UFS_COMPILER}-disk-usage${STAGE_NAME%% *}.csv}"
else
workspace="$(cd -- "${script_dir}/../.." && pwd)"
outfile="${4:-${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-disk-usage${STAGE_NAME%% *}.csv}"
outfile="${4:-${WORKSPACE}/${UFS_PLATFORM}-${UFS_COMPILER}-disk-usage${STAGE_NAME%% *}.csv}"
fi
echo "workspace=${workspace}"
echo "outfile=${outfile}"
Expand Down
13 changes: 0 additions & 13 deletions .cicd/scripts/post_test_results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ function post_test() {
GIT_URL=${GIT_URL:-"ufs-weather-model"}
CHANGE_ID=${CHANGE_ID:-"develop"}

GIT_OWNER=$(echo ${GIT_URL} | cut -d '/' -f4)
GIT_REPO_NAME=$(echo ${GIT_URL} | cut -d '/' -f5 | cut -d '.' -f1)

set +x
echo "GIT_URL=${GIT_URL}"
echo "CHANGE_ID=${CHANGE_ID}"
echo "GIT_OWNER=${GIT_OWNER} GIT_REPO_NAME=${GIT_REPO_NAME}"

echo "Testing concluded...removing label ${label} for ${machine} from ${GIT_URL}"
echo "https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels /${machine}-${label}"
curl --silent -X DELETE -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${GITHUB_TOKEN}" https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO_NAME}/issues/${CHANGE_ID}/labels/${machine}-${label}
set -x

git config user.email "ecc.platform@noaa.gov"
git config user.name "epic-cicd-jenkins"

Expand Down
2 changes: 1 addition & 1 deletion .cicd/scripts/wm_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module list
echo "Pipeline Building WM on ${UFS_PLATFORM} ${UFS_COMPILER} with Account=${ACCNR}."
export CMAKE_FLAGS="-DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16"
/usr/bin/time -p \
-o ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_build.json \
-o ${WORKSPACE:-$(pwd)}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_build.json \
-f '{\n "cpu": "%P"\n, "memMax": "%M"\n, "mem": {"text": "%X", "data": "%D", "swaps": "%W", "context": "%c", "waits": "%w"}\n, "pagefaults": {"major": "%F", "minor": "%R"}\n, "filesystem": {"inputs": "%I", "outputs": "%O"}\n, "time": {"real": "%e", "user": "%U", "sys": "%S"}\n}' \
./build.sh | tee ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-wm_build-log.txt
status=${PIPESTATUS[0]}
Expand Down
2 changes: 1 addition & 1 deletion .cicd/scripts/wm_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ fi
echo "machine_id=<${machine_id}>"

/usr/bin/time -p \
-o ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_init.json \
-o ${WORKSPACE:-$(pwd)}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_init.json \
-f '{\n "cpu": "%P"\n, "memMax": "%M"\n, "mem": {"text": "%X", "data": "%D", "swaps": "%W", "context": "%c", "waits": "%w"}\n, "pagefaults": {"major": "%F", "minor": "%R"}\n, "filesystem": {"inputs": "%I", "outputs": "%O"}\n, "time": {"real": "%e", "user": "%U", "sys": "%S"}\n}' \
pwd
4 changes: 2 additions & 2 deletions .cicd/scripts/wm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ if [[ ${WM_REGRESSION_TESTS} = true ]] ; then
ls -al .cicd/*
echo "Pipeline Creating Baseline Tests ${WM_OPERATIONAL_TESTS:=default} on ${UFS_PLATFORM} ${UFS_COMPILER}"
/usr/bin/time -p \
-o ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_test.json \
-o ${WORKSPACE:-$(pwd)}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_test.json \
-f '{\n "cpu": "%P"\n, "memMax": "%M"\n, "mem": {"text": "%X", "data": "%D", "swaps": "%W", "context": "%c", "waits": "%w"}\n, "pagefaults": {"major": "%F", "minor": "%R"}\n, "filesystem": {"inputs": "%I", "outputs": "%O"}\n, "time": {"real": "%e", "user": "%U", "sys": "%S"}\n}' \
./.cicd/scripts/create_baseline.sh | tee -a ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-wm_test-log.txt
status=${PIPESTATUS[0]}
Expand All @@ -113,7 +113,7 @@ if [[ ${WM_REGRESSION_TESTS} = true ]] ; then
ls -al .cicd/*
echo "Pipeline Running Regression Tests ${WM_OPERATIONAL_TESTS:=default} on ${UFS_PLATFORM} ${UFS_COMPILER}"
/usr/bin/time -p \
-o ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_test.json \
-o ${WORKSPACE:-$(pwd)}/${UFS_PLATFORM}-${UFS_COMPILER}-time-wm_test.json \
-f '{\n "cpu": "%P"\n, "memMax": "%M"\n, "mem": {"text": "%X", "data": "%D", "swaps": "%W", "context": "%c", "waits": "%w"}\n, "pagefaults": {"major": "%F", "minor": "%R"}\n, "filesystem": {"inputs": "%I", "outputs": "%O"}\n, "time": {"real": "%e", "user": "%U", "sys": "%S"}\n}' \
./.cicd/scripts/regression_test.sh | tee -a ${workspace}/${UFS_PLATFORM}-${UFS_COMPILER}-wm_test-log.txt
status=${PIPESTATUS[0]}
Expand Down
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ Please delete what is not needed.
- [ ] Hera
- [ ] Orion
- [ ] Hercules
- [ ] Jet
- [ ] GaeaC5
- [ ] GaeaC6
- [ ] Derecho
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ fail_compile_*
fail_test_*
tests/run_dir
tests/logs/log_*
compile_0_time.log
tests/modules.ufs_model.lua
tests/ufs_common.lua
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules/Modules)
###############################################################################

# Valid applications and choices
list(APPEND VALID_APPS ATM ATMAERO ATMAQ ATMW ATMWM ATML ATMF LND LND-LM4 S2S S2SA S2SW S2SWA S2SWAL ATM_DS2S ATM_DS2S-PCICE HAFS HAFSW HAFS-MOM6 HAFS-MOM6W HAFS-ALL NG-GODAS)
list(APPEND VALID_APPS ATM ATMAERO ATMAQ ATMW ATMWM ATML ATMF LND LND-LM4 S2S S2SL S2SA S2SW S2SWA S2SWL S2SWAL ATM_DS2S ATM_DS2S-PCICE HAFS HAFSW HAFS-MOM6 HAFS-MOM6W HAFS-ALL NG-GODAS)
set(APP NONE CACHE BOOL "Application Name")
if(NOT (APP IN_LIST VALID_APPS))
message(FATAL_ERROR "${APP} is not a valid application.\nValid Applications are: ${VALID_APPS}")
Expand Down Expand Up @@ -157,7 +157,7 @@ if(FMS)
find_package(FMS 2022.04 REQUIRED COMPONENTS R4 R8)
if(APP MATCHES "^(HAFSW)$")
add_library(fms ALIAS FMS::fms_r4)
elseif (APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL|ATM_DS2S|ATM_DS2S-PCICE|NG-GODAS|HAFS-MOM6|HAFS-MOM6W)$")
elseif (APP MATCHES "^(S2S|S2SA|S2SL|S2SW|S2SWL|S2SWA|S2SWAL|ATM_DS2S|ATM_DS2S-PCICE|NG-GODAS|HAFS-MOM6|HAFS-MOM6W)$")
add_library(fms ALIAS FMS::fms_r8)
endif()
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|ATMF|ATML-LM4|LND-LM4|HAFS|HAFS-ALL)$")
Expand Down
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 1 files
+14 −3 model/src/w3initmd.F90
6 changes: 3 additions & 3 deletions cmake/configure_apps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(APP MATCHES "^(NG-GODAS)$")
message("Configuring UFS app in (CDEPS) Data Atmosphere mode")
endif()

if(APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL)$")
if(APP MATCHES "^(S2S|S2SL|S2SA|S2SW|S2SWL|S2SWA|S2SWAL)$")
set(APP_MSG "Configuring UFS app in S2S")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
Expand All @@ -61,15 +61,15 @@ if(APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL)$")
set(CICE6 ON CACHE BOOL "Enable CICE6" FORCE)
set(CDEPS ON CACHE BOOL "Enable CDEPS" FORCE)
set(STOCH_PHYS ON CACHE BOOL "Enable Stochastic Physics" FORCE)
if(APP MATCHES "^(S2SW|S2SWA|S2SWAL)")
if(APP MATCHES "^(S2SW|S2SWL|S2SWA|S2SWAL)")
set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE)
string(CONCAT APP_MSG ${APP_MSG} " with Waves")
endif()
if(APP MATCHES "^(S2SA|S2SWA|S2SWAL)")
set(UFS_GOCART ON CACHE BOOL "Enable GOCART" FORCE)
string(CONCAT APP_MSG ${APP_MSG} " with Aerosols")
endif()
if(APP MATCHES "^S2SWAL")
if(APP MATCHES "^(S2SL|S2SWL|S2SWAL)")
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
endif()
message("${APP_MSG} mode")
Expand Down
32 changes: 0 additions & 32 deletions modulefiles/ufs_expanse.intel

This file was deleted.

20 changes: 0 additions & 20 deletions modulefiles/ufs_odin

This file was deleted.

55 changes: 0 additions & 55 deletions modulefiles/ufs_stampede.intel

This file was deleted.

2 changes: 1 addition & 1 deletion tests/bl_date.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export BL_DATE=20250107
export BL_DATE=20250205
4 changes: 4 additions & 0 deletions tests/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ else
fi
fi

if [[ ${MACHINE_ID} == wcoss2 ]] || [[ ${MACHINE_ID} == acorn ]]; then
CMAKE_FLAGS+=" -DENABLE_PARALLELRESTART=ON"
fi

# Check if suites argument is provided or not
set +ex
SUITES=$(grep -Po "\-DCCPP_SUITES=\K[^ ]*" <<< "${MAKE_OPT}")
Expand Down
39 changes: 13 additions & 26 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -363,20 +363,6 @@ elif [[ ${MACHINE_ID} = derecho ]]; then
export WPG_cpl_atmw_gdas=24
export WAV_tasks_atmw_gdas=248

elif [[ ${MACHINE_ID} = stampede ]]; then

echo "Unknown MACHINE_ID ${MACHINE_ID}. Please update tasks configurations in default_vars.sh"
exit 1

# TPN_dflt=48 ; INPES_dflt=3 ; JNPES_dflt=8
# TPN_thrd=24 ; INPES_thrd=3 ; JNPES_thrd=4
# TPN_c384=20 ; INPES_c384=8 ; JNPES_c384=6
# TPN_c768=20 ; INPES_c768=8 ; JNPES_c768=16
# TPN_stretch=12 ; INPES_stretch=2 ; JNPES_stretch=4

# TPN_cpl_atmw_gdas=12; INPES_cpl_atmw_gdas=6; JNPES_cpl_atmw_gdas=8
# THRD_cpl_atmw_gdas=4; WPG_cpl_atmw_gdas=24; APB_cpl_atmw_gdas="0 311"; WPB_cpl_atmw_gdas="312 559"

elif [[ ${MACHINE_ID} = noaacloud ]] ; then

if [[ ${PW_CSP} == aws ]]; then
Expand Down Expand Up @@ -415,18 +401,6 @@ elif [[ ${MACHINE_ID} = noaacloud ]] ; then
export ICE_tasks_cpl_thrd=10
export WAV_tasks_cpl_thrd=12

elif [[ ${MACHINE_ID} = expanse ]]; then

echo "Unknown MACHINE_ID ${MACHINE_ID}. Please update tasks configurations in default_vars.sh"
exit 1

# TPN_dflt=64 ; INPES_dflt=3 ; JNPES_dflt=8
# TPN_thrd=64 ; INPES_thrd=3 ; JNPES_thrd=4
# TPN_stretch=12 ; INPES_stretch=2 ; JNPES_stretch=4

# TPN_cpl_atmw_gdas=12; INPES_cpl_atmw_gdas=6; JNPES_cpl_atmw_gdas=8
# THRD_cpl_atmw_gdas=2; WPG_cpl_atmw_gdas=24; APB_cpl_atmw_gdas="0 311"; WPB_cpl_atmw_gdas="312 559"

else

echo "Unknown MACHINE_ID ${MACHINE_ID}"
Expand Down Expand Up @@ -566,6 +540,7 @@ export OUTPUT_HISTORY=.true.
export HISTORY_FILE_ON_NATIVE_GRID=.false.
export WRITE_DOPOST=.false.
export NUM_FILES=2
export FV3ATM_OUTPUT_DIR="./"
export FILENAME_BASE="'atm' 'sfc'"
export OUTPUT_GRID="'cubed_sphere_grid'"
export OUTPUT_FILE="'netcdf'"
Expand Down Expand Up @@ -1061,6 +1036,18 @@ export FNSNOC="'global_snoclim.1.875.grb'"
export FNZORC="'igbp'"
export FNAISC="'IMS-NIC.blended.ice.monthly.clim.grb'"
export LDEBUG=.false.

# Land IAU defaults
export DO_LAND_IAU=.false.
export LAND_IAU_FHRS=3,6,9
export LAND_IAU_DELHRS=6
export LAND_IAU_INC_FILES="'sfc_inc',''"
export LSOIL_INCR=3
export LAND_IAU_FILTER_INC=.false.
export LAND_IAU_UPD_STC=.true.
export LAND_IAU_UPD_SLC=.true.
export LAND_IAU_DP_STCSMC_ADJ=.true.
export LAND_IAU_MIN_T_INC=0.0001
}

# Add section for tiled grid namelist
Expand Down
4 changes: 0 additions & 4 deletions tests/detect_machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ case $(hostname -f) in
derecho7.hsn.de.hpc.ucar.edu) MACHINE_ID=derecho ;; ### derecho7
derecho8.hsn.de.hpc.ucar.edu) MACHINE_ID=derecho ;; ### derecho8

login[1-4].stampede2.tacc.utexas.edu) MACHINE_ID=stampede ;; ### stampede1-4

login[1-4].frontera.tacc.utexas.edu) MACHINE_ID=frontera ;; ### frontera1-4
c*.frontera.tacc.utexas.edu) MACHINE_ID=frontera ;; ### frontera compute

login0[1-2].expanse.sdsc.edu) MACHINE_ID=expanse ;; ### expanse1-2

discover3[1-5].prv.cube) MACHINE_ID=discover ;; ### discover31-35
*) MACHINE_ID=UNKNOWN ;; # Unknown platform
esac
Expand Down
6 changes: 1 addition & 5 deletions tests/fv3_conf/control_run.IN
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ else
fi

if [ $TILEDFIX = .true. ]; then
if [ $CPLLND == .true. ]; then
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc INPUT/.
else
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc .
fi
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc .
cp @[INPUTDATA_ROOT]/FV3_fix/global_glacier.2x2.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/global_maxice.2x2.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/RTGSST.1982.2012.monthly.clim.grb .
Expand Down
Loading

0 comments on commit a96f7bd

Please sign in to comment.