diff --git a/.github/workflows/containerized-ci.yml b/.github/workflows/containerized-ci.yml index 761ef7a663..bac527054c 100644 --- a/.github/workflows/containerized-ci.yml +++ b/.github/workflows/containerized-ci.yml @@ -12,20 +12,23 @@ jobs: # Flags and KGOs for Intel Fortran Compiler Classic - compiler: ifort fcflags: -m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1eyRCT9e7j7SKsKhbfJBuwBoN5DlsrW7L - gdkgo2: https://docs.google.com/uc?export=download&id=1uTffyCdWLPvRHDkVtZZiBfc3spbk4_Tf + gdkgo1: https://docs.google.com/uc?export=download&id=1dva4lq4ZXciTiuOvGgA8OUJKihbGQ90K + gdkgo2: https://docs.google.com/uc?export=download&id=1ns0OtWU5jVnu1IEBfBN-tlTkq2PTrcvC # Flags and KGOs for Intel Fortran Compiler - compiler: ifx fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 - gdkgo1: https://docs.google.com/uc?export=download&id=1VrPkQmDpt6otch-tsaka-62tiMDuJNz_ - gdkgo2: https://docs.google.com/uc?export=download&id=1m6JdHlSAMmK8zT-X3pfxSORPJURiITkQ + gdkgo1: https://docs.google.com/uc?export=download&id=1WzFsoqi0EZfsyyh203QXmUQTIh5tBm9b + gdkgo2: https://docs.google.com/uc?export=download&id=1ezYqG-jfZ6i9bRgKOWUyBiQlMhtncpKj # Set container images - compiler: ifort image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi - compiler: ifx image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi # Common variables - - kgo_version: v003 + - kgo_version: v004 + defaults: + run: + shell: bash -el {0} container: image: ${{ matrix.image }} env: @@ -45,6 +48,15 @@ jobs: # Checks-out repository under $GITHUB_WORKSPACE # - uses: actions/checkout@v4 + # Set up conda environment + - name: Setup conda environment + uses: conda-incubator/setup-miniconda@v3.0.4 + with: + auto-update-conda: true + activate-environment: ci-env + environment-file: build/environment.yml + python-version: ${{ matrix.python-version }} + auto-activate-base: false ############################################################################### # Build COSP and retrieve input and test files @@ -99,16 +111,18 @@ jobs: - name: Basic against known good output (KGO) run: | cd driver - KGO=data/outputs/UKMO/cosp2_output_um.${F90}.kgo.$KGO_VERSION.nc + KGO=data/outputs/UKMO/cosp2_output_um.${{ matrix.compiler }}.kgo.$KGO_VERSION.nc TST=data/outputs/UKMO/cosp2_output_um.nc - python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} + STATS=data/outputs/UKMO/cosp2_output_um.${{ matrix.compiler }}.out + python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS} # 2. UM global snapshot. - name: UM global against known good output (KGO) run: | cd driver - KGO=data/outputs/UKMO/cosp2_output.um_global.${F90}.kgo.$KGO_VERSION.nc + KGO=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.kgo.$KGO_VERSION.nc TST=data/outputs/UKMO/cosp2_output.um_global.nc - python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} + STATS=data/outputs/UKMO/cosp2_output.um_global.${{ matrix.compiler }}.out + python compare_to_kgo.py ${KGO} ${TST} --atol=${ATOL} --rtol=${RTOL} --stats_file=${STATS} ############################################################################### # Produce plots when it fails during global snapshot tests, # and create a tarball with outputs. @@ -116,18 +130,13 @@ jobs: - name: Produce plots and create tarball if: failure() run: | - TST_MLEV=data/outputs/UKMO/cosp2_output.um_global_model_levels.nc cd driver if [[ -e data/outputs/UKMO/cosp2_output.um_global.nc ]]; then python plot_test_outputs.py fi - if [[ -e data/outputs/UKMO/cosp2_output.um_global_model_levels.nc ]]; then - python plot_test_outputs.py --tst_file=$TST_MLEV - fi cd data/outputs/UKMO tar --ignore-failed-read -czf outputs.${{ matrix.compiler }}.UKMO.tgz cosp2_output.um_global.nc \ - cosp2_output_um.nc cosp2_output.um_global_model_levels.nc *.png \ - cosp2_output.um_global.out + cosp2_output_um.nc *.png cosp2_output*.${{ matrix.compiler }}.out ls -lh ############################################################################### # Make output files available if any test fails diff --git a/.gitignore b/.gitignore index ca34cd2457..51e4b5ac01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,6 @@ driver/run/cosp2_test driver/data/inputs/UKMO/*_global.nc driver/data/outputs/UKMO/*kgo.v*.nc driver/data/outputs/UKMO/*.nc +driver/data/outputs/UKMO/*.png !driver/data/outputs/cosp2_output_um.gfortran.kgo.nc -driver/data/outputs/UKMO/*md5 -driver/data/outputs/UKMO/*.out +!driver/data/outputs/UKMO/*.out diff --git a/driver/compare_to_kgo.py b/driver/compare_to_kgo.py index 77b56e5548..7adfe19a73 100644 --- a/driver/compare_to_kgo.py +++ b/driver/compare_to_kgo.py @@ -189,6 +189,7 @@ def print_stats_table(summary_stats, print_all=False, stats_file=None): if errored: print(red_colour + "===== ERROR: some of the differences are larger " "than the tolerances." + std_colour) + print_stats_table(summary_stats, print_all=args.allvar) print_stats_table(summary_stats, print_all=args.allvar, stats_file=args.stats_file) diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 new file mode 100644 index 0000000000..b3094e6125 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.nc.md5 @@ -0,0 +1 @@ +d22e708b28bab19dae4c769fe7d33e40 cosp2_output.um_global.ifort.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out new file mode 100644 index 0000000000..804b313635 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifort.kgo.v004.out @@ -0,0 +1,4 @@ +========================================== Summary statistics ========================================== + Variable N AvgDiff MinDiff MaxDiff StDev + dbze94 6 9.3337e-08 7.0183e-08 1.1649e-07 2.3154e-08 +========================================================================================================== diff --git a/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 new file mode 100644 index 0000000000..3184ef2bef --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output.um_global.ifx.kgo.v004.nc.md5 @@ -0,0 +1 @@ +aa0b47fa93e5d96d2a225a2f50348d30 cosp2_output.um_global.ifx.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 new file mode 100644 index 0000000000..c186c0ff95 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifort.kgo.v004.nc.md5 @@ -0,0 +1 @@ +0e75e4adac759d797d1264d76490fa9d cosp2_output_um.ifort.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 new file mode 100644 index 0000000000..1c020992f6 --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.nc.md5 @@ -0,0 +1 @@ +d88395d3962b9c25a15d94b13f6db42d cosp2_output_um.ifx.kgo.v004.nc diff --git a/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out new file mode 100644 index 0000000000..c26c93c02c --- /dev/null +++ b/driver/data/outputs/UKMO/cosp2_output_um.ifx.kgo.v004.out @@ -0,0 +1,4 @@ +========================================== Summary statistics ========================================== + Variable N AvgDiff MinDiff MaxDiff StDev + dbze94 9526 -8.6491e-08 -7.3010e-04 1.9553e-04 1.1886e-05 +==========================================================================================================