-
Notifications
You must be signed in to change notification settings - Fork 175
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
Various wave updates: Reformat WW3 inputs; enable PIO for wave restarts; enable WW3 cycling; synchronize UFS restart writes; add uglo_15km WW3 grid #3190
base: develop
Are you sure you want to change the base?
Changes from 82 commits
54dd21b
5069875
0791f27
dfbdf63
2685096
37ae897
fcc0979
ffea11d
2b33cd5
a3d9b4c
1149faf
67b5f54
c470488
b575ff6
8020fc7
94f9f2a
e3a1bd9
886e638
cf21059
32ec7b2
d5335a1
bdce86f
0ee666d
26a0c42
89225c5
6eb5778
6d5eb04
d526db6
47be8b3
0be2ee2
bcfdd61
0943e5e
b234886
37e5df4
28b5608
6be3977
e10680c
593fe7c
0a8dfa8
83d3baa
69f4998
77a9ed5
a92fe59
5f1c12e
f317180
3e838b7
151d5ee
6de3b03
e940cb6
ed53409
7794784
cea2a52
b1d31ca
7910cbe
c1b6730
9094b60
ce91f63
9955dbd
554b017
aeaa85a
cacbb16
159496e
8971454
4097a37
6741814
d0d4661
4ff02a2
b74305a
77e24e2
b09ddff
b20d9a7
0ab6a40
a4721c0
6ff0ce7
cb97cf6
300c1de
b1b7cd0
521f4d3
cdc5a9c
a381d54
951a117
e889719
49ff12d
84989e6
db8f725
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
+1 −0 | CDEPS-interface/cdeps_files.cmake | |
+137 −0 | CDEPS-interface/ufs/cdeps_share/shr_is_restart_fh_mod.F90 | |
+1 −1 | CICE-interface/CICE | |
+1 −1 | CICE-interface/CMakeLists.txt | |
+5 −2 | CICE-interface/cice_files.cmake | |
+1 −1 | CMEPS-interface/CMEPS | |
+2 −1 | CMEPS-interface/CMakeLists.txt | |
+1 −1 | MOM6-interface/MOM6 | |
+4 −0 | MOM6-interface/mom6_files.cmake | |
+1 −1 | WW3 | |
+1 −1 | tests/bl_date.conf | |
+2 −0 | tests/default_vars.sh | |
+261 −261 | tests/logs/RegressionTests_acorn.log | |
+285 −284 | tests/logs/RegressionTests_derecho.log | |
+376 −300 | tests/logs/RegressionTests_gaea.log | |
+382 −381 | tests/logs/RegressionTests_hera.log | |
+383 −382 | tests/logs/RegressionTests_hercules.log | |
+287 −276 | tests/logs/RegressionTests_jet.log | |
+377 −295 | tests/logs/RegressionTests_orion.log | |
+305 −236 | tests/logs/RegressionTests_wcoss2.log | |
+1 −0 | tests/parm/datm_cdeps_configure.IN | |
+1 −0 | tests/parm/model_configure.IN | |
+3 −110 | tests/test_changes.list | |
+6 −1 | tests/tests/cpld_control_p8 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,10 +337,9 @@ FV3_out() { | |
# shellcheck disable=SC2034 | ||
WW3_postdet() { | ||
echo "SUB ${FUNCNAME[0]}: Linking input data for WW3" | ||
|
||
local ww3_grid first_ww3_restart_out ww3_restart_file | ||
# Copy initial condition files: | ||
local restart_date restart_dir | ||
local restart_date restart_dir seconds | ||
if [[ "${RERUN}" == "YES" ]]; then | ||
restart_date="${RERUN_DATE}" | ||
restart_dir="${DATArestart}/WW3_RESTART" | ||
|
@@ -350,27 +349,52 @@ WW3_postdet() { | |
fi | ||
|
||
echo "Copying WW3 restarts for 'RUN=${RUN}' at '${restart_date}' from '${restart_dir}'" | ||
|
||
ww3_restart_file="${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3" | ||
if [[ -s "${ww3_restart_file}" ]]; then | ||
#first check if a binary restart exists, if it does set | ||
export WW3_restart_from_binary=true | ||
${NCP} "${ww3_restart_file}" "${DATA}/restart.ww3" \ | ||
|| ( echo "FATAL ERROR: Unable to copy WW3 IC, ABORT!"; exit 1 ) | ||
|| ( echo "FATAL ERROR: Unable to copy WW3 IC, ABORT!"; exit 1 ) | ||
first_ww3_restart_out=$(date --utc -d "${restart_date:0:8} ${restart_date:8:2} + ${restart_interval} hours" +%Y%m%d%H) | ||
if [[ "${DOIAU:-NO}" == "YES" ]]; then | ||
first_ww3_restart_out=$(date --utc -d "${first_ww3_restart_out:0:8} ${first_ww3_restart_out:8:2} + ${half_window} hours" +%Y%m%d%H) | ||
fi | ||
else | ||
if [[ "${RERUN}" == "YES" ]]; then | ||
# In the case of a RERUN, the WW3 restart file is required | ||
echo "FATAL ERROR: WW3 restart file '${ww3_restart_file}' not found for RERUN='${RERUN}', ABORT!" | ||
exit 1 | ||
else | ||
echo "WARNING: WW3 restart file '${ww3_restart_file}' not found for warm_start='${warm_start}', will start from rest!" | ||
first_ww3_restart_out=${model_start_date_current_cycle} | ||
# now check to see if a NetCDF restart exists: | ||
seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds | ||
ww3_restart_dest_file="ufs.cpld.ww3.r.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" | ||
|
||
ww3_restart_file="${restart_dir}/${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3.nc" | ||
if [[ -s "${ww3_restart_file}" ]]; then | ||
# NetCDF restart exists: | ||
export WW3_restart_from_binary=false | ||
${NCP} "${ww3_restart_file}" "${DATA}/${ww3_restart_dest_file}" \ | ||
|| ( echo "FATAL ERROR: Unable to copy WW3 IC, ABORT!"; exit 1 ) | ||
first_ww3_restart_out=$(date --utc -d "${restart_date:0:8} ${restart_date:8:2} + ${restart_interval} hours" +%Y%m%d%H) | ||
if [[ "${DOIAU:-NO}" == "YES" ]]; then | ||
first_ww3_restart_out=$(date --utc -d "${first_ww3_restart_out:0:8} ${first_ww3_restart_out:8:2} + ${half_window} hours" +%Y%m%d%H) | ||
fi | ||
else | ||
if [[ "${RERUN}" == "YES" ]]; then | ||
# In the case of a RERUN, the WW3 restart file is required | ||
echo "FATAL ERROR: WW3 restart file '${ww3_restart_file}' not found for RERUN='${RERUN}', ABORT!" | ||
exit 1 | ||
else | ||
# TODO: See if this will work still with new options... might not | ||
echo "WARNING: WW3 restart file '${ww3_restart_file}' not found for warm_start='${warm_start}', will start from rest!" | ||
first_ww3_restart_out=${model_start_date_current_cycle} | ||
fi | ||
fi | ||
fi | ||
|
||
# Link restart files | ||
for (( vdate = first_ww3_restart_out; vdate <= forecast_end_cycle; | ||
vdate = $(date --utc -d "${vdate:0:8} ${vdate:8:2} + ${restart_interval} hours" +%Y%m%d%H) )); do | ||
ww3_restart_file="${vdate:0:8}.${vdate:8:2}0000.restart.ww3" | ||
${NLN} "${DATArestart}/WW3_RESTART/${ww3_restart_file}" "${ww3_restart_file}" | ||
seconds=$(to_seconds "${vdate:8:2}0000") # convert HHMMSS to seconds | ||
ww3_restart_ufs_file="ufs.cpld.ww3.r.${vdate:0:4}-${vdate:4:2}-${vdate:6:2}-${seconds}.nc" | ||
ww3_restart_file="${vdate:0:8}.${vdate:8:2}0000.restart.ww3.nc" | ||
${NLN} "${DATArestart}/WW3_RESTART/${ww3_restart_file}" "${ww3_restart_ufs_file}" | ||
done | ||
|
||
# Link output files | ||
|
@@ -425,7 +449,41 @@ WW3_nml() { | |
|
||
WW3_out() { | ||
echo "SUB ${FUNCNAME[0]}: Copying output data for WW3" | ||
# TODO: Need to add logic to copy restarts from DATArestart/WW3_RESTART to COMOUT_WAVE_RESTART | ||
|
||
# Copy wave namelist from DATA to COMOUT_CONF after the forecast is run (and successfull) | ||
${NCP} "${DATA}/ww3_shel.nml" "${COMOUT_CONF}/ufs.ww3_shel.nml" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine, but beware that in |
||
|
||
# Copy WW3 restarts at the end of the forecast segment to COM for RUN=gfs|gefs | ||
if [[ "${COPY_FINAL_RESTARTS}" == "YES" ]]; then | ||
local seconds source_file target_file | ||
if [[ "${RUN}" == "gfs" || "${RUN}" == "gefs" ]]; then | ||
echo "Copying WW3 restarts for 'RUN=${RUN}' at ${forecast_end_cycle}" | ||
target_file="${forecast_end_cycle:0:8}.${forecast_end_cycle:8:2}0000.restart.ww3.nc" | ||
${NCP} "${DATArestart}/WW3_RESTART/${target_file}" \ | ||
"${COMOUT_WAVE_RESTART}/${target_file}" | ||
fi | ||
fi | ||
|
||
# Copy restarts for next cycle for RUN=gdas|gefs | ||
if [[ "${RUN}" == "gdas" || "${RUN}" == "gefs" ]]; then | ||
local restart_date | ||
restart_date="${model_start_date_next_cycle}" | ||
echo "Copying WW3 restarts for 'RUN=${RUN}' at ${restart_date}" | ||
target_file="${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3.nc" | ||
${NCP} "${DATArestart}/WW3_RESTART/${target_file}" \ | ||
"${COMOUT_WAVE_RESTART}/${target_file}" | ||
fi | ||
|
||
# Copy restarts for downstream usage in HAFS | ||
if [[ "${RUN}" =~ "gdas" ]]; then | ||
JessicaMeixner-NOAA marked this conversation as resolved.
Show resolved
Hide resolved
|
||
local restart_date | ||
restart_date="${next_cycle}" | ||
echo "Copying WW3 restarts for 'RUN=${RUN}' at ${restart_date}" | ||
target_file="${restart_date:0:8}.${restart_date:8:2}0000.restart.ww3.nc" | ||
${NCP} "${DATArestart}/WW3_RESTART/${target_file}" \ | ||
"${COMOUT_WAVE_RESTART}/${target_file}" | ||
fi | ||
|
||
} | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,29 @@ | |
# Several model components share DATA/INPUT for input data | ||
if [[ ! -d "${DATA}/INPUT" ]]; then mkdir -p "${DATA}/INPUT"; fi | ||
|
||
# For CMEPS, CICE, MOM6 and WW3 determine restart writes | ||
# Note FV3 has its own restart intervals | ||
cmeps_restart_interval=${restart_interval:-${FHMAX}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a common variable if it starts w/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would you prefer it be called? This is for CMEPS, WW3, ICE, and MOM6 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not the name, but the place these are introduced. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the additional explanation. I will move it to CMEPS! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done! |
||
# restart_interval = 0 implies write restart at the END of the forecast i.e. at FHMAX | ||
# Convert restart interval into an explicit list for FV3 | ||
if (( cmeps_restart_interval == 0 )); then | ||
if [[ "${DOIAU:-NO}" == "YES" ]]; then | ||
CMEPS_RESTART_FH=$(( FHMAX + half_window )) | ||
else | ||
CMEPS_RESTART_FH=("${FHMAX}") | ||
fi | ||
else | ||
if [[ "${DOIAU:-NO}" == "YES" ]]; then | ||
local restart_interval_start=$(( cmeps_restart_interval + half_window )) | ||
local restart_interval_end=$(( FHMAX + half_window )) | ||
else | ||
local restart_interval_start=${cmeps_restart_interval} | ||
local restart_interval_end=${FHMAX} | ||
fi | ||
CMEPS_RESTART_FH="$(seq -s ' ' "${restart_interval_start}" "${cmeps_restart_interval}" "${restart_interval_end}")" | ||
Check warning Code scanning / shellcheck Variable was used as an array but is now assigned a string. Warning
Variable was used as an array but is now assigned a string.
|
||
fi | ||
# TODO: For GEFS, once cycling waves "self-cycles" and therefore needs to have a restart at 6 hour | ||
|
||
} | ||
|
||
# shellcheck disable=SC2034 | ||
|
@@ -606,6 +629,12 @@ | |
#if shel, only 1 waveGRD which is linked to mod_def.ww3 | ||
${NCP} "${COMIN_WAVE_PREP}/${RUN}wave.mod_def.${waveGRD}" "${DATA}/mod_def.ww3" \ | ||
|| ( echo "FATAL ERROR: Failed to copy '${RUN}wave.mod_def.${waveGRD}' from '${COMIN_WAVE_PREP}'"; exit 1 ) | ||
# copy point weights file for unstructured grid if it exists | ||
local wavpntwghtfile=${FIXgfs}/wave/pnt_wght.${waveGRD}.nc | ||
if [[ -f "${wavpntwghtfile}" ]]; then | ||
${NCP} "${wavpntwghtfile}" "${DATA}/pnt_wght.ww3.nc" \ | ||
|| ( echo "FATAL ERROR: Failed to copy '${wavpntwghtfile}'"; exit 1 ) | ||
fi | ||
fi | ||
|
||
if [[ "${WW3ICEINP}" == "YES" ]]; then | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ local SHOUR=${model_start_date:8:2} | |
local FHROT=${IAU_FHROT:-0} | ||
local DT_ATMOS=${DELTIM} | ||
local RESTART_INTERVAL="${FV3_RESTART_FH[*]}" | ||
local RESTART_FH="${CMEPS_RESTART_FH:-" "}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure introducing a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The RESART_FH variable is not used by FV3, however it is in the model_configure file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also - please note this is what is being done in this PR: ufs-community/ufs-weather-model#2419 so if you want changes we'll potentially need changes to ufs-weather-model There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the FV3 does not use this variable, can we just set this as: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This assumes the restarts are written according to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I misunderstood this comment that said the FV3 does not use this variable. Does the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From @NickSzapiro-NOAA in an email:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aerorahul - let me know if you'd like me to run a test case and save the output showing that we're writing all restarts at the same time when using IAU for all components. I can also run an fv3 standalone ci test to ensure that we are not negatively impacting atm-only runs too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aerorahul - is there any change you'd like to see with this? Or any specific tests you'd like to see output with? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I am ok with the movement of |
||
# QUILTING | ||
local QUILTING_RESTART="${QUILTING_RESTART:-${QUILTING}}" | ||
local WRITE_GROUP=${WRITE_GROUP:-1} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.