Skip to content

Commit

Permalink
Use nccmp for netcdf comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
jahn committed May 23, 2024
1 parent 6db5ed6 commit 5b39ca6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ jobs:
run: |
sudo apt-get update
sudo apt-get -qq install netcdf-bin
- name: Install nccmp
run: |
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3.sh -b -p "${HOME}/conda"
source "${HOME}/conda/etc/profile.d/conda.sh"
conda activate
conda install nccmp
- name: Run Tox
run: tox -e ${{ matrix.env }}
working-directory: utils/python/MITgcmutils
Expand Down
4 changes: 2 additions & 2 deletions utils/python/MITgcmutils/tests/run-scripts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ for f in \
echo "Metadata doesn't match reference: $f"
err=1
fi
if ! diff tests/md5/$f.md5 $o.md5; then
echo "Checksum doesn't match reference: $f"
if ! nccmp -d -m tests/data/gluemncbig/$f.nc $o.nc; then
echo "Data doesn't match reference: $f"
err=1
else
rm $o.cdl $o.md5 $o.nc
Expand Down

0 comments on commit 5b39ca6

Please sign in to comment.