Skip to content

Add ability to obtain multi level input from ocn and map and pass it back to cism #880

Add ability to obtain multi level input from ocn and map and pass it back to cism

Add ability to obtain multi level input from ocn and map and pass it back to cism #880

Workflow file for this run

# This is a workflow to compile the cmeps source without cime
name: extbuild
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-cmeps:
runs-on: ubuntu-latest
env:
CC: mpicc
FC: mpifort
CXX: mpicxx
CPPFLAGS: "-I/usr/include -I/usr/local/include"
# Versions of all dependencies can be updated here
ESMF_VERSION: v8.6.1
PNETCDF_VERSION: checkpoint.1.12.3
NETCDF_FORTRAN_VERSION: v4.6.1
PIO_VERSION: pio2_6_2
CDEPS_VERSION: cdeps1.0.35
steps:
- uses: actions/checkout@v4
# Build the ESMF library, if the cache contains a previous build
# it will be used instead
- id: load-env
run: |
sudo apt-get update
sudo apt-get update
sudo apt-get install gfortran
sudo apt-get install wget
sudo apt-get install openmpi-bin libopenmpi-dev
sudo apt-get install netcdf-bin libnetcdf-dev libnetcdff-dev
sudo apt-get install pnetcdf-bin libpnetcdf-dev
sudo apt-get install autotools-dev autoconf
- id: cache-esmf
uses: actions/cache@v4
with:
path: ~/ESMF
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF
- name: Cache ParallelIO
id: cache-ParallelIO
uses: actions/cache@v4
with:
path: ~/pio
key: ${{ runner.os }}-${{ env.PIO_VERSION }}.pio
- name: Build ParallelIO
if: steps.cache-ParallelIO.outputs.cache-hit != 'true'
uses: NCAR/ParallelIO/.github/actions/parallelio_cmake@pio2_6_0
with:
parallelio_version: ${{ env.ParallelIO_VERSION }}
enable_fortran: True
install_prefix: $HOME/pio
- name: Build ESMF
if: steps.cache-esmf.outputs.cache-hit != 'true'
uses: ESCOMP/CDEPS/.github/actions/[email protected]
with:
esmf_version: ${{ env.ESMF_VERSION }}
esmf_bopt: g
esmf_comm: openmpi
install_prefix: $HOME/ESMF
netcdf_c_path: /usr
netcdf_fortran_path: /usr
pnetcdf_path: /usr
parallelio_path: $HOME/pio
- name: Cache CDEPS
id: cache-cdeps
uses: actions/cache@v4
with:
path: $HOME/cdeps
key: ${{ runner.os }}-${{ env.CDEPS_VERSION }}.cdeps
- name: checkout CDEPS
uses: actions/checkout@v4
with:
repository: ESCOMP/CDEPS
path: cdeps-src
ref: ${{ env.CDEPS_VERSION }}
- name: Build CDEPS
if: steps.cache-cdeps.outputs.cache-hit != 'true'
uses: ESCOMP/CDEPS/.github/actions/[email protected]
with:
esmfmkfile: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
pio_path: $HOME/pio
src_root: ${GITHUB_WORKSPACE}/cdeps-src
cmake_flags: " -Wno-dev -DDISABLE_FoX=ON -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
-ffree-form -ffree-line-length-none -fallow-argument-mismatch \""
- name: Build CMEPS
run: |
export PIO=$HOME/pio
mkdir build-cmeps
pushd build-cmeps
cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-g -Wall -Werror -ffree-form -ffree-line-length-none -Wno-unused-dummy-argument -I /home/runner/work/CMEPS/CMEPS/build-cdeps/share" ../
make VERBOSE=1
popd
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3