diff --git a/.github/workflows/mom6_cobalt_1D.yaml b/.github/workflows/mom6_cobalt_1D.yaml index 2455d33cf..b23a9fba3 100644 --- a/.github/workflows/mom6_cobalt_1D.yaml +++ b/.github/workflows/mom6_cobalt_1D.yaml @@ -24,26 +24,25 @@ jobs: submodules: recursive - name: Build mom6-sis2-cobalt + working-directory: ./builds run: | apt update; apt install -y wget echo "build mom6-sis2-cobalt ..." - cd ./builds ./linux-build.bash -m docker -p linux-gnu -t debug -f mom6sis2 - name: Download 1d model dataset + working-directory: ./exps run: | - cd ./exps wget -q ftp.gfdl.noaa.gov:/pub/Yi-cheng.Teng/1d_datasets.tar.gz && tar -zxvf 1d_datasets.tar.gz && rm -rf 1d_datasets.tar.gz - name: Run 1D toy case and check repro across restarts + working-directory: ./exps/OM4.single_column.COBALT run: | - cd exps/OM4.single_column.COBALT - #mpirun --allow-run-as-root -np 1 ../../builds/build/docker-linux-gnu/ocean_ice/prod/MOM6SIS2 ./driver.sh - name: Check ref + working-directory: ./exps/OM4.single_column.COBALT run: | - cd exps/OM4.single_column.COBALT echo "new 48hrs ocean.stats: " cat ./RESTART_48hrs/ocean.stats echo "baseline 48 hrs ocean.stats: " diff --git a/exps/OM4.single_column.COBALT/INPUT/MOM_IC.nc b/exps/OM4.single_column.COBALT/INPUT/MOM_IC.nc new file mode 120000 index 000000000..3d77c0ca3 --- /dev/null +++ b/exps/OM4.single_column.COBALT/INPUT/MOM_IC.nc @@ -0,0 +1 @@ +../../datasets/OceanBGC_dataset/MOM_IC.nc \ No newline at end of file diff --git a/exps/OM4.single_column.COBALT/MOM_override b/exps/OM4.single_column.COBALT/MOM_override index 1db9fbc5c..f81e1209a 100644 --- a/exps/OM4.single_column.COBALT/MOM_override +++ b/exps/OM4.single_column.COBALT/MOM_override @@ -3,9 +3,16 @@ #override REENTRANT_X = True #override ALE_COORDINATE_CONFIG = "FNC1:2,6500,6,.01" #override REGRIDDING_COORDINATE_MODE = "Z*" +#override REGRIDDING_COORDINATE_MODE = "Z*" #override Z_INIT_REMAPPING_SCHEME = "PPM_IH4" #override Z_INIT_REMAP_OLD_ALG = True -!#override TRACERS_MAY_REINIT = True +#override TRACERS_MAY_REINIT = True +#override INIT_LAYERS_FROM_Z_FILE = False +#override TS_CONFIG = file +#override TS_FILE = "MOM_IC.nc" +#override SALT_FILE= "MOM_IC.nc" +#override TEMP_IC_VAR = "Temp" +#override SALT_IC_VAR = "Salt" ! #override KD = 5.e-4 #override RESOLN_SCALED_KH = False @@ -28,4 +35,5 @@ #override PEN_SW_NBANDS = 3 #override CHL_FROM_FILE = False #override DO_GEOTHERMAL = True -#override GEOTHERMAL_SCALE = 0.0 +#override GEOTHERMAL_SCALE = 0.0 +#override GENERIC_TRACER_IC_FILE = "MOM_IC.nc" diff --git a/exps/OM4.single_column.COBALT/driver.sh b/exps/OM4.single_column.COBALT/driver.sh index fca6e4071..d7212681b 100755 --- a/exps/OM4.single_column.COBALT/driver.sh +++ b/exps/OM4.single_column.COBALT/driver.sh @@ -9,14 +9,14 @@ echo "Test started: " `date` # echo "run 48hrs test ..." ln -fs input.nml_48hr input.nml -../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out1 2>err1 +mpirun --allow-run-as-root -np 1 ../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out1 2>err1 mv RESTART RESTART_48hrs mv ocean.stats* RESTART_48hrs # echo "run 24hrs test ..." ln -fs input.nml_24hr input.nml -../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out2 2>err2 +mpirun --allow-run-as-root -np 1 ../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out2 2>err2 mv RESTART RESTART_24hrs mv ocean.stats* RESTART_24hrs @@ -29,7 +29,7 @@ popd # echo "run 24hrs rst test ..." ln -fs input.nml_24hr_rst input.nml -../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out3 2>err3 +mpirun --allow-run-as-root -np 1 ../../builds/build/docker-linux-gnu/ocean_ice/debug/MOM6SIS2 > out3 2>err3 mv RESTART RESTART_24hrs_rst mv ocean.stats* RESTART_24hrs_rst @@ -43,19 +43,19 @@ if [ ! -d "$DIR1" ] || [ ! -d "$DIR2" ]; then fi # Define the files to compare -#FILES=("MOM.res.nc" "ice_cobalt.res.nc" "ice_model.res.nc" "ocean_cobalt_airsea_flux.res.nc") +FILES=("MOM.res.nc" "ice_cobalt.res.nc" "ice_model.res.nc" "ocean_cobalt_airsea_flux.res.nc") # Iterate over the files -#for FILE in "${FILES[@]}"; do -# # Compare the files using nccmp -# echo "Compare ${FILE}" -# rm -rf org.txt -# rm -rf ref.txt -# ncdump ${DIR1}/${FILE} > org.txt -# ncdump ${DIR2}/${FILE} > ref.txt -# diff -q ./org.txt ./ref.txt > /dev/null || { echo "Error: ${FILE} is not identical, please check! Exiting now..."; exit 1; } -#done +for FILE in "${FILES[@]}"; do + # Compare the files using nccmp + echo "Compare ${FILE}" + rm -rf org.txt + rm -rf ref.txt + ncdump ${DIR1}/${FILE} > org.txt + ncdump ${DIR2}/${FILE} > ref.txt + diff -q ./org.txt ./ref.txt > /dev/null || { echo "Error: ${FILE} is not identical, please check! Exiting now..."; exit 1; } +done # -#echo "All restart files are identical, PASS" +echo "All restart files are identical, PASS" echo "Test ended: " `date` diff --git a/exps/OM4.single_column.COBALT/field_table b/exps/OM4.single_column.COBALT/field_table index 25c89f52a..019efcee0 100644 --- a/exps/OM4.single_column.COBALT/field_table +++ b/exps/OM4.single_column.COBALT/field_table @@ -24,7 +24,7 @@ # "units", "kg/kg" / ###................................................. "namelists","ocean_mod","generic_COBALT" -enforce_src_info = t +enforce_src_info = f # no3_src_file = INPUT/bgc_woa_esper_ics_1993_2023-04_BATS.nc no3_src_var_name = no3 diff --git a/exps/OM4.single_column.COBALT/ref/ocean.stats b/exps/OM4.single_column.COBALT/ref/ocean.stats index 782e05c4e..0b95c34d2 100644 --- a/exps/OM4.single_column.COBALT/ref/ocean.stats +++ b/exps/OM4.single_column.COBALT/ref/ocean.stats @@ -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 - 6, 731595.250, 0, En 1.9430699000185468E-06, CFL 0.00273, SL -1.0976E-03, M 6.97073E+15, S 35.2427, T 6.2460, Me -8.57E-10, Se -2.86E-07, Te -2.66E-06 - 12, 731595.500, 0, En 4.1702635092128206E-06, CFL 0.00285, SL -2.1342E-03, M 6.97073E+15, S 35.2427, T 6.2457, Me -7.46E-10, Se -6.81E-07, Te -6.81E-06 - 18, 731595.750, 0, En 1.1474414851572739E-05, CFL 0.00752, SL -3.2693E-03, M 6.97073E+15, S 35.2427, T 6.2459, Me -7.01E-10, Se -9.90E-07, Te -1.00E-05 - 24, 731596.000, 0, En 2.2889537195880983E-05, CFL 0.00823, SL -4.4872E-03, M 6.97072E+15, S 35.2427, T 6.2457, Me -1.14E-09, Se -1.40E-06, Te -1.42E-05 - 30, 731596.250, 0, En 2.8029594580345227E-05, CFL 0.00694, SL -5.5226E-03, M 6.97072E+15, S 35.2428, T 6.2454, Me -1.17E-09, Se -1.93E-06, Te -1.96E-05 - 36, 731596.500, 0, En 3.5426508192363729E-05, CFL 0.00718, SL -6.4927E-03, M 6.97072E+15, S 35.2428, T 6.2451, Me -1.19E-09, Se -2.38E-06, Te -2.42E-05 - 42, 731596.750, 0, En 4.0790161815603025E-05, CFL 0.00761, SL -7.1803E-03, M 6.97072E+15, S 35.2428, T 6.2453, Me -1.11E-09, Se -2.80E-06, Te -2.86E-05 - 48, 731597.000, 0, En 4.6113879916334494E-05, CFL 0.00890, SL -7.7386E-03, M 6.97072E+15, S 35.2428, T 6.2453, Me -8.74E-10, Se -3.06E-06, Te -3.14E-05 + 0, 731595.000, 0, En 4.0531850015098391E-27, CFL 0.00000, SL -0.0000E+00, M 6.97073E+15, S 36.6039, T 20.1934, Me 0.00E+00, Se 0.00E+00, Te 0.00E+00 + 6, 731595.250, 0, En 8.1378403741497590E-07, CFL 0.00201, SL -1.1025E-03, M 6.97073E+15, S 36.6039, T 20.1931, Me -8.61E-10, Se -3.47E-08, Te -9.00E-08 + 12, 731595.500, 0, En 1.0965166953916849E-06, CFL 0.00195, SL -2.1512E-03, M 6.97073E+15, S 36.6039, T 20.1929, Me -7.51E-10, Se -3.52E-08, Te -2.01E-07 + 18, 731595.750, 0, En 4.8253111198979680E-06, CFL 0.00590, SL -3.3036E-03, M 6.97073E+15, S 36.6039, T 20.1931, Me -7.07E-10, Se -3.67E-08, Te -2.91E-07 + 24, 731596.000, 0, En 7.9419977210872199E-06, CFL 0.00601, SL -4.5424E-03, M 6.97072E+15, S 36.6039, T 20.1929, Me -1.15E-09, Se -5.79E-08, Te -4.14E-07 + 30, 731596.250, 0, En 5.8922068996536806E-06, CFL 0.00396, SL -5.6012E-03, M 6.97072E+15, S 36.6039, T 20.1926, Me -1.19E-09, Se -6.41E-08, Te -5.57E-07 + 36, 731596.500, 0, En 6.2438296335804349E-06, CFL 0.00379, SL -6.5992E-03, M 6.97072E+15, S 36.6039, T 20.1924, Me -1.21E-09, Se -6.86E-08, Te -6.80E-07 + 42, 731596.750, 0, En 7.5986995355453777E-06, CFL 0.00438, SL -7.3112E-03, M 6.97072E+15, S 36.6039, T 20.1926, Me -1.13E-09, Se -6.98E-08, Te -8.03E-07 + 48, 731597.000, 0, En 9.7326940294133761E-06, CFL 0.00527, SL -7.8910E-03, M 6.97072E+15, S 36.6039, T 20.1926, Me -8.89E-10, Se -6.41E-08, Te -8.82E-07