Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 3.7 KB

README.md

File metadata and controls

83 lines (59 loc) · 3.7 KB

Interface between JEDI and PyIRI

Description

Interface between JEDI and PyIRI

Installation

pyiri-jedi has a few external dependencies and requires oops from the JEDI code. While pyiri-jedi can be installed standalone, the following instructions assumed that spack-stack is installed on the system.

Required modules

Follow the instructions in https://spack-stack.readthedocs.io/en/1.7.0/PreConfiguredSites.html#officially-supported-spack-stack-1-7-0-installations-tier-1 to load the basic spack-stack modules for your system, or the instructions in https://spack-stack.readthedocs.io/en/1.7.0/NewSiteConfigs.html to install spack-stack on a Linux or macOS system. It is sufficient to install only the packages required by jedi-neptune-env, although most users will have/want the unified environment or skylab environment.

After loading the stack compiler, MPI and Python meta-modules, proceed with loading either jedi-neptune-env or all of the following packages:

module load ecbuild
module load atlas
module load netcdf-fortran
module load py-netcdf4
module load py-numpy
module load py-pyyaml
module load py-cftime
module load py-certifi

Bundle configuration

Below is an example of a minimal bundle for pyiri-jedi. For JEDI users, it is recommended to use jedi-bundle, remove or comment out all JEDI repositories except oops, ioda, and ufo, and use the correct versions of these repos.

cmake_minimum_required( VERSION 3.12 FATAL_ERROR )

# Create project
project( pyiri-jedi-bundle VERSION 0.1.0 LANGUAGES C CXX Fortran )

find_package( ecbuild 3.6 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)

# Include ecbuild_bundle macro
include( ecbuild_bundle )

set( ECBUILD_DEFAULT_BUILD_TYPE Release )

# Enable MPI
set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )

# Initialize bundle
# -----------------
ecbuild_bundle_initialize()

# Core JEDI repositories
ecbuild_bundle( PROJECT oops  GIT "https://github.com/jcsda/oops.git"  BRANCH develop )

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-internal/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-internal/ufo.git"         BRANCH develop UPDATE )

ecbuild_bundle( PROJECT pyiri-jedi  GIT "https://github.com/jcsda-internal/pyiri-jedi"  BRANCH develop UPDATE RECURSIVE )

Building

Run the following commands in the bundle directory:

mkdir build
cd build
cmake ..
make

It may be possible to shorten the build time somewhat by replacing the last line with:

make -j8 pyirijedi_LETKF pyiri_test_ensemble

This will produce an executable, pyirijedi_LETKF and an ensemble of test data generated using PyIRI, located in pyiri-jedi/test/testinput/members.

Running

The build creates an executable pyirijedi_LETKF which runs an ETKF solver on an ensemble of PyIRI states. The test of this executable can be run with ctest -R pyirijedi. This will generate analysis states which will be written to pyiri-jedi/test/testinput/analysis. The test also executes a Python script that checks the analysis states for correctness.

To run pyirijedi_LETKF on other input, copy pyiri-jedi/test/testinput/letkf.yaml and modify it as needed. pyirijed_LETKF can be run with the modified YAML file using bin/pyrijedi_LETKF modified-letkf.yaml.