add parameters for case 2 (coastal) waters #171
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cobalt CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "dev/cefi" branch | |
push: | |
branches: [ "dev/cefi" ] | |
pull_request: | |
branches: [ "dev/cefi" ] | |
env: | |
BRANCH_NAME: stable/weekly_release | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# define container | |
#container: | |
# image: clouden90/1d_mom6_cobalt:base | |
# options: --user root | |
container: | |
image: quay.io/singularity/singularity:v4.1.0 | |
options: --privileged | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: jitterbit/get-changed-files@v1 | |
id: abc | |
with: | |
format: space-delimited | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# git clone CEFI-regional-MOM6 and replace ocean_BGC | |
- name: git clone CEFI-regional-MOM6 | |
run: | | |
which singularity | |
cd .. | |
git clone -b $BRANCH_NAME https://github.com/NOAA-GFDL/CEFI-regional-MOM6.git --recursive | |
rm -rf CEFI-regional-MOM6/src/ocean_BGC | |
cp -r ocean_BGC CEFI-regional-MOM6/src | |
cd CEFI-regional-MOM6/src/ocean_BGC && git branch | |
- name: Download model input dataset | |
working-directory: ../CEFI-regional-MOM6/exps | |
run: | | |
echo "Download dataset..." | |
wget -q ftp://ftp.gfdl.noaa.gov/pub/Yi-cheng.Teng/1d_ci_datasets.tar.gz && tar -zxvf 1d_ci_datasets.tar.gz && rm -rf 1d_ci_datasets.tar.gz | |
ls -l -h | |
- name: Build 1D mom6sis2-cobalt Image | |
working-directory: ../CEFI-regional-MOM6/ci/singularity | |
run: | | |
echo "image build ..." | |
singularity build 1d_mom6_cobalt.sif ./build_1d_mom6_cobalt.def | |
- name: Build mom6sis2-cobalt | |
working-directory: ../CEFI-regional-MOM6/builds | |
run: | | |
echo "build mom6sis2..." | |
singularity exec --bind /__w:/__w ../ci/singularity/1d_mom6_cobalt.sif bash linux-build.bash -m docker -p linux-gnu -t debug -f mom6sis2 | |
ls -l -h build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 | |
- name: Run 1D toy case | |
working-directory: ../CEFI-regional-MOM6/exps/OM4.single_column.COBALT | |
run: | | |
echo "Start 1D toy case ..." | |
pwd | |
ln -fs ./input.nml_48hr ./input.nml | |
singularity exec --bind /__w:/__w ../../ci/singularity/1d_mom6_cobalt.sif ./driver.sh | |
#singularity exec --bind /__w:/__w ../../ci/singularity/1d_mom6_cobalt.sif ../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 | |
cat ./RESTART_48hrs/ocean.stats | |
- name: Check with ref | |
working-directory: ../CEFI-regional-MOM6/exps/OM4.single_column.COBALT | |
run: | | |
echo "new 48 hrs ocean.stats: " | |
cat ./RESTART_48hrs/ocean.stats | |
echo "baseline 48 hrs ocean.stats: " | |
cat ../../src/ocean_BGC/.github/ref/OM4.single_column.COBALT.p4/docker-linux-gnu/ocean.stats | |
# | |
diff -q ./RESTART_48hrs/ocean.stats ../../src/ocean_BGC/.github/ref/OM4.single_column.COBALT.p4/docker-linux-gnu/ocean.stats > /dev/null || { echo "Error: ocean.stats are different."; echo "Plz update ocean_BGC/.github/ref/OM4.single_column.COBALT.p4/docker-linux-gnu/ocean.stats with the following: "; cat ./RESTART_48hrs/ocean.stats; exit 1; } |