Skip to content

Commit 25ee7f6

Browse files
authored
Fire Coupling FV3ATM and Community Fire Behavior Model (#2220)
* UFSWM - The fire_behavior component has been added and a new application created 'ATMF'. This work also includes a new regression test 'cpld_regional_atm_fbh' for testing two-way coupling of the atm component (fv3atm) and fbh component (fire_behavior) * CMEPS - CMEPS required modifications to be aligned with the changes to the ccpp physics package * FV3 - the fv3 cap has been modified to export atmosphere forcing data to the fire component when 'cpl_fire' is set to true. It will also import new fields for physics. * ccpp-physics - the ccpp physics package has been modified to add heat fluxes, upward specific humidity flux, and a smoke tracer from the fire component.
1 parent 7062191 commit 25ee7f6

32 files changed

+3281
-2397
lines changed

.github/pull_request_template.md

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Please delete what is not needed.
4242
* MOM6 -
4343
* NOAHMP -
4444
* WW3 -
45+
* fire_behavior
4546
* stochastic_physics -
4647
```
4748

@@ -89,6 +90,7 @@ Example:
8990
* MOM6:
9091
* NOAHMP:
9192
* WW3:
93+
* fire_behavior:
9294
* stochastic_physics:
9395
* None
9496

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@
4646
path = NOAHMP-interface/noahmp
4747
url = https://github.com/NOAA-EMC/noahmp
4848
branch = develop
49+
[submodule "fire_behavior"]
50+
path = fire_behavior
51+
url = https://github.com/NCAR/fire_behavior
52+
branch = develop

CMakeLists.txt

+18-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules/Modules)
1616
###############################################################################
1717

1818
# Valid applications and choices
19-
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)
19+
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)
2020
set(APP NONE CACHE BOOL "Application Name")
2121
if(NOT (APP IN_LIST VALID_APPS))
2222
message(FATAL_ERROR "${APP} is not a valid application.\nValid Applications are: ${VALID_APPS}")
@@ -34,6 +34,7 @@ set(STOCH_PHYS OFF CACHE BOOL "Enable Stochastic Physics")
3434
set(CMEPS OFF CACHE BOOL "Enable CMEPS")
3535
set(CDEPS OFF CACHE BOOL "Enable CDEPS")
3636
set(NOAHMP OFF CACHE BOOL "Enable NOAHMP")
37+
set(FIRE_BEHAVIOR OFF CACHE BOOL "Enable Fire Behavior")
3738

3839
# Configure selected application specific components
3940
message("")
@@ -52,6 +53,7 @@ message("STOCH_PHYS ....... ${STOCH_PHYS}")
5253
message("CDEPS ............ ${CDEPS}")
5354
message("CMEPS ............ ${CMEPS}")
5455
message("NOAHMP ........... ${NOAHMP}")
56+
message("FIRE_BEHAVIOR .... ${FIRE_BEHAVIOR}")
5557

5658
###############################################################################
5759
### Build Options
@@ -155,7 +157,7 @@ if(FMS)
155157
elseif (APP MATCHES "^(S2S|S2SA|S2SW|S2SWA|S2SWAL|ATM_DS2S|ATM_DS2S-PCICE|NG-GODAS|HAFS-MOM6|HAFS-MOM6W)$")
156158
add_library(fms ALIAS FMS::fms_r8)
157159
endif()
158-
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|HAFS|HAFS-ALL)$")
160+
if(APP MATCHES "^(ATM|ATMAERO|ATMAQ|ATMWM|ATMW|ATML|ATMF|HAFS|HAFS-ALL)$")
159161
if(32BIT)
160162
add_library(fms ALIAS FMS::fms_r4)
161163
else()
@@ -260,6 +262,14 @@ if(NOAHMP)
260262
add_subdirectory(NOAHMP-interface)
261263
endif()
262264

265+
###############################################################################
266+
### Fire Components [FIRE_BEHAVIOR]
267+
###############################################################################
268+
if(FIRE_BEHAVIOR)
269+
set(NUOPC "ON" CACHE STRING "Build fire_behavior with NUOPC cap" FORCE)
270+
add_subdirectory(fire_behavior)
271+
endif()
272+
263273
###############################################################################
264274
### UFS Library
265275
###############################################################################
@@ -339,6 +349,12 @@ if(NOAHMP)
339349
list(APPEND _ufs_libs_public noahmp)
340350
endif()
341351

352+
if(FIRE_BEHAVIOR)
353+
add_dependencies(ufs fire_behavior_nuopc)
354+
list(APPEND _ufs_defs_private FRONT_FIRE_BEHAVIOR=fire_behavior_nuopc)
355+
list(APPEND _ufs_libs_public fire_behavior_nuopc)
356+
endif()
357+
342358
target_compile_definitions(ufs PRIVATE "${_ufs_defs_private}")
343359
target_link_libraries(ufs PUBLIC "${_ufs_libs_public}")
344360

cmake/configure_apps.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
###############################################################################
1414
### Configure Application Components
1515
###############################################################################
16-
if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML)$")
16+
if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML|ATMF)$")
1717
set(FMS ON CACHE BOOL "Enable FMS" FORCE)
1818
set(FV3 ON CACHE BOOL "Enable FV3" FORCE)
1919
set(STOCH_PHYS ON CACHE BOOL "Enable Stochastic Physics" FORCE)
@@ -31,6 +31,8 @@ if(APP MATCHES "^(ATM|ATMW|ATMWM|ATMAQ|ATML)$")
3131
set(CMEPS ON CACHE BOOL "Enable CMEPS" FORCE)
3232
set(NOAHMP ON CACHE BOOL "Enable NOAHMP" FORCE)
3333
message("Configuring UFS app in Atmosphere with Air Quality mode")
34+
elseif(APP MATCHES "ATMF")
35+
set(FIRE_BEHAVIOR ON CACHE BOOL "Enable Fire Behavior" FORCE)
3436
else()
3537
message("Configuring UFS app in Atmosphere Only mode")
3638
endif()

driver/UFSDriver.F90

+13-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MODULE UFSDriver
2323
! UFS Driver component
2424
! /|\
2525
! / | \
26-
! ATM/OCN/ICE/WAV/LND/IPM/HYD .. components
26+
! ATM/OCN/ICE/WAV/LND/IPM/HYD/FIR .. components
2727
! | | |
2828
! | | (CICE, etc.)
2929
! | |
@@ -81,6 +81,10 @@ MODULE UFSDriver
8181
#endif
8282
#ifdef FRONT_NOAHMP
8383
use FRONT_NOAHMP, only: NOAHMP_SS => SetServices
84+
#endif
85+
! - Handle build time FIR options:
86+
#ifdef FRONT_FIRE_BEHAVIOR
87+
use FRONT_FIRE_BEHAVIOR, only: FIRE_BEHAVIOR_SS => SetServices
8488
#endif
8589
#ifdef FRONT_LIS
8690
use FRONT_LIS, only: LIS_SS => SetServices
@@ -471,6 +475,14 @@ subroutine SetModelServices(driver, rc)
471475
found_comp = .true.
472476
end if
473477
#endif
478+
#ifdef FRONT_FIRE_BEHAVIOR
479+
if (trim(model) == "fire_behavior") then
480+
call NUOPC_DriverAddComp(driver, trim(prefix), FIRE_BEHAVIOR_SS, &
481+
petList=petList, comp=comp, rc=rc)
482+
if (ChkErr(rc,__LINE__,u_FILE_u)) return
483+
found_comp = .true.
484+
end if
485+
#endif
474486
#ifdef FRONT_LIS
475487
if (trim(model) == "lis") then
476488
!TODO: Remove bail code and pass info and SetVM to DriverAddComp

fire_behavior

Submodule fire_behavior added at 05cad17

tests/default_vars.sh

+27
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
export med_omp_num_threads=1
117117
export ocn_omp_num_threads=1
118118
export wav_omp_num_threads=1
119+
export fbh_omp_num_threads=1
119120

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

@@ -501,6 +502,7 @@ export FV3=true
501502
export S2S=false
502503
export HAFS=false
503504
export AQM=false
505+
export FIRE_BEHAVIOR=false
504506
export DATM_CDEPS=false
505507
export DOCN_CDEPS=false
506508
export DICE_CDEPS=false
@@ -1159,6 +1161,25 @@ export_ww3() {
11591161
export WW3_user_sets_restname="true"
11601162
}
11611163

1164+
export_fire_behavior() {
1165+
export fbh_model=fire_behavior
1166+
export FIRE_BEHAVIOR=true
1167+
export FIRE_NML=namelist.fire.IN
1168+
export CPLFIRE=false
1169+
export DT_FIRE=${DT_ATMOS}
1170+
OUTPUT_FS="$(printf "%02d" $(( OUTPUT_FH*3600 )))"
1171+
export OUTPUT_FS
1172+
export fire_atm_feedback=1.0
1173+
export fire_lsm_zcoupling=false
1174+
export fire_lsm_zcoupling_ref=60.0
1175+
export fire_num_ignitions=1
1176+
export fire_print_msg=0
1177+
export fire_upwinding=9
1178+
export fire_viscosity=0.4
1179+
export fire_wind_height=5.0
1180+
}
1181+
1182+
11621183
# Defaults for the coupled 5-component
11631184
export_cmeps() {
11641185
export UFS_CONFIGURE=ufs.configure.s2swa_fast_esmf.IN
@@ -1203,6 +1224,7 @@ export FV3=true
12031224
export S2S=true
12041225
export HAFS=false
12051226
export AQM=false
1227+
export FIRE_BEHAVIOR=false
12061228
export DATM_CDEPS=false
12071229
export DOCN_CDEPS=false
12081230
export DICE_CDEPS=false
@@ -1395,6 +1417,7 @@ export_datm_cdeps ()
13951417
export S2S=false
13961418
export HAFS=false
13971419
export AQM=false
1420+
export FIRE_BEHAVIOR=false
13981421
export DATM_CDEPS=true
13991422
export DOCN_CDEPS=false
14001423
export CDEPS_INLINE=false
@@ -1472,6 +1495,7 @@ export_hafs_datm_cdeps ()
14721495
export S2S=false
14731496
export HAFS=true
14741497
export AQM=false
1498+
export FIRE_BEHAVIOR=false
14751499
export DATM_CDEPS=true
14761500
export DOCN_CDEPS=false
14771501
export CDEPS_INLINE=false
@@ -1491,6 +1515,7 @@ export_hafs_docn_cdeps ()
14911515
export S2S=false
14921516
export HAFS=true
14931517
export AQM=false
1518+
export FIRE_BEHAVIOR=false
14941519
export DOCN_CDEPS=true
14951520
export CDEPS_INLINE=false
14961521
export INPES=${INPES_dflt}
@@ -1510,6 +1535,7 @@ export_hafs_regional ()
15101535
export S2S=false
15111536
export HAFS=true
15121537
export AQM=false
1538+
export FIRE_BEHAVIOR=false
15131539
export DATM_CDEPS=false
15141540
export DOCN_CDEPS=false
15151541
export CDEPS_INLINE=false
@@ -1583,6 +1609,7 @@ export FV3=true
15831609
export S2S=false
15841610
export HAFS=true
15851611
export AQM=false
1612+
export FIRE_BEHAVIOR=false
15861613
export DATM_CDEPS=false
15871614
export DOCN_CDEPS=false
15881615
export CDEPS_INLINE=false

tests/fv3_conf/regional_fire_run.IN

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
rm -rf INPUT RESTART
2+
mkdir INPUT RESTART
3+
4+
rsync -arv @[INPUTDATA_ROOT]/FIRE_BEHAVIOR_input_data/@[FIRE_NAME]/. .
5+
rsync -arv @[INPUTDATA_ROOT]/FV3_fire_input_data/@[FIRE_NAME]/. .
6+
7+
rsync -arv @[INPUTDATA_ROOT]/FV3_regional_input_data/. .
8+
rsync -arv @[INPUTDATA_ROOT]/FV3_fix .
9+
ln -sf FV3_fix/* .
10+
ln -sf FV3_fix/fix_co2_proj/* .
11+
12+
touch data_table

tests/logs/OpnReqTests_control_p8_hera.log

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Mon Sep 9 23:10:23 UTC 2024
1+
Mon Sep 16 14:09:37 UTC 2024
22
Start Operation Requirement Test
33

44

5-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_bit_base_gnu
6-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/bit_base_bit_base
5+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_bit_base_gnu
6+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/bit_base_bit_base
77
Checking test bit_base results ....
88
Moving baseline bit_base files ....
99
Moving sfcf000.nc .........OK
@@ -51,14 +51,14 @@ Moving baseline bit_base files ....
5151
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
5252
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK
5353

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

5757
Test bit_base PASS
5858

5959

60-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_dbg_base_gnu
61-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/dbg_base_dbg_base
60+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_dbg_base_gnu
61+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/dbg_base_dbg_base
6262
Checking test dbg_base results ....
6363
Moving baseline dbg_base files ....
6464
Moving sfcf000.nc .........OK
@@ -106,14 +106,14 @@ Moving baseline dbg_base files ....
106106
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
107107
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK
108108

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

112112
Test dbg_base PASS
113113

114114

115-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
116-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/dcp_dcp
115+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
116+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/dcp_dcp
117117
Checking test dcp results ....
118118
Comparing sfcf000.nc .....USING NCCMP......OK
119119
Comparing sfcf021.nc .....USING NCCMP......OK
@@ -160,14 +160,14 @@ Checking test dcp results ....
160160
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
161161
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK
162162

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

166166
Test dcp PASS
167167

168168

169-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
170-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/mpi_mpi
169+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
170+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/mpi_mpi
171171
Checking test mpi results ....
172172
Comparing sfcf000.nc .....USING NCCMP......OK
173173
Comparing sfcf021.nc .....USING NCCMP......OK
@@ -214,14 +214,14 @@ Checking test mpi results ....
214214
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
215215
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK
216216

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

220220
Test mpi PASS
221221

222222

223-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
224-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/rst_rst
223+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
224+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/rst_rst
225225
Checking test rst results ....
226226
Comparing sfcf000.nc .....USING NCCMP......OK
227227
Comparing sfcf021.nc .....USING NCCMP......OK
@@ -268,14 +268,14 @@ Checking test rst results ....
268268
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
269269
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK
270270

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

274274
Test rst PASS
275275

276276

277-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
278-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/std_base_std_base
277+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
278+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/std_base_std_base
279279
Checking test std_base results ....
280280
Moving baseline std_base files ....
281281
Moving sfcf000.nc .........OK
@@ -323,14 +323,14 @@ Moving baseline std_base files ....
323323
Moving RESTART/20210323.060000.sfc_data.tile5.nc .........OK
324324
Moving RESTART/20210323.060000.sfc_data.tile6.nc .........OK
325325

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

329329
Test std_base PASS
330330

331331

332-
baseline dir = /scratch1/NCEPDEV/stmp4/role.epic/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
333-
working dir = /scratch1/NCEPDEV/stmp2/role.epic/FV3_OPNREQ_TEST/opnReqTest_664740/thr_thr
332+
baseline dir = /scratch1/NCEPDEV/stmp4/Zachary.Shrader/FV3_OPNREQ_TEST/OPNREQ_TEST/control_p8_std_base_gnu
333+
working dir = /scratch1/NCEPDEV/stmp2/Zachary.Shrader/FV3_OPNREQ_TEST/opnReqTest_1796713/thr_thr
334334
Checking test thr results ....
335335
Comparing sfcf000.nc .....USING NCCMP......OK
336336
Comparing sfcf021.nc .....USING NCCMP......OK
@@ -377,11 +377,11 @@ Checking test thr results ....
377377
Comparing RESTART/20210323.060000.sfc_data.tile5.nc .....USING NCCMP......OK
378378
Comparing RESTART/20210323.060000.sfc_data.tile6.nc .....USING NCCMP......OK
379379

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

383383
Test thr PASS
384384

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

0 commit comments

Comments
 (0)