Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
117 changes: 63 additions & 54 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Copyright 2017-2024 UCAR
# (C) Copyright 2017-2026 UCAR
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
Expand All @@ -8,7 +8,7 @@
#

#
# Usage: cmake <mpas-bundle src dir> -DCMAKE_BUILD_TYPE=RelWithDebINfo -DCMAKE_VERBOSE_MAKEFILE=ON -DSNAPSHOT_DATE=2024-06-01 -DMPAS_DOUBLE_PRECISION=OFF
# Usage: cmake <mpas-bundle src dir> -DCMAKE_BUILD_TYPE=RelWithDebINfo -DCMAKE_VERBOSE_MAKEFILE=ON -DMPAS_DOUBLE_PRECISION=OFF

cmake_minimum_required( VERSION 3.14 )
project( mpas-bundle VERSION 3.0.0 LANGUAGES C CXX Fortran )
Expand All @@ -25,59 +25,68 @@ include( ecbuild_bundle )
ecbuild_bundle_initialize()
# Use external jedi-cmake or build in bundle

if(DEFINED ENV{jedi_cmake_ROOT})
include( $ENV{jedi_cmake_ROOT}/share/jedicmake/Functions/git_functions.cmake )
list( APPEND CMAKE_MODULE_PATH $ENV{jedi_cmake_ROOT}/share/jedicmake/Modules )
message (INFO "CMAKE_MODULE_PATH")
# If the gpu toolchain is loaded, only configure MPAS-Model
if(CMAKE_Fortran_COMPILER_ID MATCHES NVHPC)
ecbuild_bundle( PROJECT MPAS GIT "https://github.com/MPAS-Dev/MPAS-Model.git" BRANCH develop UPDATE )
else()
ecbuild_bundle( PROJECT jedicmake GIT "https://github.com/JCSDA/jedi-cmake.git" BRANCH develop UPDATE RECURSIVE )
include( jedicmake/cmake/Functions/git_functions.cmake )
list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/jedicmake/CMakeModules/Modules )
endif()

option(BUNDLE_SKIP_ECKIT "Don't build eckit" "ON" ) # Skip eckit build unless user passes -DBUNDLE_SKIP_ECKIT=OFF
option(BUNDLE_SKIP_FCKIT "Don't build fckit" "ON" ) # Skip eckit build unless user passes -DBUNDLE_SKIP_FCKIT=OFF
option(BUNDLE_SKIP_ATLAS "Don't build atlas" "ON" ) # Skip atlas build unless user passes -DBUNDLE_SKIP_ATLAS=OFF
ecbuild_bundle( PROJECT eckit GIT "https://github.com/ecmwf/eckit.git" TAG 1.24.4 )
ecbuild_bundle( PROJECT fckit GIT "https://github.com/ecmwf/fckit.git" TAG 0.11.0 )
ecbuild_bundle( PROJECT atlas GIT "https://github.com/ecmwf/atlas.git" TAG 0.34.0 )

#TODO: When mpas-bundle becomes a public repo, consider changing the default value of BUNDLE_SKIP_ROPP-UFO to "ON"
option(BUNDLE_SKIP_ROPP-UFO "Don't build ROPP-UFO" "ON") # Build ropp-ufo unless user passes -DBUNDLE_SKIP_ROPP-UFO=ON
ecbuild_bundle( PROJECT ropp-ufo GIT "https://github.com/JCSDA-internal/ropp-test.git" BRANCH develop UPDATE )
option(BUNDLE_SKIP_RTTOV "Don't build rttov" "ON") # Skip rttov build unless user passes -DBUNDLE_SKIP_RTTOV=OFF
ecbuild_bundle( PROJECT rttov GIT "https://github.com/JCSDA-internal/rttov.git" BRANCH develop UPDATE )

