Skip to content

enable building stochastic_physics using CMake#3

Open
guoqing-noaa wants to merge 6 commits intodtcenter:gsl/MPAS_stoch_physicsfrom
guoqing-noaa:stochastic
Open

enable building stochastic_physics using CMake#3
guoqing-noaa wants to merge 6 commits intodtcenter:gsl/MPAS_stoch_physicsfrom
guoqing-noaa:stochastic

Conversation

@guoqing-noaa
Copy link

@guoqing-noaa guoqing-noaa commented Feb 28, 2026

This PR enable building stochastic_physics using CMake.

  1. update core_atmosphere/CMakeLists.txt to build stochastic_physics as a module for MPAS-Model
  2. update modulefiles to provide needed MKL and NetCDF libraries.
  3. update the submodule stochastic_physics to use mpi instead of mpi_f08 as the default MPAS-Model compiles with mpi.
    This is the first step to make the stochastic compiling successfully using CMake. Future PR will introduce #ifdef MPAS_USE_MPI_F08 as has been done in MPAS-Model.
  4. NOTE: this PR does not compile cellular automata (CA). CA requires the extrafms library and this capability may be added in future PRs (so, halo_exchange.fv3.F90, cellular_automata_global.F90, cellular_automata_sgs.F90, update_ca.F90 are excluded in CMakeLists.txt for now).
  5. stochastic_physics needs to check whether CCPP_32BIT is defined. The parent MPAS-Model sets this or not depending on whether to build with double precision.
  6. core_atmosphere/stochastic_physics/CMakeLists.txt is NOT used by the parent MPAS-Model. So any changes in that file will not affect the MPAS-Model. This is consistent with the current MPAS-Model practice.

If needed, a -DSTOCHASTIC_PHYSICS=ON option may be added to turn on/off the building of stochastic_physics in a future PR.

@guoqing-noaa
Copy link
Author

Note: it is better to merge this PR dtcenter/stochastic_physics#3 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant