Skip to content

Commit

Permalink
update reference and add more checks in ci (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengt900 authored Jan 10, 2024
1 parent 601eb9b commit 3db75ef
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Step, Day, Truncs, Energy/Mass, Maximum CFL, Mean Sea Level, Total Mass, Mean Salin, Mean Temp, Frac Mass Err, Salin Err, Temp Err
[days] [m2 s-2] [Nondim] [m] [kg] [PSU] [degC] [Nondim] [PSU] [degC]
0, 731595.000, 0, En 4.0531850015098383E-27, CFL 0.00000, SL -0.0000E+00, M 6.97073E+15, S 35.2427, T 6.2462, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00
18, 731595.250, 0, En 2.3854654580464527E-06, CFL 0.00372, SL -3.6569E-06, M 6.97073E+15, S 35.2427, T 6.2460, Me -9.14E-10, Se -2.87E-07, Te -2.53E-06
36, 731595.500, 0, En 4.7618800034270000E-06, CFL 0.00348, SL -6.7408E-06, M 6.97073E+15, S 35.2427, T 6.2457, Me -7.71E-10, Se -7.18E-07, Te -7.00E-06
54, 731595.750, 0, En 1.1464049165959475E-05, CFL 0.00749, SL -9.5684E-06, M 6.97073E+15, S 35.2427, T 6.2459, Me -7.07E-10, Se -9.88E-07, Te -1.03E-05
72, 731596.000, 0, En 2.3222960705556885E-05, CFL 0.00881, SL -1.4119E-05, M 6.97073E+15, S 35.2427, T 6.2457, Me -1.14E-09, Se -1.40E-06, Te -1.41E-05
90, 731596.250, 0, En 2.9040534962143268E-05, CFL 0.00771, SL -1.8938E-05, M 6.97073E+15, S 35.2427, T 6.2454, Me -1.20E-09, Se -1.96E-06, Te -1.97E-05
108, 731596.500, 0, En 3.6391342252032763E-05, CFL 0.00790, SL -2.3731E-05, M 6.97073E+15, S 35.2427, T 6.2451, Me -1.20E-09, Se -2.38E-06, Te -2.44E-05
126, 731596.750, 0, En 4.2200585475070879E-05, CFL 0.00923, SL -2.8306E-05, M 6.97073E+15, S 35.2427, T 6.2453, Me -1.14E-09, Se -2.80E-06, Te -2.88E-05
144, 731597.000, 0, En 4.6813518525667337E-05, CFL 0.00922, SL -3.1872E-05, M 6.97073E+15, S 35.2427, T 6.2453, Me -8.91E-10, Se -3.11E-06, Te -3.18E-05
18, 731595.250, 0, En 2.3854654580467034E-06, CFL 0.00372, SL -3.6569E-06, M 6.97073E+15, S 35.2427, T 6.2460, Me -9.14E-10, Se -2.87E-07, Te -2.53E-06
36, 731595.500, 0, En 4.7618800034266154E-06, CFL 0.00348, SL -6.7408E-06, M 6.97073E+15, S 35.2427, T 6.2457, Me -7.71E-10, Se -7.18E-07, Te -7.00E-06
54, 731595.750, 0, En 1.1464049165958304E-05, CFL 0.00749, SL -9.5684E-06, M 6.97073E+15, S 35.2427, T 6.2459, Me -7.07E-10, Se -9.88E-07, Te -1.03E-05
72, 731596.000, 0, En 2.3222960705551457E-05, CFL 0.00881, SL -1.4119E-05, M 6.97073E+15, S 35.2427, T 6.2457, Me -1.14E-09, Se -1.40E-06, Te -1.41E-05
90, 731596.250, 0, En 2.9040534962135079E-05, CFL 0.00771, SL -1.8938E-05, M 6.97073E+15, S 35.2427, T 6.2454, Me -1.20E-09, Se -1.96E-06, Te -1.97E-05
108, 731596.500, 0, En 3.6391342252030682E-05, CFL 0.00790, SL -2.3731E-05, M 6.97073E+15, S 35.2427, T 6.2451, Me -1.20E-09, Se -2.38E-06, Te -2.44E-05
126, 731596.750, 0, En 4.2200585475042033E-05, CFL 0.00923, SL -2.8306E-05, M 6.97073E+15, S 35.2427, T 6.2453, Me -1.14E-09, Se -2.80E-06, Te -2.88E-05
144, 731597.000, 0, En 4.6813518525641126E-05, CFL 0.00922, SL -3.1872E-05, M 6.97073E+15, S 35.2427, T 6.2453, Me -8.91E-10, Se -3.11E-06, Te -3.18E-05
Binary file not shown.
23 changes: 22 additions & 1 deletion .github/workflows/cobalt_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,30 @@ jobs:
cd ../MOM6_OBGC_examples/exps/OM4.single_column.COBALT.p4
mkdir -p ref
cp ../../src/ocean_BGC/.github/ref/OM4.single_column.COBALT.p4/docker-linux-gnu/* ./ref
# check ocean.stats
# check ocean.stats
echo "Check with ref ocean.stats"
diff -q ref/ocean.stats ./ocean.stats > /dev/null || { echo "Error: ocean.stats are different, check and update ref! Exiting now..."; exit 1; }
# check MOM.res.nc
echo "check with ref MOM.res.nc"
ncdump ref/MOM.res.nc > org_ref.txt
ncdump RESTART/MOM.res.nc > new_ref.txt
diff -q ./org_ref.txt ./new_ref.txt > /dev/null || { echo "Error: MOM.res.nc are different, check and update ref! Exiting now..."; exit 1; }
rm org_ref.txt && rm new_ref.txt
# check with ref ocean_cobalt_airsea_flux.res.nc
echo "check with ref ocean_cobalt_airsea_flux.res.nc"
ncdump ref/ocean_cobalt_airsea_flux.res.nc > org_ref.txt
ncdump RESTART/ocean_cobalt_airsea_flux.res.nc > new_ref.txt
diff -q ./org_ref.txt ./new_ref.txt > /dev/null || { echo "Error: ocean_cobalt_airsea_flux.res.nc are different, check and update ref! Exiting now..."; exit 1; }
rm org_ref.txt && rm new_ref.txt
# check with ref ice_cobalt.res.nc
echo "check with ref ice_cobalt.res.nc"
ncdump ref/ice_cobalt.res.nc > org_ref.txt
ncdump RESTART/ice_cobalt.res.nc > new_ref.txt
diff -q ./org_ref.txt ./new_ref.txt > /dev/null || { echo "Error: ice_cobalt.res.nc are different, check and update ref! Exiting now..."; exit 1; }
rm org_ref.txt && rm new_ref.txt
# check with ref ice_model.res.nc
echo "check with ref ice_model.res.nc"
ncdump ref/ice_model.res.nc > org_ref.txt
ncdump RESTART/ice_model.res.nc > new_ref.txt
diff -q ./org_ref.txt ./new_ref.txt > /dev/null || { echo "Error: ice_model.res.nc are different, check and update ref! Exiting now..."; exit 1; }
rm org_ref.txt && rm new_ref.txt

0 comments on commit 3db75ef

Please sign in to comment.