Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
eb63f9f
Reorganize code for MPAS dycore. Isolate FV3 and MPAS pieces.
dustinswales Jul 19, 2024
1301e07
Added more build step pieces, up until the MPAS dycore build
dustinswales Jul 19, 2024
587ea55
Some more changes. Almost building.
dustinswales Jul 30, 2024
b4f6463
MPAS building in UFSATM! Some more reorganization. Initial infrastruc…
dustinswales Aug 1, 2024
424e86b
Move ccpp/drivers into common directory (revert prioir move)
dustinswales Aug 5, 2024
8168a66
Forgot to link to personal for of MPAS submodule
dustinswales Aug 7, 2024
b56c486
Address reviewers comments
dustinswales Aug 13, 2024
64afb90
Addres comments
dustinswales Aug 13, 2024
5dec7c2
Move MPAS to ufs-community reporitory
dustinswales Sep 3, 2024
1b2c665
Revert unneeded change
dustinswales Sep 3, 2024
afb09b5
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Oct 2, 2024
f571248
Merge pull request #129 from dustinswales/feature/mpas-dycore-reorg
dustinswales Oct 2, 2024
aa2fe89
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Feb 11, 2025
f817f5a
Stash before port
dustinswales Feb 14, 2025
c3fd9c2
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Feb 14, 2025
3ea97c5
Work in progress
dustinswales Feb 19, 2025
2b68c13
Work in progress.
dustinswales Feb 25, 2025
6ac7cf5
work in progress
dustinswales Mar 4, 2025
ece9acc
Update physics
dustinswales Apr 1, 2025
96c8b73
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Apr 1, 2025
852bc50
Work in progress
dustinswales Apr 8, 2025
0234644
Stash changes
dustinswales Apr 17, 2025
e95b97f
Stash before sync
dustinswales Apr 24, 2025
334b633
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Apr 24, 2025
479e7a5
Some more changes. Updated MPAS submodule
dustinswales Apr 24, 2025
823448c
Some changes
dustinswales Apr 25, 2025
5d2a2fb
Many changes to MPAS interface
dustinswales May 5, 2025
9734edb
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales May 5, 2025
951ec07
Getting closer...
dustinswales May 13, 2025
a86b671
More changes. Starting partitioning
dustinswales May 16, 2025
64dd38e
Commit before sync
dustinswales May 20, 2025
121fc8d
Work in progress
dustinswales May 30, 2025
d4425ca
More changes. work in progress
dustinswales Jun 6, 2025
18169a2
Unify NUOPC caps
dustinswales Jun 18, 2025
6131d3d
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Jun 18, 2025
f6feff0
Some more chanegs
dustinswales Jun 18, 2025
17082da
More changes
dustinswales Jun 18, 2025
fa3ba88
More changes
dustinswales Jun 18, 2025
c877daa
Some tiny changes
dustinswales Jun 18, 2025
e0922f6
Some tiny changes
dustinswales Jun 18, 2025
4eee595
Some tiny changes
dustinswales Jun 18, 2025
3604abc
Revert name change
dustinswales Jun 18, 2025
bd05d8a
Sync physics
dustinswales Jun 20, 2025
b7c65d5
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Jun 20, 2025
ea7ddf0
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
dustinswales Jul 9, 2025
c6c4c3f
Remove deprecated submodules from UPP
dustinswales Jul 10, 2025
3fc7804
Revert change to remove deprecated submodules after FV3->UFSATM migra…
dustinswales Jul 10, 2025
88a2b7e
Synced MPAS-Model with MPAS-Dev
dustinswales Jul 10, 2025
916c5b8
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Jul 14, 2025
a8e77c1
Synced with main, changes to CCPP physics for buildsystem, some house…
dustinswales Jul 15, 2025
7fc744d
Add MPAS logfile for UWM RTs
dustinswales Jul 16, 2025
29b8fb3
Updated physics
dustinswales Jul 16, 2025
2d27270
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Jul 16, 2025
8cdcc0c
Added TEMPO DDT info to CCPP config
dustinswales Jul 16, 2025
08f644f
Update physics
dustinswales Jul 17, 2025
8910f51
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Jul 17, 2025
ceee60d
Updated physics
dustinswales Jul 21, 2025
5306ca9
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Jul 21, 2025
4623d2f
Add Doms suggestions into CCPP_driver.F90
dustinswales Jul 21, 2025
0c7ecb8
Address reviewers comments
dustinswales Jul 22, 2025
245239f
Now B4B
dustinswales Jul 23, 2025
e52705c
Remove SMIOL dependency from MPAS (not used)
dustinswales Jul 23, 2025
6d44531
Address reviewers comments.
dustinswales Jul 24, 2025
5cca62e
one more small name change
dustinswales Jul 24, 2025
ee4044f
Update minimum cmake version for CCPP.
dustinswales Jul 25, 2025
9eb4eb3
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Aug 4, 2025
b2b37b4
Update module name in tests
dustinswales Aug 4, 2025
379a587
Sinc physics
dustinswales Aug 18, 2025
91fc2a7
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Aug 18, 2025
03d6d48
Revert bug introduced during code review.
dustinswales Aug 20, 2025
cd3c2c5
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Aug 26, 2025
b85571e
Merge branch 'feature/mpas_nuopc_init' of https://github.com/dustinsw…
dustinswales Aug 26, 2025
c8745de
Update MPAS submodule
dustinswales Aug 26, 2025
f8fc4f6
Update CMakeLists in MPAS core.
dustinswales Aug 27, 2025
6649667
Remove relice from git merge conflict in MPAS fork
dustinswales Aug 27, 2025
c9e8973
Revert submodules
dustinswales Aug 29, 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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
path = upp
url = https://github.com/NOAA-EMC/UPP
branch = develop
[submodule "mpas/MPAS-Model"]
path = mpas/MPAS-Model
url = https://github.com/ufs-community/MPAS-Model.git
branch = feature/mpas-in-ufs
129 changes: 108 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ if(BUILD_CI_TESTING)
if (FV3)
project(ufsatm_fv3 VERSION 1.0 LANGUAGES C CXX Fortran)
endif()
if (MPAS)
project(ufsatm_mpas VERSION 1.0 LANGUAGES C CXX Fortran)
endif()
include(ci/CMakeLists.txt)
endif()

