Skip to content

Commit

Permalink
Merge pull request #5 from NOAA-GFDL/dev/gfdl
Browse files Browse the repository at this point in the history
Sync dev/gfdl with NOAA-GFDL version of repository
  • Loading branch information
jkrasting authored Apr 11, 2019
2 parents e1536ee + aceda8f commit 8bf6c9e
Show file tree
Hide file tree
Showing 221 changed files with 44,953 additions and 40,711 deletions.
17 changes: 15 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stages:
# Merges MOM6 with dev/gfdl. Changes directory to test directory, if it exists.
before_script:
- MOM6_SRC=$CI_PROJECT_DIR
- CACHE_DIR=/lustre/f1/oar.gfdl.ogrp-account/runner/cache/
- echo Cache directory set to ${CACHE_DIR:=/lustre/f2/scratch/oar.gfdl.ogrp-account/runner/cache/}
- git pull --no-edit https://github.com/NOAA-GFDL/MOM6.git dev/gfdl && git submodule init && git submodule update
- pwd ; ls

Expand All @@ -34,10 +34,12 @@ setup:
- git clone https://github.com/adcroft/MRS.git MRS
# Update MOM6-examples and submodules
- (cd MOM6-examples && git checkout . && git checkout dev/gfdl && git pull && git submodule init && git submodule update)
- (cd MOM6-examples/src/MOM6 && git submodule update)
- test -d MOM6-examples/src/LM3 || make -f MRS/Makefile.clone clone_gfdl -s
- make -f MRS/Makefile.clone MOM6-examples/.datasets -s
#- (cd MOM6-examples/src/mkmf && git pull https://github.com/adcroft/mkmf.git add_coverage_mode)
- env > gitlab_session.log
# Cache everything under tests to unpack for each subsequent stage
- cd ../ ; time tar zcf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz tests

# Compiles
Expand Down Expand Up @@ -114,8 +116,9 @@ run:
- time tar zxf $CACHE_DIR/build-pgi-repro-$CI_PIPELINE_ID.tgz
# time tar zxf $CACHE_DIR/build-gnu-debug-$CI_PIPELINE_ID.tgz
- echo "make -f MRS/Makefile.tests all -B" > job.sh
- msub -l partition=c4,nodes=29,walltime=00:29:00,qos=norm -q debug -S /bin/tcsh -j oe -A gfdl_o -z -o log.$CI_PIPELINE_ID -N mom6_regression -K job.sh
- msub -l partition=c4,nodes=29,walltime=00:31:00,qos=norm -q debug -S /bin/tcsh -j oe -A gfdl_o -z -o log.$CI_PIPELINE_ID -N mom6_regression -K job.sh
- cat log.$CI_PIPELINE_ID
- test -f restart_results_gnu.tar.gz
- time tar zvcf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz *.tar.gz

# Tests
Expand Down Expand Up @@ -218,6 +221,16 @@ gnu:restart:
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests gnu_check_restarts

gnu:params:
stage: tests
tags:
- ncrc4
script:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- time tar zxf $CACHE_DIR/results-$CI_PIPELINE_ID.tgz
- make -f MRS/Makefile.tests params_gnu_symmetric
allow_failure: true

cleanup:
stage: cleanup
tags:
Expand Down
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
# This is a not a c-language project but we use the same environment.
language: c
dist: trusty
sudo: false

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- tcsh pkg-config netcdf-bin libnetcdf-dev openmpi-bin libopenmpi-dev gfortran
- tcsh pkg-config netcdf-bin libnetcdf-dev mpich2 libmpich2-dev gfortran

# For saving time...
cache:
Expand Down
1,198 changes: 743 additions & 455 deletions config_src/coupled_driver/MOM_surface_forcing.F90

Large diffs are not rendered by default.

61 changes: 27 additions & 34 deletions config_src/coupled_driver/coupler_util.F90
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
!> Provides a couple of interfaces to allow more transparent and
!! robust extraction of the various fields in the coupler types.
module coupler_util

! This file is part of MOM6. See LICENSE.md for the license.

