From f96585917068d3e5e1c20e3634dfa02efaba4e30 Mon Sep 17 00:00:00 2001 From: Nick Szapiro Date: Thu, 27 Jun 2024 17:47:35 +0000 Subject: [PATCH 1/3] wav_ds2s model completes 24 h --- CMakeLists.txt | 2 +- cmake/configure_apps.cmake | 8 ++ tests/fv3_conf/cpld_datm_cdeps_gfs.IN | 14 ++ tests/parm/ufs.configure.s2sw_fast_esmf.IN | 3 +- tests/rt.conf | 3 + tests/tests/wav_ds2s_datm_docn_pcice | 144 +++++++++++++++++++++ 6 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 tests/tests/wav_ds2s_datm_docn_pcice diff --git a/CMakeLists.txt b/CMakeLists.txt index e5fdd1e83a..43540d4edd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 LND 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 LND S2S S2SA S2SW S2SWA S2SWAL ATM_DS2S ATM_DS2S-PCICE HAFS HAFSW HAFS-MOM6 HAFS-MOM6W HAFS-ALL NG-GODAS WAV_DS2S) 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}") diff --git a/cmake/configure_apps.cmake b/cmake/configure_apps.cmake index b6db3a5759..dad391bd45 100644 --- a/cmake/configure_apps.cmake +++ b/cmake/configure_apps.cmake @@ -114,3 +114,11 @@ if(APP MATCHES "^(LND)$") set(CDEPS ON CACHE BOOL "Enable CDEPS" FORCE) set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE) endif() + +if(APP MATCHES "^(WAV_DS2S)$") + set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE) + set(CDEPS ON CACHE BOOL "Enable CDEPS" FORCE) + set(CICE6 ON CACHE BOOL "Enable CICE6" FORCE) + set(WW3 ON CACHE BOOL "Enable WAVEWATCH III" FORCE) + message("Configuring UFS app in WAV_DS2S with CDEPS data and prescribed ice sea ice mode") +endif() diff --git a/tests/fv3_conf/cpld_datm_cdeps_gfs.IN b/tests/fv3_conf/cpld_datm_cdeps_gfs.IN index b15df08c17..a9f18216e3 100644 --- a/tests/fv3_conf/cpld_datm_cdeps_gfs.IN +++ b/tests/fv3_conf/cpld_datm_cdeps_gfs.IN @@ -21,6 +21,14 @@ cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/grid_cice_NEMS_mx@[OCNRES].nc . cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/kmtu_cice_NEMS_mx@[OCNRES].nc . cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/mesh.mx@[OCNRES].nc . +# WW3 fix/input +if [[ $CPLWAV == .true. ]]; then + cp @[INPUTDATA_ROOT_WW3]/@[WW3_MODDEF] mod_def.ww3 + if [[ ${WW3_DOMAIN:0:2} != mx ]]; then + cp @[INPUTDATA_ROOT_WW3]/@[MESH_WAV] . + fi +fi + if [ $WARM_START = .false. ]; then # cold start if [[ $OCNRES == '025' ]]; then @@ -43,4 +51,10 @@ else cp ../${DEP_RUN}${RT_SUFFIX}/${CICE_RESTART_DIR}/iced.2021-03-22-64800.nc ./INPUT RFILE="iced.2021-03-22-64800.nc" ls -1 "./INPUT/"${RFILE}>ice.restart_file + + # WAVE restart file + if [[ $CPLWAV == .true. ]]; then + RFILE=ufs.cpld.ww3.r.${RESTART_FILE_SUFFIX_SECS} + cp ../${DEP_RUN}${SUFFIX}/${RFILE} . + fi fi diff --git a/tests/parm/ufs.configure.s2sw_fast_esmf.IN b/tests/parm/ufs.configure.s2sw_fast_esmf.IN index 3d7df9de69..dc5e85d4df 100644 --- a/tests/parm/ufs.configure.s2sw_fast_esmf.IN +++ b/tests/parm/ufs.configure.s2sw_fast_esmf.IN @@ -116,11 +116,12 @@ MED_attributes:: ocean_albedo_limit = @[ocean_albedo_limit] :: ALLCOMP_attributes:: - ScalarFieldCount = 3 + ScalarFieldCount = 4 ScalarFieldIdxGridNX = 1 ScalarFieldIdxGridNY = 2 ScalarFieldIdxGridNTile = 3 ScalarFieldName = cpl_scalars + ScalarFieldIdxNextSwCday = 4 # required for data atmosphere configurations start_type = @[RUNTYPE] restart_dir = @[CMEPS_RESTART_DIR] case_name = ufs.cpld diff --git a/tests/rt.conf b/tests/rt.conf index 9c08ebeea9..e90dd35d42 100644 --- a/tests/rt.conf +++ b/tests/rt.conf @@ -431,6 +431,9 @@ RUN | cpld_control_pdlib_p8 | + hera hercules COMPILE | s2sw_pdlib_debug | gnu | -DAPP=S2SW -DCCPP_SUITES=FV3_GFS_v17_coupled_p8 -DPDLIB=ON -DDEBUG=ON | + hera hercules | fv3 | RUN | cpld_debug_pdlib_p8 | + hera hercules | baseline | +COMPILE | wav_ds2s_datm_docn_pcice | intel | -DAPP=WAV_DS2S -DPDLIB=ON | + hera hercules | fv3 | +RUN | wav_ds2s_datm_docn_pcice | + hera hercules | baseline | + ### CDEPS Data Atmosphere test ### COMPILE | datm_cdeps | gnu | -DAPP=NG-GODAS | + hera hercules | fv3 | RUN | datm_cdeps_control_cfsr | + hera hercules | baseline | diff --git a/tests/tests/wav_ds2s_datm_docn_pcice b/tests/tests/wav_ds2s_datm_docn_pcice new file mode 100644 index 0000000000..aa4b69fb36 --- /dev/null +++ b/tests/tests/wav_ds2s_datm_docn_pcice @@ -0,0 +1,144 @@ +# +# wav_ds2s_datm_docn_pcice +# + +export TEST_DESCR="Active WW3-CMEPS-DATM-DOCN-PrescribedIceCICE system - C96MX100 unstr WW3 PDLIB" + +export CNTL_DIR=wav_ds2s_datm_docn_pcice + +export LIST_FILES="RESTART/20210323.060000.coupler.res \ + RESTART/iced.2021-03-23-21600.nc \ + RESTART/ufs.cpld.cpl.r.2021-03-23-21600.nc \ + 20210323.060000.out_pnt.ww3 \ + 20210323.060000.out_grd.ww3 " + +export_datm_cdeps + +#model configure +export SYEAR=2021 +export SMONTH=03 +export SDAY=22 +export SHOUR=06 +export CHOUR=06 +export FHMAX=24 +export FHROT=0 + +export ATMRES=C96 +export OCNRES=100 +export ICERES=1.00 +export NX_GLB=360 +export NY_GLB=320 +export ATM_compute_tasks=${ATM_compute_tasks_cdeps_025} +export OCN_tasks=${ICE_tasks_cdeps_025} +export ICE_tasks=${ICE_tasks_cdeps_025} +export WAV_tasks=100 + +export_cice6 +export_ww3 +export_cmeps + +export FV3=false +export S2S=false +export HAFS=false +export AQM=false +export DATM_CDEPS=true +export DOCN_CDEPS=true +export DICE_CDEPS=false +export CICE_PRESCRIBED=true +export med_model=cmeps +export wav_model=ww3 +export atm_model=datm +export ocn_model=docn +export ice_model=cice6 + +export RESTART_N=12 +export RESTART_INTERVAL="${RESTART_N} -1" +export OUTPUT_FH='0 21 24' + +export DATM_SRC=GFS +export FILENAME_BASE=gfs. +export IATM=3072 +export JATM=1536 +export ATM_NX_GLB=$IATM +export ATM_NY_GLB=$JATM +export ATMRES=${IATM}x${JATM} +export MESH_ATM=${FILENAME_BASE//.}_mesh.nc +export atm_datamode=GFS +export stream_files="INPUT/gfs.202103.nc" + +export WW3_DOMAIN=global_270k +export MESH_WAV=mesh.${WW3_DOMAIN}.nc +export WW3_MODDEF=mod_def.exp.${WW3_DOMAIN} +export CPLWAV=.true. +export CPLWAV2ATM=.true. +#waves +export WW3_RSTDTHR=12 +WW3_DT_2_RST="$(printf "%02d" $(( WW3_RSTDTHR*3600 )))" +export WW3_DT_2_RST +export WW3_OUTDTHR=1 +WW3_DTFLD="$(printf "%02d" $(( WW3_OUTDTHR*3600 )))" +export WW3_DTFLD +WW3_DTPNT="$(printf "%02d" $(( WW3_OUTDTHR*3600 )))" +export WW3_DTPNT +export DTRST=0 +export RSTTYPE=T +export GOFILETYPE=1 +export POFILETYPE=1 +export WW3_OUTPARS="WND HS FP DP PHS PTP PDIR" +export CPLILINE='$' +export ICELINE='$' +export WINDLINE='$' +export CURRLINE='$' +export NFGRIDS=0 +export NMGRIDS=1 +export WW3GRIDLINE="'global_270k' 'no' 'no' 'CPL:native' 'no' 'no' 'no' 'no' 'no' 'no' 1 1 0.00 1.00 F" +export FUNIPNT=T +export IOSRV=1 +export FPNTPROC=T +export FGRDPROC=T +export UNIPOINTS='points' +export FLAGMASKCOMP=' F' +export FLAGMASKOUT=' F' +RUN_BEG="${SYEAR}${SMONTH}${SDAY} $(printf "%02d" $(( SHOUR )))0000" +export RUN_BEG +RUN_END="2100${SMONTH}${SDAY} $(printf "%02d" $(( SHOUR )))0000" +export RUN_END +export OUT_BEG=${RUN_BEG} +export OUT_END=${RUN_END} +export RST_BEG=${RUN_BEG} +export RST_2_BEG=${RUN_BEG} +export RST_END=${RUN_END} +export RST_2_END=${RUN_END} +export WW3_CUR='C' +export WW3_ICE='C' +export WW3_IC1='F' +export WW3_IC5='F' + +#CDEPS docn settings +export ocn_datamode=sstdata +#export MESH_OCN=TX025_210327_ESMFmesh_py.nc +#export ocn_data="INPUT/oisst-avhrr-v02r01.202103.nc" +export MESH_OCN=e5.oper.an.mesh.nc +export ocn_data="INPUT/sst_siconc_skt.era5.20210321_20210331.nc" +export ocn_data_var=sst +export ocn_nx_global=1440 +export ocn_ny_global=721 +export DOCN_IN_CONFIGURE=docn_in.IN +export DOCN_STREAM_CONFIGURE=hafs_docn.streams.IN +export STREAM_OFFSET=0 + +#rest of CICE ice prescribed settings +export CICE_RUNTYPE=initial +export CICE_ICE_IC=none +export CICE_PRESCRIBED=true +export stream_files_dice=$ocn_data +export MESH_DICE=$MESH_OCN +export eps_imesh=4.0e-1 +export CICE_KTHERM=2 +export CICE_TFREEZE_OPTION=mushy + +#export INPUT_NML=global_control.nml.IN +export MODEL_CONFIGURE=datm_cdeps_configure.IN +export UFS_CONFIGURE=ufs.configure.s2sw_fast_esmf.IN +#export FV3_RUN="cpld_control_run.IN cpld_docn_pcice.IN" +export FV3_RUN="cpld_datm_cdeps_gfs.IN cpld_docn_pcice.IN" From ca18a45f36cbf725508fefc303b8738c6b38417e Mon Sep 17 00:00:00 2001 From: Nick Szapiro Date: Sat, 29 Jun 2024 04:32:30 +0000 Subject: [PATCH 2/3] Set ww3_shel.nml.IN atparse variables in tests/wav_ds2s_datm_docn_pcice --- tests/tests/wav_ds2s_datm_docn_pcice | 30 +--------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/tests/tests/wav_ds2s_datm_docn_pcice b/tests/tests/wav_ds2s_datm_docn_pcice index aa4b69fb36..acf8989f12 100644 --- a/tests/tests/wav_ds2s_datm_docn_pcice +++ b/tests/tests/wav_ds2s_datm_docn_pcice @@ -71,7 +71,7 @@ export MESH_WAV=mesh.${WW3_DOMAIN}.nc export WW3_MODDEF=mod_def.exp.${WW3_DOMAIN} export CPLWAV=.true. export CPLWAV2ATM=.true. -#waves +#waves - ww3_shel.nml.IN export WW3_RSTDTHR=12 WW3_DT_2_RST="$(printf "%02d" $(( WW3_RSTDTHR*3600 )))" export WW3_DT_2_RST @@ -80,35 +80,7 @@ WW3_DTFLD="$(printf "%02d" $(( WW3_OUTDTHR*3600 )))" export WW3_DTFLD WW3_DTPNT="$(printf "%02d" $(( WW3_OUTDTHR*3600 )))" export WW3_DTPNT -export DTRST=0 -export RSTTYPE=T -export GOFILETYPE=1 -export POFILETYPE=1 export WW3_OUTPARS="WND HS FP DP PHS PTP PDIR" -export CPLILINE='$' -export ICELINE='$' -export WINDLINE='$' -export CURRLINE='$' -export NFGRIDS=0 -export NMGRIDS=1 -export WW3GRIDLINE="'global_270k' 'no' 'no' 'CPL:native' 'no' 'no' 'no' 'no' 'no' 'no' 1 1 0.00 1.00 F" -export FUNIPNT=T -export IOSRV=1 -export FPNTPROC=T -export FGRDPROC=T -export UNIPOINTS='points' -export FLAGMASKCOMP=' F' -export FLAGMASKOUT=' F' -RUN_BEG="${SYEAR}${SMONTH}${SDAY} $(printf "%02d" $(( SHOUR )))0000" -export RUN_BEG -RUN_END="2100${SMONTH}${SDAY} $(printf "%02d" $(( SHOUR )))0000" -export RUN_END -export OUT_BEG=${RUN_BEG} -export OUT_END=${RUN_END} -export RST_BEG=${RUN_BEG} -export RST_2_BEG=${RUN_BEG} -export RST_END=${RUN_END} -export RST_2_END=${RUN_END} export WW3_CUR='C' export WW3_ICE='C' export WW3_IC1='F' From 93f725d7dbf004269e567c139dca0d077ba14ee2 Mon Sep 17 00:00:00 2001 From: Nick Szapiro Date: Sun, 11 Aug 2024 16:14:29 +0000 Subject: [PATCH 3/3] netcdf history and most tasks for WAV --- tests/default_vars.sh | 2 ++ tests/parm/ufs.configure.s2sw_fast_esmf.IN | 2 ++ tests/tests/wav_ds2s_datm_docn_pcice | 16 +++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/default_vars.sh b/tests/default_vars.sh index 78a89ec8e6..ac9a919260 100644 --- a/tests/default_vars.sh +++ b/tests/default_vars.sh @@ -1023,6 +1023,8 @@ export_ww3() { export WW3_IC1='F' export WW3_IC5='F' export WW3_user_sets_restname="true" + export WW3_user_sets_histname="false" + export WW3_gridded_netcdfout="false" } # Defaults for the coupled 5-component diff --git a/tests/parm/ufs.configure.s2sw_fast_esmf.IN b/tests/parm/ufs.configure.s2sw_fast_esmf.IN index dc5e85d4df..a7f503b1e1 100644 --- a/tests/parm/ufs.configure.s2sw_fast_esmf.IN +++ b/tests/parm/ufs.configure.s2sw_fast_esmf.IN @@ -68,6 +68,8 @@ WAV_attributes:: OverwriteSlice = false mesh_wav = @[MESH_WAV] user_sets_restname = @[WW3_user_sets_restname] + user_sets_histname = @[WW3_user_sets_histname] + gridded_netcdfout = @[WW3_gridded_netcdfout] :: # CMEPS warm run sequence diff --git a/tests/tests/wav_ds2s_datm_docn_pcice b/tests/tests/wav_ds2s_datm_docn_pcice index acf8989f12..070a2b6a3d 100644 --- a/tests/tests/wav_ds2s_datm_docn_pcice +++ b/tests/tests/wav_ds2s_datm_docn_pcice @@ -23,16 +23,16 @@ export CHOUR=06 export FHMAX=24 export FHROT=0 +#initial component exports export ATMRES=C96 export OCNRES=100 export ICERES=1.00 export NX_GLB=360 export NY_GLB=320 -export ATM_compute_tasks=${ATM_compute_tasks_cdeps_025} -export OCN_tasks=${ICE_tasks_cdeps_025} -export ICE_tasks=${ICE_tasks_cdeps_025} -export WAV_tasks=100 - +export ATM_compute_tasks=18 +export OCN_tasks=12 +export ICE_tasks=18 +export WAV_tasks=128 export_cice6 export_ww3 export_cmeps @@ -51,9 +51,9 @@ export atm_model=datm export ocn_model=docn export ice_model=cice6 -export RESTART_N=12 +export RESTART_N=${FHMAX} export RESTART_INTERVAL="${RESTART_N} -1" -export OUTPUT_FH='0 21 24' +export OUTPUT_FH='24 -1' export DATM_SRC=GFS export FILENAME_BASE=gfs. @@ -85,6 +85,8 @@ export WW3_CUR='C' export WW3_ICE='C' export WW3_IC1='F' export WW3_IC5='F' +export WW3_user_sets_histname="true" +export WW3_gridded_netcdfout="true" #https://github.com/NOAA-EMC/WW3/pull/780 #CDEPS docn settings export ocn_datamode=sstdata