Skip to content

Commit

Permalink
Merge branch 'ufs-community:develop' into RT_bmark_gefs
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSzapiro-NOAA authored Sep 19, 2024
2 parents 4f7528a + 25ee7f6 commit a879fc6
Show file tree
Hide file tree
Showing 32 changed files with 3,281 additions and 2,397 deletions.
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Please delete what is not needed.
* MOM6 -
* NOAHMP -
* WW3 -
* fire_behavior
* stochastic_physics -
```

Expand Down Expand Up @@ -89,6 +90,7 @@ Example:
* MOM6:
* NOAHMP:
* WW3:
* fire_behavior:
* stochastic_physics:
* None

Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@
path = NOAHMP-interface/noahmp
url = https://github.com/NOAA-EMC/noahmp
branch = develop
[submodule "fire_behavior"]
path = fire_behavior
url = https://github.com/NCAR/fire_behavior
branch = develop
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
20 changes: 18 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 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 ATMF LND S2S S2SA S2SW S2SWA 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 All @@ -34,6 +34,7 @@ set(STOCH_PHYS OFF CACHE BOOL "Enable Stochastic Physics")
set(CMEPS OFF CACHE BOOL "Enable CMEPS")
set(CDEPS OFF CACHE BOOL "Enable CDEPS")
set(NOAHMP OFF CACHE BOOL "Enable NOAHMP")
set(FIRE_BEHAVIOR OFF CACHE BOOL "Enable Fire Behavior")

# Configure selected application specific components
message("")
Expand All @@ -52,6 +53,7 @@ message("STOCH_PHYS ....... ${STOCH_PHYS}")
message("CDEPS ............ ${CDEPS}")
message("CMEPS ............ ${CMEPS}")
message("NOAHMP ........... ${NOAHMP}")
message("FIRE_BEHAVIOR .... ${FIRE_BEHAVIOR}")

###############################################################################
### Build Options
Expand Down Expand Up @@ -155,7 +157,7 @@ if(FMS)
elseif (APP MATCHES "^(S2S|S2SA|S2SW|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|HAFS|HAFS-ALL)$")
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|ATMF|HAFS|HAFS-ALL)$")
if(32BIT)
add_library(fms ALIAS FMS::fms_r4)
else()
Expand Down Expand Up @@ -260,6 +262,14 @@ if(NOAHMP)
add_subdirectory(NOAHMP-interface)
endif()

###############################################################################
### Fire Components [FIRE_BEHAVIOR]
###############################################################################
if(FIRE_BEHAVIOR)
set(NUOPC "ON" CACHE STRING "Build fire_behavior with NUOPC cap" FORCE)
add_subdirectory(fire_behavior)
endif()

###############################################################################
### UFS Library
###############################################################################
Expand Down Expand Up @@ -339,6 +349,12 @@ if(NOAHMP)
list(APPEND _ufs_libs_public noahmp)
endif()

if(FIRE_BEHAVIOR)
add_dependencies(ufs fire_behavior_nuopc)
list(APPEND _ufs_defs_private FRONT_FIRE_BEHAVIOR=fire_behavior_nuopc)
list(APPEND _ufs_libs_public fire_behavior_nuopc)
endif()

target_compile_definitions(ufs PRIVATE "${_ufs_defs_private}")
target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")

Expand Down
2 changes: 1 addition & 1 deletion FV3
4 changes: 3 additions & 1 deletion cmake/configure_apps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
###############################################################################
### Configure Application Components
###############################################################################
if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML)$")
if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML|ATMF)$")
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
set(FV3 ON CACHE BOOL "Enable FV3" FORCE)
set(STOCH_PHYS ON CACHE BOOL "Enable Stochastic Physics" FORCE)
Expand All @@ -31,6 +31,8 @@ if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML)$")
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
message("Configuring UFS app in Atmosphere with Air Quality mode")
elseif(APP MATCHES "ATMF")
set(FIRE_BEHAVIOR ON CACHE BOOL "Enable Fire Behavior" FORCE)
else()
message("Configuring UFS app in Atmosphere Only mode")
endif()
Expand Down
14 changes: 13 additions & 1 deletion driver/UFSDriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ MODULE UFSDriver
! UFS Driver component
! /|\
! / | \
! ATM/OCN/ICE/WAV/LND/IPM/HYD .. components
! ATM/OCN/ICE/WAV/LND/IPM/HYD/FIR .. components
! | | |
! | | (CICE, etc.)
! | |
Expand Down Expand Up @@ -81,6 +81,10 @@ MODULE UFSDriver
#endif
#ifdef FRONT_NOAHMP
use FRONT_NOAHMP, only: NOAHMP_SS => SetServices
#endif
! - Handle build time FIR options:
#ifdef FRONT_FIRE_BEHAVIOR
use FRONT_FIRE_BEHAVIOR, only: FIRE_BEHAVIOR_SS => SetServices
#endif
#ifdef FRONT_LIS
use FRONT_LIS, only: LIS_SS => SetServices
Expand Down Expand Up @@ -471,6 +475,14 @@ subroutine SetModelServices(driver, rc)
found_comp = .true.
end if
#endif
#ifdef FRONT_FIRE_BEHAVIOR
if (trim(model) == "fire_behavior") then
call NUOPC_DriverAddComp(driver, trim(prefix), FIRE_BEHAVIOR_SS, &
petList=petList, comp=comp, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
found_comp = .true.
end if
#endif
#ifdef FRONT_LIS
if (trim(model) == "lis") then
!TODO: Remove bail code and pass info and SetVM to DriverAddComp
Expand Down
1 change: 1 addition & 0 deletions fire_behavior
Submodule fire_behavior added at 05cad1
27 changes: 27 additions & 0 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
export med_omp_num_threads=1
export ocn_omp_num_threads=1
export wav_omp_num_threads=1
export fbh_omp_num_threads=1

if [[ ${MACHINE_ID} = wcoss2 || ${MACHINE_ID} = acorn ]]; then

Expand Down Expand Up @@ -501,6 +502,7 @@ export FV3=true
export S2S=false
export HAFS=false
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=false
export DOCN_CDEPS=false
export DICE_CDEPS=false
Expand Down Expand Up @@ -1163,6 +1165,25 @@ export_ww3() {
export WW3_user_sets_restname="true"
}

export_fire_behavior() {
export fbh_model=fire_behavior
export FIRE_BEHAVIOR=true
export FIRE_NML=namelist.fire.IN
export CPLFIRE=false
export DT_FIRE=${DT_ATMOS}
OUTPUT_FS="$(printf "%02d" $(( OUTPUT_FH*3600 )))"
export OUTPUT_FS
export fire_atm_feedback=1.0
export fire_lsm_zcoupling=false
export fire_lsm_zcoupling_ref=60.0
export fire_num_ignitions=1
export fire_print_msg=0
export fire_upwinding=9
export fire_viscosity=0.4
export fire_wind_height=5.0
}


# Defaults for the coupled 5-component
export_cmeps() {
export UFS_CONFIGURE=ufs.configure.s2swa_fast_esmf.IN
Expand Down Expand Up @@ -1207,6 +1228,7 @@ export FV3=true
export S2S=true
export HAFS=false
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=false
export DOCN_CDEPS=false
export DICE_CDEPS=false
Expand Down Expand Up @@ -1399,6 +1421,7 @@ export_datm_cdeps ()
export S2S=false
export HAFS=false
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=true
export DOCN_CDEPS=false
export CDEPS_INLINE=false
Expand Down Expand Up @@ -1476,6 +1499,7 @@ export_hafs_datm_cdeps ()
export S2S=false
export HAFS=true
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=true
export DOCN_CDEPS=false
export CDEPS_INLINE=false
Expand All @@ -1495,6 +1519,7 @@ export_hafs_docn_cdeps ()
export S2S=false
export HAFS=true
export AQM=false
export FIRE_BEHAVIOR=false
export DOCN_CDEPS=true
export CDEPS_INLINE=false
export INPES=${INPES_dflt}
Expand All @@ -1514,6 +1539,7 @@ export_hafs_regional ()
export S2S=false
export HAFS=true
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=false
export DOCN_CDEPS=false
export CDEPS_INLINE=false
Expand Down Expand Up @@ -1587,6 +1613,7 @@ export FV3=true
export S2S=false
export HAFS=true
export AQM=false
export FIRE_BEHAVIOR=false
export DATM_CDEPS=false
export DOCN_CDEPS=false
export CDEPS_INLINE=false
Expand Down
12 changes: 12 additions & 0 deletions tests/fv3_conf/regional_fire_run.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rm -rf INPUT RESTART
mkdir INPUT RESTART

rsync -arv @[INPUTDATA_ROOT]/FIRE_BEHAVIOR_input_data/@[FIRE_NAME]/. .
rsync -arv @[INPUTDATA_ROOT]/FV3_fire_input_data/@[FIRE_NAME]/. .

rsync -arv @[INPUTDATA_ROOT]/FV3_regional_input_data/. .
rsync -arv @[INPUTDATA_ROOT]/FV3_fix .
ln -sf FV3_fix/* .
ln -sf FV3_fix/fix_co2_proj/* .

touch data_table
62 changes: 31 additions & 31 deletions tests/logs/OpnReqTests_control_p8_hera.log
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Mon Sep 9 23:10:23 UTC 2024
Mon Sep 16 14:09:37 UTC 2024
Start Operation Requirement Test


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_bit_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/bit_base_bit_base
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_bit_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/bit_base_bit_base
Checking test bit_base results ....
Moving baseline bit_base files ....
Moving sfcf000.nc .........OK
Expand Down Expand Up @@ -51,14 +51,14 @@ Moving baseline bit_base files ....
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK

0: The total amount of wall time = 301.063864
0: The maximum resident set size (KB) = 1450936
0: The total amount of wall time = 302.216095
0: The maximum resident set size (KB) = 1458276

Test bit_base PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_dbg_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/dbg_base_dbg_base
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_dbg_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/dbg_base_dbg_base
Checking test dbg_base results ....
Moving baseline dbg_base files ....
Moving sfcf000.nc .........OK
Expand Down Expand Up @@ -106,14 +106,14 @@ Moving baseline dbg_base files ....
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK

0: The total amount of wall time = 1003.768135
0: The maximum resident set size (KB) = 1432920
0: The total amount of wall time = 1000.555258
0: The maximum resident set size (KB) = 1429696

Test dbg_base PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/dcp_dcp
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/dcp_dcp
Checking test dcp results ....
Comparing sfcf000.nc .....USING NCCMP......OK
Comparing sfcf021.nc .....USING NCCMP......OK
Expand Down Expand Up @@ -160,14 +160,14 @@ Checking test dcp results ....
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK

0: The total amount of wall time = 272.986390
0: The maximum resident set size (KB) = 1418504
0: The total amount of wall time = 270.121509
0: The maximum resident set size (KB) = 1428680

Test dcp PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/mpi_mpi
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/mpi_mpi
Checking test mpi results ....
Comparing sfcf000.nc .....USING NCCMP......OK
Comparing sfcf021.nc .....USING NCCMP......OK
Expand Down Expand Up @@ -214,14 +214,14 @@ Checking test mpi results ....
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK

0: The total amount of wall time = 271.716758
0: The maximum resident set size (KB) = 1429720
0: The total amount of wall time = 274.685713
0: The maximum resident set size (KB) = 1419820

Test mpi PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/rst_rst
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/rst_rst
Checking test rst results ....
Comparing sfcf000.nc .....USING NCCMP......OK
Comparing sfcf021.nc .....USING NCCMP......OK
Expand Down Expand Up @@ -268,14 +268,14 @@ Checking test rst results ....
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK

0: The total amount of wall time = 271.525308
0: The maximum resident set size (KB) = 1430068
0: The total amount of wall time = 277.361393
0: The maximum resident set size (KB) = 1424812

Test rst PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/std_base_std_base
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/std_base_std_base
Checking test std_base results ....
Moving baseline std_base files ....
Moving sfcf000.nc .........OK
Expand Down Expand Up @@ -323,14 +323,14 @@ Moving baseline std_base files ....
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK

0: The total amount of wall time = 270.165754
0: The maximum resident set size (KB) = 1429764
0: The total amount of wall time = 275.403359
0: The maximum resident set size (KB) = 1436644

Test std_base PASS


baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/thr_thr
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/thr_thr
Checking test thr results ....
Comparing sfcf000.nc .....USING NCCMP......OK
Comparing sfcf021.nc .....USING NCCMP......OK
Expand Down Expand Up @@ -377,11 +377,11 @@ Checking test thr results ....
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK

0: The total amount of wall time = 270.519887
0: The maximum resident set size (KB) = 1441764
0: The total amount of wall time = 267.762416
0: The maximum resident set size (KB) = 1425320

Test thr PASS

OPERATION REQUIREMENT TEST WAS SUCCESSFUL
Tue Sep 10 00:41:38 UTC 2024
Elapsed time: 01h:31m:15s. Have a nice day!
Mon Sep 16 15:29:42 UTC 2024
Elapsed time: 01h:20m:05s. Have a nice day!
Loading

0 comments on commit a879fc6

Please sign in to comment.