# Set variables for all dycore build options in UFSATM.
set(DYCORE_TARGET_MPAS ufsatm_mpas)
set(DYCORE_TARGET_FV3 ufsatm_fv3)

###############################################################################
Expand Down Expand Up @@ -56,14 +60,38 @@ if(BUILD_CI_TESTING)
add_subdirectory(tests)
endif()

# Not used yet by MPAS in UFSATM, but needed by ufsatm_cap.F90 to work.
list(APPEND coupling_srcs
cpl/module_block_data.F90
cpl/module_cplfields.F90
cpl/module_cap_cpl.F90
cpl/module_cplscalars.F90)

list(APPEND io_srcs
io/module_write_netcdf.F90
io/module_write_restart_netcdf.F90
io/module_fv3_io_def.F90
io/module_write_internal_state.F90
io/module_wrt_grid_comp.F90)

# Eventually these could be shared by MPAS, and merged with {io_srcs} list.
list(APPEND fv3_io_srcs
io/fv3atm_common_io.F90
io/fv3atm_clm_lake_io.F90
io/fv3atm_rrfs_sd_io.F90
io/fv3atm_sfc_io.F90
io/fv3atm_oro_io.F90
io/fv3atm_history_io.F90
io/fv3atm_restart_io.F90)

###############################################################################
### UFSATM with FV3 dynamical core
###############################################################################
if (FV3)
add_definitions(-DFV3)
set(DYCORE_TARGET ${DYCORE_TARGET_FV3}
CACHE INTERNAL "DYCORE_TARGET Options: fv3atm")
set(DYCORE_TARGET_CAP_MOD fv3atm_cap_mod PARENT_SCOPE)