! This code provides a couple of interfaces to allow more transparent and
! robust extraction of the various fields in the coupler types.
use MOM_error_handler, only : MOM_error, FATAL, WARNING
use coupler_types_mod, only : coupler_2d_bc_type, ind_flux, ind_alpha
use coupler_types_mod, only : ind_csurf
Expand All @@ -15,24 +15,20 @@ module coupler_util

contains

!> Extract an array of values in a coupler bc type
subroutine extract_coupler_values(BC_struc, BC_index, BC_element, array_out, &
is, ie, js, je, conversion)
type(coupler_2d_bc_type), intent(in) :: BC_struc
integer, intent(in) :: BC_index, BC_element
real, dimension(:,:), intent(out) :: array_out
integer, optional, intent(in) :: is, ie, js, je
real, optional, intent(in) :: conversion
! Arguments: BC_struc - The type from which the data is being extracted.
! (in) BC_index - The boundary condition number being extracted.
! (in) BC_element - The element of the boundary condition being extracted.
! This could be ind_csurf, ind_alpha, ind_flux or ind_deposition.
! (out) array_out - The array being filled with the input values.
! (in, opt) is, ie, js, je - The i- and j- limits of array_out to be filled.
! These must match the size of the corresponding value array or an
! error message is issued.
! (in, opt) conversion - A number that every element is multiplied by, to
! permit sign convention or unit conversion.

type(coupler_2d_bc_type), intent(in) :: BC_struc !< The type from which the data is being extracted.
integer, intent(in) :: BC_index !< The boundary condition number being extracted.
integer, intent(in) :: BC_element !< The element of the boundary condition being extracted.
real, dimension(:,:), intent(out) :: array_out !< The array being filled with the input values.
integer, optional, intent(in) :: is !< Start i-index
integer, optional, intent(in) :: ie !< End i-index
integer, optional, intent(in) :: js !< Start j-index
integer, optional, intent(in) :: je !< End j-index
real, optional, intent(in) :: conversion !< A number that every element is multiplied by, to
!! permit sign convention or unit conversion.
! Local variables
real, pointer, dimension(:,:) :: Array_in
real :: conv
integer :: i, j, is0, ie0, js0, je0, i_offset, j_offset
Expand Down Expand Up @@ -78,24 +74,21 @@ subroutine extract_coupler_values(BC_struc, BC_index, BC_element, array_out, &

end subroutine extract_coupler_values

!> Set an array of values in a coupler bc type
subroutine set_coupler_values(array_in, BC_struc, BC_index, BC_element, &
is, ie, js, je, conversion)
real, dimension(:,:), intent(in) :: array_in
type(coupler_2d_bc_type), intent(inout) :: BC_struc
integer, intent(in) :: BC_index, BC_element
integer, optional, intent(in) :: is, ie, js, je
real, optional, intent(in) :: conversion
! Arguments: array_in - The array containing the values to load into the BC.
! (out) BC_struc - The type into which the data is being loaded.
! (in) BC_index - The boundary condition number being extracted.
! (in) BC_element - The element of the boundary condition being extracted.
! This could be ind_csurf, ind_alpha, ind_flux or ind_deposition.
! (in, opt) is, ie, js, je - The i- and j- limits of array_out to be filled.
! These must match the size of the corresponding value array or an
! error message is issued.
! (in, opt) conversion - A number that every element is multiplied by, to
! permit sign convention or unit conversion.

real, dimension(:,:), intent(in) :: array_in !< The array containing the values to load into the BC.
type(coupler_2d_bc_type), intent(inout) :: BC_struc !< The type from which the data is being extracted.
integer, intent(in) :: BC_index !< The boundary condition number being extracted.
integer, intent(in) :: BC_element !< The element of the boundary condition being extracted.
!! This could be ind_csurf, ind_alpha, ind_flux or ind_deposition.
integer, optional, intent(in) :: is !< Start i-index
integer, optional, intent(in) :: ie !< End i-index
integer, optional, intent(in) :: js !< Start j-index
integer, optional, intent(in) :: je !< End j-index
real, optional, intent(in) :: conversion !< A number that every element is multiplied by, to
!! permit sign convention or unit conversion.
! Local variables
real, pointer, dimension(:,:) :: Array_out
real :: conv
integer :: i, j, is0, ie0, js0, je0, i_offset, j_offset
Expand Down
Loading

0 comments on commit 8bf6c9e

Please sign in to comment.