Skip to content

Merge pull request #36 from microhh/rt_fix #89

Merge pull request #36 from microhh/rt_fix

Merge pull request #36 from microhh/rt_fix #89

name: Continuous Integration
on: [push, pull_request]
jobs:
CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
cxx-compiler: [gcc]
env:
CC: ${{ matrix.cxx-compiler }}
CXX: ${{ matrix.cxx-compiler }}
RRTMGP_ROOT: ${{ github.workspace }}
RRTMGP_DATA: ${{ github.workspace }}/rrtmgp-data
steps:
#
# Checks-out repository under $GITHUB_WORKSPACE
#
- uses: actions/checkout@v3
with:
submodules: recursive
#
# Synchronize the package index
#
- name: Synchronize the package index
run: sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y gfortran libnetcdf-dev cmake libboost-dev python3-pip python3-setuptools nco
sudo apt-get install ${{ matrix.cxx-compiler }}
pip3 install --user numpy netcdf4 dask[array] xarray
- name: Build
run: |
mkdir build
cd build
cmake -DSYST=ubuntu_22lts ..
make
- name: Run tests
run: |
cd rfmip
./make_links.sh
ln -sf ../build/test_rte_rrtmgp .
python3 rfmip_init.py
python3 rfmip_run.py
cd ../allsky
./make_links.sh
ln -sf ../build/test_rte_rrtmgp .
python3 allsky_init.py
python3 allsky_run.py
- name: Check results
run: |
cd rfmip
python3 compare-to-reference.py --ref_dir ../rrtmgp-data/examples/rfmip-clear-sky/reference --tst_dir . --var rld rlu rsd rsu --file r??_Efx_RTE-RRTMGP-181204_rad-irf_r1i1p1f1_gn.nc --failure_threshold=5.8e-2
cd ../allsky
python3 allsky_check.py --failure_threshold=5.8e-2