Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into support_intelllvm
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanJovic-NOAA committed Sep 20, 2024
2 parents 693c90d + 38a29a6 commit 0787290
Show file tree
Hide file tree
Showing 81 changed files with 3,995 additions and 2,955 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
6 changes: 5 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
[submodule "CICE"]
path = CICE-interface/CICE
#url = https://github.com/NOAA-EMC/CICE
#branch = emc/develop
#branch = develop
url = https://github.com/DusanJovic-NOAA/CICE
branch = support_intelllvm
[submodule "CDEPS"]
Expand All @@ -52,3 +52,7 @@
path = NOAHMP-interface/noahmp
url = https://github.com/NOAA-EMC/noahmp
branch = develop
[submodule "fire_behavior"]
path = fire_behavior
url = https://github.com/NOAA-EMC/fire_behavior
branch = emc/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
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
2 changes: 1 addition & 1 deletion tests/bl_date.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export BL_DATE=20240904
export BL_DATE=20240909
Loading

0 comments on commit 0787290

Please sign in to comment.