Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langmuir turbulence parameterization for WW3 #2188

6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
branch = develop
[submodule "WW3"]
path = WW3
url = https://github.com/NOAA-EMC/WW3
branch = dev/ufs-weather-model
# url = https://github.com/NOAA-EMC/WW3
# branch = dev/ufs-weather-model
url = https://github.com/ESCOMP/WW3
branch = sync-dev/unified
[submodule "stochastic_physics"]
path = stochastic_physics
url = https://github.com/NOAA-PSL/stochastic_physics
Expand Down
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 39 files
+13 −5 .github/workflows/intel.yml
+38 −11 model/inp/ww3_grid.inp
+1 −1 model/inp/ww3_ounf.inp
+4 −3 model/inp/ww3_shel.inp
+24 −52 model/src/w3adatmd.F90
+11 −0 model/src/w3gdatmd.F90
+17 −1 model/src/w3gridmd.F90
+6 −15 model/src/w3idatmd.F90
+21 −12 model/src/w3initmd.F90
+71 −172 model/src/w3iogomd.F90
+3 −6 model/src/w3iogoncdmd.F90
+10 −0 model/src/w3iogrmd.F90
+18 −0 model/src/w3iorsmd.F90
+2 −4 model/src/w3odatmd.F90
+25 −0 model/src/w3ounfmetamd.F90
+12 −2 model/src/wav_comp_nuopc.F90
+4 −3 model/src/wav_grdout.F90
+46 −10 model/src/wav_import_export.F90
+18 −1 model/src/ww3_ounf.F90
+52 −1 model/src/ww3_outf.F90
+121 −110 regtests/bin/matrix.base
+7 −6 regtests/bin/matrix_cmake_datarmor
+9 −8 regtests/bin/matrix_cmake_milhydro
+1 −0 regtests/bin/matrix_cmake_ncep
+6 −5 regtests/bin/matrix_cmake_ukmo_cray
+58 −0 regtests/ww3_tp2.22/info
+1 −0 regtests/ww3_tp2.22/input/switch
+6 −0 regtests/ww3_tp2.22/input/track_i.ww3
+33 −0 regtests/ww3_tp2.22/input/ww3_grid.inp
+33 −0 regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp
+43 −0 regtests/ww3_tp2.22/input/ww3_ounf.inp
+119 −0 regtests/ww3_tp2.22/input/ww3_ounp.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outf.inp
+11 −0 regtests/ww3_tp2.22/input/ww3_outp_spec.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab51.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab52.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab53.inp
+42 −0 regtests/ww3_tp2.22/input/ww3_shel.inp
+5 −0 regtests/ww3_tp2.22/input/ww3_strt.inp
47 changes: 24 additions & 23 deletions tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ usage() {
update_rtconf() {

find_match() {
# This function finds if a test in $TESTS_FILE matches one
# This function finds if a test in $TESTS_FILE matches one
# in our list of tests to be run.
THIS_TEST_WITH_COMPILER=$1
shift
Expand Down Expand Up @@ -75,13 +75,13 @@ update_rtconf() {
RT_TEMP_CONF="rt_temp.conf"
rm -f $RT_TEMP_CONF && touch $RT_TEMP_CONF
local compile_line=''

while read -r line || [ "$line" ]; do
line="${line#"${line%%[![:space:]]*}"}"
[[ -n $line ]] || continue
[[ ${#line} == 0 ]] && continue
[[ $line == \#* ]] && continue

if [[ $line =~ COMPILE ]] ; then
MACHINES=$(echo $line | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//')
RT_COMPILER_IN=$(echo $line | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//')
Expand Down Expand Up @@ -109,24 +109,24 @@ update_rtconf() {
fi
if [[ $to_run_test == true ]]; then
TEST_IDX=$(find_match "$tmp_test $RT_COMPILER_IN" "${TEST_WITH_COMPILE[@]}")

if [[ $TEST_IDX != -1 ]]; then
if [[ $COMPILE_LINE_USED == false ]]; then
echo -en '\n' >> $RT_TEMP_CONF
echo "$compile_line" >> $RT_TEMP_CONF
COMPILE_LINE_USED=true
fi
dep_test=$(echo "$line" | grep -w "$tmp_test" | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//')

if [[ $dep_test != '' ]]; then
if [[ $(find_match "$dep_test $RT_COMPILER_IN" "${TEST_WITH_COMPILE[@]}") == -1 ]]; then

dep_line=$(grep -w "$dep_test" rt.conf | grep -v "$tmp_test")
dep_line="${dep_line#"${dep_line%%[![:space:]]*}"}"
dep_line=$(echo "${dep_line}" | tr -d '\n')
CORRECT_LINE[1]=$(awk -F'RUN|RUN' '{print $2}' <<< "$dep_line")
CORRECT_LINE[2]=$(awk -F'RUN|RUN' '{print $3}' <<< "$dep_line")

if [[ $RT_COMPILER_IN == "intel" ]]; then
echo "RUN ${CORRECT_LINE[1]}" >> $RT_TEMP_CONF
elif [[ $RT_COMPILER_IN == "gnu" ]]; then
Expand All @@ -135,7 +135,7 @@ update_rtconf() {
fi
fi
echo "$line" >> $RT_TEMP_CONF
fi
fi
fi
fi
done < "$TESTS_FILE"
Expand Down Expand Up @@ -174,7 +174,7 @@ EOF
git submodule status >> "${REGRESSIONTEST_LOG}"
echo; echo >> "${REGRESSIONTEST_LOG}"
cd tests

cat << EOF >> "${REGRESSIONTEST_LOG}"

NOTES:
Expand Down Expand Up @@ -214,12 +214,12 @@ EOF
local valid_test=false

if [[ $line == COMPILE* ]] ; then

CMACHINES=$(echo "$line" | cut -d'|' -f5 | sed -e 's/^ *//' -e 's/ *$//')
COMPILER=$(echo "$line" | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//')
COMPILE_NAME=$(echo "$line" | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//')
COMPILE_ID=${COMPILE_NAME}_${COMPILER}

if [[ ${CMACHINES} == '' ]]; then
valid_compile=true
elif [[ ${CMACHINES} == -* ]]; then
Expand All @@ -241,7 +241,7 @@ EOF
elif [[ -f fail_compile_${COMPILE_ID} ]]; then
COMPILE_RESULT="FAIL TO RUN"
FAIL_LOG="${LOG_DIR}/compile_${COMPILE_ID}.log"
else
else
if grep -q "quota" "${LOG_DIR}/compile_${COMPILE_ID}.log"; then
COMPILE_RESULT="FAIL FROM DISK QUOTA"
FAIL_LOG="${LOG_DIR}/compile_${COMPILE_ID}.log"
Expand Down Expand Up @@ -282,7 +282,7 @@ EOF
RMACHINES=$(echo "$line" | cut -d'|' -f3 | sed -e 's/^ *//' -e 's/ *$//')
TEST_NAME=$(echo "$line" | cut -d'|' -f2 | sed -e 's/^ *//' -e 's/ *$//')
GEN_BASELINE=$(echo "$line" | cut -d'|' -f4 | sed -e 's/^ *//' -e 's/ *$//')

if [[ ${RMACHINES} == '' ]]; then
valid_test=true
elif [[ ${RMACHINES} == -* ]]; then
Expand Down Expand Up @@ -321,7 +321,7 @@ EOF
TEST_RESULT="FAIL FROM TIMEOUT"
FAIL_LOG="${LOG_DIR}/run_${TEST_NAME}_${COMPILER}.log"
else

TEST_RESULT="PASS"
TIME_FILE="${LOG_DIR}/run_${TEST_NAME}_${COMPILER}_timestamp.txt"
GETMEMFROMLOG=$(grep "The maximum resident set size" "${LOG_DIR}/rt_${TEST_NAME}_${COMPILER}.log")
Expand Down Expand Up @@ -351,9 +351,9 @@ EOF
fi
fi
done < "$TESTS_FILE"

elapsed_time=$( printf '%02dh:%02dm:%02ds\n' $((SECONDS%86400/3600)) $((SECONDS%3600/60)) $((SECONDS%60)) )

cat << EOF >> "${REGRESSIONTEST_LOG}"

SYNOPSIS:
Expand All @@ -371,18 +371,18 @@ EOF
echo "-- LOG: ${FAILED_COMPILE_LOGS[$i]}" >> "${REGRESSIONTEST_LOG}"
done
fi

# PRINT FAILED TESTS
if [[ "${#FAILED_TESTS[@]}" -ne "0" ]]; then

echo "Failed Tests:" >> ${REGRESSIONTEST_LOG}
for j in "${!FAILED_TESTS[@]}"; do
echo "* ${FAILED_TESTS[$j]}" >> "${REGRESSIONTEST_LOG}"
echo "-- LOG: ${FAILED_TEST_LOGS[$j]}" >> "${REGRESSIONTEST_LOG}"
done

fi

# WRITE FAILED_TEST_ID LIST TO TEST_CHANGES_LOG
if [[ "${#FAILED_TESTS[@]}" -ne "0" ]]; then
for item in "${FAILED_TEST_ID[@]}"; do
Expand Down Expand Up @@ -659,7 +659,7 @@ elif [[ $MACHINE_ID = gaea ]]; then
ROCOTOCOMPLETE=$(which rocotocomplete)
ROCOTO_SCHEDULER=slurm


module load PrgEnv-intel/8.3.3
module load intel-classic/2023.1.0
module load cray-mpich/8.1.25
Expand Down Expand Up @@ -761,7 +761,7 @@ elif [[ $MACHINE_ID = jet ]]; then
echo "=======Please, move to Rocky8 node fe[5-8]======="
exit 1
fi

module load rocoto
ROCOTORUN=$(which rocotorun)
ROCOTOSTAT=$(which rocotostat)
Expand Down Expand Up @@ -935,7 +935,8 @@ if [[ "$CREATE_BASELINE" == false ]] ; then
fi

INPUTDATA_ROOT=${INPUTDATA_ROOT:-$DISKNM/NEMSfv3gfs/input-data-20221101}
INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20220624
#INPUTDATA_ROOT_WW3=${INPUTDATA_ROOT}/WW3_input_data_20220624
INPUTDATA_ROOT_WW3=/scratch1/NCEPDEV/climate/Matthew.Masarik/waves/share/ufs/moddefs/WW3_input_data_20240214
INPUTDATA_ROOT_BMIC=${INPUTDATA_ROOT_BMIC:-$DISKNM/NEMSfv3gfs/BM_IC-20220207}

shift $((OPTIND-1))
Expand Down