This section describes how to configure and compile SOCA inside of a Singularity container. ecbuild
(a wrapper of cmake
) is used for the configuration of the build and ctest
to confirm that the compiled code is working properly. Usage of cmake
and ctest
are described in the JEDI CMake, CTest, and ecbuild </inside/developer_tools/cmake>
documentation.
While SOCA can be complied on various architectures (HPC, workstations, ...), this section only describes how to compile SOCA inside of a Singularity container. Instruction on how to install and run Singularity is provided in the JEDI development Singularity container.
Download and run a shell inside of a Singularity container:
singularity pull library://jcsda/public/jedi-gnu-openmpi-dev # download the development container
singularity shell -e jedi-gnu-openmpi-dev_latest.sif # run a shell within a singularity container
Clone the 1.0.0 tag of the SOCA repository
git clone --branch 1.0.0 https://github.com/jcsda/soca.git
This will create a SOCA directory that contains the MOM6 interface to JEDI as well as the necessary dependencies provided as an ecbuild
bundle in soca/bundle/CMakeLists.txt
mkdir build
cd build
ecbuild ../soca/bundle # configure the build
make -j<nthreads> # compile
ctest # test all JEDI components including `soca`
To enable the use of the Community Radiative Transfer Model (CRTM) set the build option BUILD_CRTM
for the ecbuild
step above:
ecbuild -DBUILD_CRTM=ON ../soca/bundle
To enable the use of the biogeochemistry model BLING set the build option ENABLE_OCEAN_BGC` for the
ecbuildstep above: .. code-block:: bash ecbuild -DENABLE_OCEAN_BGC=ON ../soca/bundle Built executables ----------------- After completing the SOCA build, users have access to executables under
build/bin`, many of which are generated when building the projects on which SOCA is dependent ( :doc:`OOPS </inside/jedi-components/oops/index>, UFO </inside/jedi-components/ufo/index>
, SABER </inside/jedi-components/saber/index>
).
Most of these executables are model-specific implementations of generic applications that are derived from the oops::Application
class, i.e., oops/src/oops/runs/Application.h
. Descriptions of the generic applications are located under the OOPS Applications </inside/jedi-components/oops/applications/index>
documentation. Here we give short synopses of a few specific SOCA implementations.
Generic Applications
soca_convertstate.x
(oops::ConvertState
)soca_dirac.x
(oops::Dirac
)soca_forecast.x
(oops::Forecast
): similar to themom6.x
executable, but through the JEDI generic framework via the SOCA interface.soca_enspert.x
(oops::GenEnsPertB <../oops/applications/genenspertb>
)soca_ensrecenter.x
(oops::EnsRecenter
)soca_ensvariance
(oops::EnsVariance
)soca_hofx.x
(oops::HofX4D
)soca_hofx3d.x
(oops::HofX3D
)soca_parameters.x
(saber::EstimateParams
): used to estimate static background error covariance and localization matricessoca_staticbinit.x
(oops::StaticBInit
): used to initialize the covariance modelsoca_var.x
(oops::Variational
): carries out many different flavors of variational data assimilation (3DVar, 3DEnVar, 3DFGAT, 4DEnVar) with a variety of incremental minimization algorithmssoca_letkf.x
(oops::LocalEnsembleDA
)soca_hybridgain.x
(oops::HybridGain
)soca_enshofx.x
(oops::EnsembleApplication<oops::HofX4D>
)
SOCA specific Applications
soca_checkpoint_model.x
(soca::CheckpointModel
)soca_gridgen.x
(soca::GridGen
)
Most of the SOCA executables are exercised in ctests. As users learn how to use SOCA for larger-scale applications, it is useful to consider the ctests as examples and templates.