ecbuild_bundle( PROJECT oops GIT "https://github.com/JCSDA/oops.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT vader GIT "https://github.com/JCSDA/vader.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT saber GIT "https://github.com/JCSDA/saber.git" BRANCH develop UPDATE)
ecbuild_bundle( PROJECT crtm GIT "https://github.com/JCSDA/CRTMv3.git" BRANCH develop UPDATE )

option(ENABLE_IODA_DATA "Obtain ioda test data from ioda-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT ioda-data GIT "https://github.com/JCSDA-internal/ioda-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT ioda GIT "https://github.com/JCSDA/ioda.git" BRANCH develop UPDATE )
option(ENABLE_UFO_DATA "Obtain ufo test data from ufo-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT ufo-data GIT "https://github.com/JCSDA-internal/ufo-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT ufo GIT "https://github.com/JCSDA/ufo.git" BRANCH develop UPDATE )


# Find external ESMF for mpas-model (optional)
find_package(ESMF 8.3.0 MODULE)

set(MPAS_DOUBLE_PRECISION "ON" CACHE STRING "MPAS-Model: Use double precision 64-bit Floating point.")
set(MPAS_CORES init_atmosphere atmosphere CACHE STRING "MPAS-Model: cores to build.")

ecbuild_bundle( PROJECT MPAS GIT "https://github.com/MPAS-Dev/MPAS-Model" BRANCH develop UPDATE )
option(ENABLE_MPAS_JEDI_DATA "Obtain mpas-jedi test data from mpas-jedi-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT mpas-jedi-data GIT "https://github.com/JCSDA-internal/mpas-jedi-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT mpas-jedi GIT "https://github.com/JCSDA/mpas-jedi" BRANCH develop UPDATE )

# Set GIT_BRANCH_FUNC to MPAS-JEDI's current branch so that it can be used for mpas-jedi-data
find_branch_name(REPO_DIR_NAME mpas-jedi)

# If mpas-jedi's current branch is available in mpas-jedi-data repo, that branch will be checked out
branch_checkout (REPO_DIR_NAME mpas-jedi-data
if(DEFINED ENV{jedi_cmake_ROOT})
include( $ENV{jedi_cmake_ROOT}/share/jedicmake/Functions/git_functions.cmake )
list( APPEND CMAKE_MODULE_PATH $ENV{jedi_cmake_ROOT}/share/jedicmake/Modules )
message (INFO "CMAKE_MODULE_PATH")
else()
ecbuild_bundle( PROJECT jedicmake GIT "https://github.com/JCSDA/jedi-cmake.git" BRANCH develop UPDATE RECURSIVE )
include( jedicmake/cmake/Functions/git_functions.cmake )
list( APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/jedicmake/CMakeModules/Modules )
endif()

option(BUNDLE_SKIP_ECKIT "Don't build eckit" "ON" ) # Skip eckit build unless user passes -DBUNDLE_SKIP_ECKIT=OFF
option(BUNDLE_SKIP_FCKIT "Don't build fckit" "ON" ) # Skip eckit build unless user passes -DBUNDLE_SKIP_FCKIT=OFF
option(BUNDLE_SKIP_ATLAS "Don't build atlas" "ON" ) # Skip atlas build unless user passes -DBUNDLE_SKIP_ATLAS=OFF
ecbuild_bundle( PROJECT eckit GIT "https://github.com/ecmwf/eckit.git" TAG 1.24.4 )
ecbuild_bundle( PROJECT fckit GIT "https://github.com/ecmwf/fckit.git" TAG 0.11.0 )
ecbuild_bundle( PROJECT atlas GIT "https://github.com/ecmwf/atlas.git" TAG 0.34.0 )

#TODO: When mpas-bundle becomes a public repo, consider changing the default value of BUNDLE_SKIP_ROPP-UFO to "ON"
option(BUNDLE_SKIP_ROPP-UFO "Don't build ROPP-UFO" "ON") # Build ropp-ufo unless user passes -DBUNDLE_SKIP_ROPP-UFO=ON
ecbuild_bundle( PROJECT ropp-ufo GIT "https://github.com/JCSDA-internal/ropp-test.git" BRANCH develop UPDATE )
option(BUNDLE_SKIP_RTTOV "Don't build rttov" "ON") # Skip rttov build unless user passes -DBUNDLE_SKIP_RTTOV=OFF
ecbuild_bundle( PROJECT rttov GIT "https://github.com/JCSDA-internal/rttov.git" BRANCH develop UPDATE )

ecbuild_bundle( PROJECT oops GIT "https://github.com/JCSDA/oops.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT vader GIT "https://github.com/JCSDA/vader.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT saber GIT "https://github.com/JCSDA/saber.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT crtm GIT "https://github.com/JCSDA/CRTMv3.git" BRANCH develop UPDATE )

option(ENABLE_IODA_DATA "Obtain ioda test data from ioda-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT ioda-data GIT "https://github.com/JCSDA-internal/ioda-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT ioda GIT "https://github.com/JCSDA/ioda.git" BRANCH develop UPDATE )
option(ENABLE_UFO_DATA "Obtain ufo test data from ufo-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT ufo-data GIT "https://github.com/JCSDA-internal/ufo-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT ufo GIT "https://github.com/JCSDA/ufo.git" BRANCH develop UPDATE )

# Build IODA converters if requested
option(BUILD_IODA_CONVERTERS "Build IODA Converters" OFF)
if(BUILD_IODA_CONVERTERS)
ecbuild_bundle( PROJECT iodaconv GIT "https://github.com/jcsda-internal/ioda-converters.git" BRANCH develop UPDATE )
endif()

# Find external ESMF for mpas-model (optional)
find_package(ESMF 8.3.0 MODULE)

set(MPAS_DOUBLE_PRECISION "ON" CACHE STRING "MPAS-Model: Use double precision 64-bit Floating point.")
set(MPAS_CORES init_atmosphere atmosphere CACHE STRING "MPAS-Model: cores to build.")

ecbuild_bundle( PROJECT MPAS GIT "https://github.com/MPAS-Dev/MPAS-Model" BRANCH develop UPDATE )
option(ENABLE_MPAS_JEDI_DATA "Obtain mpas-jedi test data from mpas-jedi-data repository (vs tarball)" ON)
ecbuild_bundle( PROJECT mpas-jedi-data GIT "https://github.com/JCSDA-internal/mpas-jedi-data.git" BRANCH develop UPDATE )
ecbuild_bundle( PROJECT mpas-jedi GIT "https://github.com/JCSDA/mpas-jedi" BRANCH develop UPDATE )

# Set GIT_BRANCH_FUNC to MPAS-JEDI's current branch so that it can be used for mpas-jedi-data
find_branch_name(REPO_DIR_NAME mpas-jedi)

# If mpas-jedi's current branch is available in mpas-jedi-data repo, that branch will be checked out
branch_checkout (REPO_DIR_NAME mpas-jedi-data
BRANCH ${GIT_BRANCH_FUNC} )

endif()

ecbuild_bundle_finalize()
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(C) Copyright 2017-2021 UCAR
(C) Copyright 2017-2026 UCAR

This software is licensed under the terms of the Apache Licence Version 2.0
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
Expand Down Expand Up @@ -45,6 +45,8 @@ _**For performance and memory reasons, it is recommended to compile ```mpas-bund

```bash
git clone https://github.com/JCSDA/mpas-bundle.git
```
```bash
cd mpas-bundle
```

Expand All @@ -60,8 +62,12 @@ _**For performance and memory reasons, it is recommended to compile ```mpas-bund
| __csh/tcsh__ | `source <mpas_bundle_dir>/env-setup/gnu-derecho.csh` | `source <mpas_bundle_dir>/env-setup/intel-derecho.csh` |
* Create and navigate into the build directory.

```bash
mkdir -p <mpas-bundle_build_dir>
```
```bash
cd <mpas-bundle_build_dir>
```
* To configure the build using CMake, set the `MPAS_DOUBLE_PRECISION` flag according to your usage needs:
enable it (`-DMPAS_DOUBLE_PRECISION=ON`) for running the `mpas-jedi` test suite, or
disable it for `MPAS-Workflow` calculations when using the `mpas-bundle` build.
Expand Down
61 changes: 0 additions & 61 deletions env-setup/crontab.sh

This file was deleted.

29 changes: 23 additions & 6 deletions env-setup/gnu-derecho.csh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,33 @@ endif

module purge
# ignore that the sticky module ncarenv/... is not unloaded
module load ncarenv/23.09
module load ncarenv/24.12
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles
module load ecflow/5.8.4
module load mysql/8.0.33

module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core
module load stack-gcc/12.2.0
module load stack-cray-mpich/8.1.25
module load stack-python/3.10.13
module load jedi-mpas-env
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.9.3/envs/ue-gcc-12.4.0/install/modulefiles/Core

module load stack-gcc/12.4.0
module load stack-cray-mpich/8.1.29
module load stack-python/3.11.7
module load py-pycodestyle/2.11.0
Comment thread
byoung-joo marked this conversation as resolved.
# module load jedi-mpas-env is commented out because it loads many modules not needed for
# building and running mpas-bundle on derecho.
# To load all of the modules which were loaded prior to 01/15/2026,
# uncomment out "module load jedi-mpas-env"
# module load jedi-mpas-env
module load atlas/0.40.0
module load ecbuild/3.7.2
module load netcdf-cxx4/4.3.1
module load parallelio/2.6.2
module load gsl-lite/0.37.0
module load nccmp/1.9.0.1
module load udunits/2.2.28
# Following modules are required for ioda-converters build
module load bufr/12.1.0
module load py-pybind11/2.13.5
module list

limit stacksize unlimited
setenv F_UFMTENDIAN 'big_endian:101-200'
Expand Down
30 changes: 23 additions & 7 deletions env-setup/gnu-derecho.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,35 @@ fi

module purge
# ignore that the sticky module ncarenv/... is not unloaded
module load ncarenv/23.09
module load ncarenv/24.12
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles
module load ecflow/5.8.4
module load mysql/8.0.33

module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core
module load stack-gcc/12.2.0
module load stack-cray-mpich/8.1.25
module load stack-python/3.10.13
module load jedi-mpas-env
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.9.3/envs/ue-gcc-12.4.0/install/modulefiles/Core

module load stack-gcc/12.4.0
module load stack-cray-mpich/8.1.29
module load stack-python/3.11.7
# module load jedi-mpas-env is commented out because it loads many modules not needed for
# building and running mpas-bundle on derecho.
# To load all of the modules which were loaded prior to 01/15/2026,
# uncomment out "module load jedi-mpas-env"
# module load jedi-mpas-env
module load py-pycodestyle/2.11.0
module load atlas/0.40.0
module load ecbuild/3.7.2
module load netcdf-cxx4/4.3.1
module load parallelio/2.6.2
module load gsl-lite/0.37.0
module load nccmp/1.9.0.1
module load udunits/2.2.28
# Following modules are required for ioda-converters build
module load bufr/12.1.0
module load py-pybind11/2.13.5
module list

ulimit -s unlimited
export F_UFMTENDIAN='big_endian:101-200'
export GFORTRAN_CONVERT_UNIT='big_endian:101-200'
export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH

26 changes: 19 additions & 7 deletions env-setup/intel-derecho.csh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,29 @@ endif
#

module purge
module use /lustre/desc1/scratch/epicufsrt/contrib/modulefiles
module use /lustre/desc1/scratch/epicufsrt/contrib/modulefiles_extra
module load ncarenv/24.12
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles
module load ecflow/5.8.4
module load mysql/8.0.33

module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install/modulefiles/Core

module load stack-intel/2021.10.0
module load stack-cray-mpich/8.1.25
module load stack-python/3.10.13
module load jedi-mpas-env
module load stack-oneapi/2024.2.1
module load stack-cray-mpich/8.1.29
module load stack-python/3.11.7
# module load jedi-mpas-env is commented out because it loads many modules not needed for
# building and running mpas-bundle on derecho.
# To load all of the modules which were loaded prior to 01/15/2026,
# uncomment out "module load jedi-mpas-env"
#module load jedi-mpas-env
module load py-pycodestyle/2.11.0
module load atlas/0.40.0
module load ecbuild/3.7.2
module load netcdf-cxx4/4.3.1
module load parallelio/2.6.2
module load gsl-lite/0.37.0
module load nccmp/1.9.0.1
module load udunits/2.2.28
module list

limit stacksize unlimited
Expand Down
26 changes: 19 additions & 7 deletions env-setup/intel-derecho.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,29 @@ if command -v conda >/dev/null 2>&1; then
fi

module purge
module use /lustre/desc1/scratch/epicufsrt/contrib/modulefiles
module use /lustre/desc1/scratch/epicufsrt/contrib/modulefiles_extra
module load ncarenv/24.12
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/modulefiles
module load ecflow/5.8.4
module load mysql/8.0.33

module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core
module use /glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.9.3/envs/ue-oneapi-2024.2.1/install/modulefiles/Core

module load stack-intel/2021.10.0
module load stack-cray-mpich/8.1.25
module load stack-python/3.10.13
module load jedi-mpas-env
module load stack-oneapi/2024.2.1
module load stack-cray-mpich/8.1.29
module load stack-python/3.11.7
# module load jedi-mpas-env is commented out because it loads many modules not needed for
# building and running mpas-bundle on derecho.
# To load all of the modules which were loaded prior to 01/15/2026,
# uncomment out "module load jedi-mpas-env"
#module load jedi-mpas-env
module load py-pycodestyle/2.11.0
module load atlas/0.40.0
module load ecbuild/3.7.2
module load netcdf-cxx4/4.3.1
module load parallelio/2.6.2
module load gsl-lite/0.37.0
module load nccmp/1.9.0.1
module load udunits/2.2.28
module list

ulimit -s unlimited
Expand Down
Loading