Skip to content

Commit

Permalink
Merge remote-tracking branch 'gfdl/dev/gfdl' into dev/esmg
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Apr 7, 2022
2 parents a9884b8 + 87cb4bc commit 2ac240a
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 6 deletions.
170 changes: 170 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
stages:
- builds
- run
- tests
- cleanup

variables:
CACHE_DIR: "/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/"


# Merges SIS2 with dev/gfdl. Changes directory to test directory, if it exists.
# - set cache location
# - get MOM6-examples/tools/MRS scripts by cloning Gaea-stats and then MOM6-examples
# - set working directory to MOM6-examples
# - pull down latest of dev/gfdl (MOM6-examples might be ahead of Gaea-stats)
before_script:
- echo Cache directory set to $CACHE_DIR
- echo -e "\e[0Ksection_start:`date +%s`:before[collapsed=true]\r\e[0KPre-script"
- git clone https://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests
- cd tests && git submodule init && git submodule update
- cd MOM6-examples && git checkout dev/gfdl && git pull
- echo -e "\e[0Ksection_end:`date +%s`:before\r\e[0K"

# Tests that merge with dev/gfdl works.
merge:
stage: builds
tags:
- ncrc4
script:
- cd $CI_PROJECT_DIR
- git pull --no-edit https://github.com/NOAA-GFDL/SIS2.git dev/gfdl

# Compiles
gnu:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile SIS2_SRC=../.. pipeline-build-repro-gnu -s -j

#gnu:ice-ocean-nolibs:
# stage: builds
# tags:
# - ncrc4
# script:
# - make -f tools/MRS/Makefile SIS2_SRC=../.. pipeline-build-gnu-iceocean-nolibs

intel:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile SIS2_SRC=../.. pipeline-build-repro-intel -s -j

pgi:repro:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile SIS2_SRC=../.. pipeline-build-repro-pgi -s -j

gnu:debug:
stage: builds
tags:
- ncrc4
script:
- time make -f tools/MRS/Makefile SIS2_SRC=../.. pipeline-build-debug-gnu -s -j

# Runs
run:
stage: run
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-run

# Tests
gnu:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-gnu_non_symmetric

gnu:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-gnu_symmetric

gnu:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-gnu_memory

#gnu:static:
# stage: tests
# tags:
# - ncrc4
# script:
# - make -f tools/MRS/Makefile sis2-pipeline-test-gnu_static

gnu:restart:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-gnu_restarts

gnu:params:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-params_gnu_symmetric
allow_failure: true

intel:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-intel_symmetric

intel:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-intel_non_symmetric

intel:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-intel_memory

pgi:symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-pgi_symmetric

pgi:non-symmetric:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-pgi_non_symmetric

pgi:memory:
stage: tests
tags:
- ncrc4
script:
- make -f tools/MRS/Makefile sis2-pipeline-test-pgi_memory

cleanup:
stage: cleanup
tags:
- ncrc4
before_script:
- echo Skipping submodule update
script:
- rm $CACHE_DIR/*$CI_PIPELINE_ID.tgz
12 changes: 6 additions & 6 deletions src/ice_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -455,25 +455,25 @@ subroutine Ice_public_type_bounds_check(Ice, G, msg)
n_bad = 0 ; i_bad = 0 ; j_bad = 0 ; k_bad = 0

t_min = T_0degC-100. ; t_max = T_0degC+60.
do k=0,ncat ; do j=jsc,jec ; do i=isc,iec
do k=0,ncat ; do j=jsc,jec ; do i=isc,iec ; if (G%mask2dT(i,j)>0.5) then
i2 = i+i_off ; j2 = j+j_off ; k2 = k+1
if ((Ice%t_surf(i2,j2,k2) < t_min) .or. (Ice%t_surf(i2,j2,k2) > t_max)) then
n_bad = n_bad + 1
if (n_bad == 1) then ; i_bad = i ; j_bad = j ; k_bad = k ; endif
endif
enddo ; enddo ; enddo
do j=jsc,jec ; do i=isc,iec ; i2 = i+i_off ; j2 = j+j_off
endif ; enddo ; enddo ; enddo
do j=jsc,jec ; do i=isc,iec ; if (G%mask2dT(i,j)>0.5) then ; i2 = i+i_off ; j2 = j+j_off
if ((Ice%s_surf(i2,j2) < 0.0) .or. (Ice%s_surf(i2,j2) > 100.0)) then
n_bad = n_bad + 1
if (n_bad == 1) then ; i_bad = i ; j_bad = j ; endif
endif
enddo ; enddo
if (fluxes_avail) then ; do j=jsc,jec ; do i=isc,iec ; i2 = i+i_off ; j2 = j+j_off
endif ; enddo ; enddo
if (fluxes_avail) then ; do j=jsc,jec ; do i=isc,iec ; if (G%mask2dT(i,j)>0.5) then ; i2 = i+i_off ; j2 = j+j_off
if ((abs(Ice%flux_t(i2,j2)) > 1e4) .or. (abs(Ice%flux_lw(i2,j2)) > 1e4)) then
n_bad = n_bad + 1
if (n_bad == 1) then ; i_bad = i ; j_bad = j ; endif
endif
enddo ; enddo ; endif
endif ; enddo ; enddo ; endif

if (n_bad > 0) then
i2 = i_bad+i_off ; j2 = j_bad+j_off ; k2 = k_bad+1
Expand Down

0 comments on commit 2ac240a

Please sign in to comment.