Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7e15d89
Add capability to run idealized simulations
pedro-jm Jun 6, 2024
ab393cf
Allocate state vars in a subroutine
pedro-jm Jun 19, 2024
c8859f0
Set state vars to default in a subroutine
pedro-jm Jun 19, 2024
adf1e8c
Set initial time stamps in a subroutine
pedro-jm Jun 19, 2024
9a2d117
Init latlon subroutine does not use geogrid
pedro-jm Jun 20, 2024
9a8f659
Reorganize calls to subs in init state
pedro-jm Jun 20, 2024
65b3ab8
Initial changes for a more flexible fire state initialization
pedro-jm Jun 20, 2024
6aa4c08
Fix find of cmake hdf5 failing on unknown compilation of c files
islas May 28, 2024
5377767
Use netCDF targets as named, and properly link in MPI
islas May 28, 2024
1f032ec
Break up MPI linking for when dm parallel is off
islas May 28, 2024
3cebf74
Fix bad syntax that treats unset vars as not equal to empty string
islas May 28, 2024
ab6dfd3
Adding subroutines to print at initialization and advance calls
pedro-jm Jun 12, 2024
e2e988c
Initialize state from WRF online
pedro-jm Jun 21, 2024
3cbbb0d
Coupled to WRF online
pedro-jm Jun 21, 2024
33a6c1b
One-way coupling to WRF
pedro-jm Oct 2, 2024
451e8b9
subroutine for adding fire smoke to atm tracer
masih-e Oct 16, 2024
d3fdc2a
First draft of fire behavior documentation
mkavulich Oct 29, 2024
62d8566
Add .readthedocs.yaml for automatic documentation builds with ReadThe…
mkavulich Oct 29, 2024
155ce45
Add requirements.txt needed for readthedocs python environment
mkavulich Oct 29, 2024
dbe532f
Steal SRW requirements.txt as a test
mkavulich Oct 29, 2024
575167f
Remove sphinx_rtd_theme for now
mkavulich Oct 29, 2024
66b78f7
This should fix it, forgot to add requirements doc to .readthedocs.yaml
mkavulich Oct 29, 2024
e656e36
No reason for this nested directory, move everything under doc/
mkavulich Oct 29, 2024
942b1b0
Add some more units, fix some types, remove spaces at end of lines
mkavulich Nov 5, 2024
89f816e
More detailed namelist descriptions, consistent formatting
mkavulich Nov 5, 2024
dc215a7
Minor improvements, Sethian citation, some info and links for running…
mkavulich Nov 5, 2024
5a77cef
Merge pull request #6 from mkavulich/feature/add_docs
mkavulich Nov 8, 2024
b610900
Update SRW.rst
mkavulich Nov 20, 2024
b5571d2
docs:Updated the introduction
masih-e Dec 31, 2024
d25f2e7
docs:Updated SRW documentation
masih-e Dec 31, 2024
c5c5555
Edits to the documentation
masih-e Feb 18, 2025
63660b2
Edits for the documention WRFData.html and references
masih-e Feb 19, 2025
a09351e
Added wrf temperature and moisture tendencies
masih-e Feb 25, 2025
024738b
Fixes fire flux averaging to atm + other devels
pedro-jm Mar 11, 2025
de5846f
Fixes fire tendencies to the atm
pedro-jm Mar 11, 2025
2ad759c
Calculate smoke (PM2.5) AOD at 550 nm
pedro-jm Mar 13, 2025
d8912f0
Removes duplicate tile loop for feedback to the atmosphere
pedro-jm Mar 13, 2025
969df94
Formatting of code with no impact on results
pedro-jm Mar 13, 2025
8c785cd
use min/max to impoase limits on RH calculation
pedro-jm Mar 13, 2025
127b4b5
Print AOD profile in debugging mode
pedro-jm Mar 13, 2025
da52251
Option to modulate the smoke emissions by fuel moisture
pedro-jm Mar 17, 2025
64ce9c5
Fix library links for NetCDF and MPI (#7)
danrosen25 Mar 26, 2025
d0619bf
Change linking back to NetCDF_LIBRARIES
danrosen25 Mar 27, 2025
4a12f61
Merge pull request #8 from NCAR/feature_wrf_coupling
pedro-jm Mar 27, 2025
2428bee
Merge branch 'develop' into ideal
pedro-jm Apr 1, 2025
4869d22
Proper integration of ideal capability
pedro-jm Apr 2, 2025
65ac7af
Merge pull request #9 from NCAR/ideal
pedro-jm Apr 2, 2025
e3d27fb
Ideal block in the namelist is not mandatory
pedro-jm Jun 11, 2025
8a758c7
Merge pull request #10 from pedro-jm/fixnml
pedro-jm Jun 11, 2025
92477bb
First version of tmp code for parallelization
pedro-jm Jul 16, 2025
03bf335
state works on tiles
pedro-jm Jul 16, 2025
1bf1a0d
fire_model works on tiles
pedro-jm Jul 16, 2025
39f3253
Tile functionality working with one cpu
pedro-jm Jul 16, 2025
905b991
Remove prints realted to smoke emissions
pedro-jm Jul 16, 2025
fa29cb1
Merge pull request #11 from pedro-jm/paral
pedro-jm Jul 16, 2025
6063566
Adding OpenMP parallelization
pedro-jm Jul 17, 2025
c0cfcb7
Merge pull request #12 from pedro-jm/paral
pedro-jm Jul 17, 2025
94cfa94
compiling option to build with OpenMP
pedro-jm Jul 18, 2025
afeca1f
adding 10-m wind to fire cap imports
masih-e Jun 11, 2025
1e3abe9
adding wind adjustment factor for 10 m wind
masih-e Jun 20, 2025
a679d9f
Merge pull request #14 from masih-e/develop
mkavulich Jul 24, 2025
47fed24
Modify naming of var to activate OpenMP in cmake to be consistent wit…
pedro-jm Jul 25, 2025
9d05441
Merge pull request #13 from pedro-jm/paral
pedro-jm Jul 25, 2025
256618c
Reduce prints
pedro-jm Sep 19, 2025
789047a
Reduce prints in wrf module
pedro-jm Sep 19, 2025
c7261f2
Tile strategy in agreement with WRF when coupled to WRF
pedro-jm Sep 19, 2025
e3b1364
Merge pull request #16 from pedro-jm/omp
pedro-jm Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "doc/" directory with Sphinx
sphinx:
configuration: doc/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: doc/requirements.txt
38 changes: 33 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.18)
project(
ufs_fire_behavior
VERSION 0.0.1
LANGUAGES Fortran CXX)
LANGUAGES Fortran CXX C )