set(DYCORE_TARGET_CAP_MOD ufsatm_cap_mod PARENT_SCOPE)

# These ifdefs need to be turned ON in the dycore.
set(use_WRTCOMP ON)
Expand All @@ -83,7 +111,7 @@ if (FV3)
if(INLINE_POST)
set(BUILD_POSTEXEC OFF)
add_subdirectory(upp)
set(POST_SRC fv3/io/post_nems_routines.F90 fv3/io/post_fv3.F90)
set(POST_SRC io/post_nems_routines.F90 io/post_fv3.F90)
list(APPEND _ufsatm_defs_private INLINE_POST)
endif()

Expand Down Expand Up @@ -130,27 +158,15 @@ if (FV3)

# FV3 drivers and dependencies
add_library(${DYCORE_TARGET}
ufsatm_cap.F90
ufsatm_util.F90
fv3/atmos_model.F90
fv3/fv3_cap.F90
fv3/module_fv3_config.F90
fv3/module_fcst_grid_comp.F90
fv3/stochastic_physics/stochastic_physics_wrapper.F90
cpl/module_block_data.F90
cpl/module_cplfields.F90
cpl/module_cap_cpl.F90
cpl/module_cplscalars.F90
fv3/io/fv3atm_common_io.F90
fv3/io/fv3atm_clm_lake_io.F90
fv3/io/fv3atm_rrfs_sd_io.F90
fv3/io/fv3atm_sfc_io.F90
fv3/io/fv3atm_oro_io.F90
fv3/io/fv3atm_history_io.F90
fv3/io/fv3atm_restart_io.F90
fv3/io/module_write_netcdf.F90
fv3/io/module_write_restart_netcdf.F90
fv3/io/module_fv3_io_def.F90
fv3/io/module_write_internal_state.F90
fv3/io/module_wrt_grid_comp.F90
${coupling_srcs}
${fv3_io_srcs}
${io_srcs}
${moving_nest_srcs}
${POST_SRC}
)
Expand All @@ -159,8 +175,75 @@ if (FV3)
list(APPEND _ufsatm_defs_private GFS_PHYS
INTERNAL_FILE_NML
use_WRTCOMP)
else()
remove_definitions(-DFV3)
endif()

###############################################################################
### UFSATM with MPAS dynamical core.
###############################################################################
if (MPAS)
add_definitions(-DMPAS)
set(DYCORE_TARGET ${DYCORE_TARGET_MPAS})

# Include MPAS Cmake tools.
include(${CMAKE_CURRENT_SOURCE_DIR}/mpas/MPAS-Model/cmake/Functions/MPAS_Functions.cmake)

# Set any pre-processor directive needed in MPAS dycore.
get_mpas_version(MPAS_VERSION)
set(MPAS_ALL_CORES atmosphere)
set(MPAS_CORES atmosphere CACHE STRING "MPAS cores to build. Options: ${MPAS_ALL_CORES}")
if(MPAS_CORES MATCHES " ") #Convert strings separated with spaces to CMake list separated with ';'
string(REPLACE " " ";" MPAS_CORES ${MPAS_CORES})
set(MPAS_CORES ${MPAS_CORES} CACHE STRING "MPAS cores to build. Options: ${MPAS_ALL_CORES}" FORCE)
endif()
set(MPAS_CAM_DYCORE TRUE)
set(MPAS_USE_PIO TRUE)
add_definitions(-DMPAS_USE_MPI_F08)
add_definitions(-DMPAS_PIO_SUPPORT)
add_definitions(-DMPAS_CAM_DYCORE)
add_definitions(-DMPAS_UFS_DYCORE)
add_definitions(-DSINGLE_PRECISION)

# Source files for MPAS dynamical core drivers.
set(MPAS_MAIN_SRC ${CMAKE_CURRENT_SOURCE_DIR}/mpas/MPAS-Model/src/driver/mpas.F)
set(MPAS_SUBDRIVER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/mpas/MPAS-Model/src/driver/mpas_subdriver.F)

# MPAS dynamical core
add_subdirectory(mpas)

# MPAS drivers and dependencies
add_library(${DYCORE_TARGET}
ufsatm_cap.F90
ufsatm_util.F90
mpas/atmos_model.F90
mpas/module_mpas_config.F90
mpas/module_fcst_grid_comp.F90
mpas/atmos_coupling.F90
mpas/ufs_mpas_subdriver.F90
${coupling_srcs}
${io_srcs}
ccpp/data/MPAS_typedefs.F90
ccpp/driver/MPAS_init.F90
)
add_dependencies(${DYCORE_TARGET} mpas mpasccpp)

if(NOT MPAS_GIT_VERSION)
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/mpas/MPAS-Model"
OUTPUT_VARIABLE _mpas_git_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
set(_mpas_git_version "Unknown")
endif()
set(MPAS_GIT_VERSION ${_mpas_git_version} CACHE STRING "MPAS-Model git version")
message(STATUS "Setting MPAS_GIT_VERSION ${_mpas_git_version}")
endif()
else()
remove_definitions(-DMPAS)
endif()

###############################################################################
### Link libraries
Expand All @@ -183,7 +266,11 @@ if (FV3)
endif()
endif()


if (MPAS)
target_link_libraries(${DYCORE_TARGET} PUBLIC mpas
mpasccpp
fms)
endif()

# Always include EMC libraries in dycore install
target_link_libraries(${DYCORE_TARGET} PUBLIC w3emc::w3emc_d
Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@

# fv3atm
# ufsatm

This repository contains a driver and key subcomponents of the
atmospheric component of the NOAA's [Unified Forecast System
(UFS)](https://ufscommunity.org/) weather model.

The subcomponents include:

- The Finite-Volume Cubed-Sphere (FV3) dynamical core, originally
from the [Geophysical Fluid Dynamics
Laboratory](https://www.gfdl.noaa.gov/).
- The Common Community Physics Package (CCPP) supported by the
- The Finite-Volume Cubed-Sphere (FV3) dynamical core, originally
from the [Geophysical Fluid Dynamics Laboratory](https://www.gfdl.noaa.gov/).

- The Model for Prediction Across Scales - Atmosphere (MPAS-A) dynamical
core developed by [NSF-NCAR Mesoscale and Micrometeorology Laboratory (MMM)](https://www.mmm.ucar.edu).
- [MPAS Model](https://github.com/ufs-community/MPAS-Model)
- [MPAS documentation](https://www.mmm.ucar.edu/models/mpas)

- The Common Community Physics Package (CCPP) supported by the
[Developmental Testbed Center
(DTC)](https://dtcenter.org/community-code/common-community-physics-package-ccpp),
including:
- [CCPP Framework](https://github.com/NCAR/ccpp-framework).
- [CCPP Physics](https://github.com/NCAR/ccpp-physics)
- wrapper code to call [UFS stochastic

- wrapper code to call [UFS stochastic
physics](https://stochastic-physics.readthedocs.io/en/latest/)
- The io code handles netCDF I/O.
- The cpl coupler code connects the different components and allows

- The io code handles netCDF I/O.

- The cpl coupler code connects the different components and allows
them to communicate.

## Prerequisites
Expand All @@ -41,13 +49,13 @@ This package also requires the following external packages:
- [ESMF](https://github.com/esmf-org/esmf)
- [GFDL's Flexible Modeling System](https://github.com/NOAA-GFDL/FMS)

## Obtaining fv3atm
## Obtaining ufsatm

To obtain fv3atm, clone the git repository, and update the submodules:
To obtain ufsatm, clone the git repository, and update the submodules:

```
git clone https://github.com/NOAA-EMC/fv3atm.git
cd fv3atm
git clone https://github.com/NOAA-EMC/ufsatm.git
cd ufsatm
git submodule update --init --recursive
```

Expand Down
Loading