# user defined cmake modules
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")
Expand Down Expand Up @@ -37,14 +37,23 @@ set(CMAKE_Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mod")
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} DESTINATION ${CMAKE_INSTALL_PREFIX})

# third party libraries
find_package(NetCDF REQUIRED Fortran)
if(${CMAKE_PROJECT_NAME} STREQUAL "WRF")
find_package(netCDF-Fortran REQUIRED)
else()
find_package(NetCDF REQUIRED Fortran)
endif()

# turn on DM_PARALLEL preprocessor directive
if(DM_PARALLEL)
find_package(MPI REQUIRED)
add_compile_definitions(firelib PUBLIC DM_PARALLEL=1)
endif()

if(OPENMP)
find_package(OpenMP REQUIRED)
message(STATUS "OpenMP enabled")
endif()

#------------------------------------------------------------------------------
# Add source files

Expand All @@ -55,9 +64,11 @@ list(APPEND _state_files state/state_mod.F90

list(APPEND _share_files share/proj_lc_mod.F90
share/datetime_mod.F90
share/emis_mod.F90
share/fuel_mod.F90
share/ros_mod.F90
share/fmc_mod.F90
share/interp_mod.F90
share/constants_mod.F90)

# IO
Expand Down Expand Up @@ -88,14 +99,31 @@ list(APPEND _driver_files driver/advance_mod.F90

# configure fire behavior library
add_library(firelib STATIC ${_state_files} ${_share_files} ${_io_files} ${_wrffire_physics} ${_driver_files})
target_include_directories(firelib PUBLIC ${NetCDF_INCLUDE_DIRS})
target_link_libraries(firelib PUBLIC $<BUILD_INTERFACE:${NetCDF_LIBRARIES}>)
if(${CMAKE_PROJECT_NAME} STREQUAL "WRF")
target_link_libraries(firelib PUBLIC netCDF::netcdff )
else()
target_include_directories(firelib PUBLIC ${NetCDF_INCLUDE_DIRS})
target_link_libraries(firelib PUBLIC $<BUILD_INTERFACE:${NetCDF_LIBRARIES}>)
endif()
if (DM_PARALLEL)
target_link_libraries(firelib PUBLIC $<BUILD_INTERFACE:MPI::MPI_Fortran>)
endif()
if(OPENMP)
target_link_libraries(firelib PUBLIC $<BUILD_INTERFACE:OpenMP::OpenMP_Fortran>)
endif()
set_target_properties(
firelib
PROPERTIES
Fortran_FORMAT FREE
)

# configure fire behavior executable
add_executable(fire_behavior.exe driver/fire_behavior.F90)
add_dependencies(fire_behavior.exe firelib)
target_link_libraries(fire_behavior.exe PUBLIC firelib)
target_link_libraries(fire_behavior.exe PUBLIC NetCDF::NetCDF_Fortran)
if(NOT ${CMAKE_PROJECT_NAME} STREQUAL "WRF")
target_link_libraries(fire_behavior.exe PUBLIC NetCDF::NetCDF_Fortran)
endif()
install(TARGETS fire_behavior.exe DESTINATION bin)

if(NUOPC OR ESMX)
Expand Down
8 changes: 5 additions & 3 deletions cmake/modules/FireBuildSettings.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
macro(set_fire_defaults)
if(DM_PARALLEL STREQUAL "")
if("${DM_PARALLEL}" STREQUAL "")
set(DM_PARALLEL ON)
endif()
if(NUOPC STREQUAL "")
if("${NUOPC}" STREQUAL "")
set(NUOPC OFF)
endif()
if(ESMX STREQUAL "")
if("${ESMX}" STREQUAL "")
set(ESMX OFF)
endif()
endmacro()
Expand All @@ -14,10 +14,12 @@ function(set_fire_cache)
set (DM_PARALLEL ${DM_PARALLEL} CACHE BOOL "Turn on MPI build" FORCE)
set (NUOPC ${NUOPC} CACHE BOOL "Build NUOPC cap" FORCE)
set (ESMX ${ESMX} CACHE BOOL "Build ESMX application" FORCE)
set (OPENMP ${OPENMP} CACHE BOOL "Enable OpenMP parallelization" FORCE)
endfunction()

function(print_fire_settings)
message (STATUS "FIRE BEHAVIOR BUILD SETTINGS\n"
"\tOPENMP: ${OPENMP}\n"
"\tDM_PARALLEL: ${DM_PARALLEL}\n"
"\tNUOPC: ${NUOPC}\n"
"\tESMX: ${ESMX}")
Expand Down
9 changes: 9 additions & 0 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ usage () {
printf " build NUOPC library and module\n"
printf " --esmx, -x\n"
printf " build ESMX application (includes NUOPC)\n"
printf " --openmp-on\n"
printf " enable OpenMP parallelization\n"
printf " --prefix=INSTALL_PREFIX\n"
printf " installation prefix\n"
printf " --verbose, -v\n"
Expand Down Expand Up @@ -81,6 +83,7 @@ VERBOSE=false
TEST=false
TEST_NAME=""
CLEAN=false
OPENMP=false

#------------------------------------------------------------------------------

Expand Down Expand Up @@ -129,6 +132,7 @@ while :; do
--test=?*|-t=?*) TEST=true; TEST_NAME=${1#*=} ;;
--test=) TEST=true ;;
--clean) CLEAN=true ;;
--openmp-on) OPENMP=true ;;
--clean=?*) printf "ERROR: $1 argument ignored.\n"; usage; exit 1 ;;
--clean=) printf "ERROR: $1 argument ignored.\n"; usage; exit 1 ;;
-?*) printf "ERROR: Unknown option $1\n"; usage; exit 1 ;;
Expand Down Expand Up @@ -213,6 +217,11 @@ if [ "${ESMX}" = true ]; then
else
CMAKE_SETTINGS+=("-DESMX=OFF")
fi
if [ "${OPENMP}" = true ]; then
CMAKE_SETTINGS+=("-DOPENMP=ON")
else
CMAKE_SETTINGS+=("-DOPENMP=OFF")
fi
cmake -S${FIRE_DIR} -B${BUILD_DIR} ${CMAKE_SETTINGS[@]}
if [ "$?" != "0" ]; then
echo "$0 Failed: (cmake)"
Expand Down
Binary file added doc/CFBM-NUOPC.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading