Skip to content

Commit e406b72

Browse files
authored
Merge pull request #8 from ocean-eddy-cpt/main-to-cpt
Main to dev/cpt
2 parents 280d8b1 + afe99b5 commit e406b72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+76
-62
lines changed

.gitlab-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ setup:
3131
# Clone regressions directory
3232
- git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests && cd tests
3333
# Install / update testing scripts
34-
- git clone https://github.com/adcroft/MRS.git MRS
34+
- git clone -b new-code-struct https://github.com/adcroft/MRS.git MRS
3535
# Update MOM6-examples and submodules
3636
- (cd MOM6-examples && git checkout . && git checkout dev/gfdl && git pull && git submodule init && git submodule update)
3737
- (cd MOM6-examples/src/MOM6 && git submodule update)
@@ -60,7 +60,7 @@ gnu:ocean-only-nolibs:
6060
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
6161
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
6262
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
63-
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{solo_driver,dynamic_symmetric,ext*} ../../../src ../../MOM6-examples/src/FMS
63+
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{drivers/solo_driver,memory/dynamic_symmetric,infra/FMS1,ext*} ../../../src ../../MOM6-examples/src/FMS
6464
- sed -i '/FMS\/.*\/test_/d' path_names
6565
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF" path_names
6666
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
@@ -73,7 +73,7 @@ gnu:ice-ocean-nolibs:
7373
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
7474
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
7575
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
76-
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{coupled_driver,dynamic,ext*} ../../../src ../../MOM6-examples/src/{FMS,coupler,SIS2,icebergs,ice_param,land_null,atmos_null}
76+
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{drivers/FMS_cap,memory/dynamic_nonsymmetric,infra/FMS1,ext*} ../../../src ../../MOM6-examples/src/{FMS,coupler,SIS2,icebergs,ice_param,land_null,atmos_null}
7777
- sed -i '/FMS\/.*\/test_/d' path_names
7878
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF -D_USE_LEGACY_LAND_ -Duse_AM3_physics" path_names
7979
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)

.testing/Makefile

+9-11
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
# MPIFC MPI Fortran compiler
3333
#
3434
# Build configuration:
35-
#
3635
# FCFLAGS_DEBUG Testing ("debug") compiler flags
3736
# FCFLAGS_REPRO Production ("repro") compiler flags
3837
# FCFLAGS_INIT Variable initialization flags
@@ -76,7 +75,6 @@ FCFLAGS_REPRO ?= -g -O2
7675
FCFLAGS_INIT ?=
7776
FCFLAGS_COVERAGE ?=
7877
# Additional notes:
79-
#
8078
# - The default values are simple, minimalist flags, supported by nearly all
8179
# compilers which are comparable to GFDL's canonical DEBUG and REPRO builds.
8280
#
@@ -87,13 +85,14 @@ FCFLAGS_COVERAGE ?=
8785
# so FCFLAGS_INIT is used to provide additional MOM6 configuration.
8886

8987
# Set to `true` to require identical results from DEBUG and REPRO builds
88+
# NOTE: Many compilers (Intel, GCC on ARM64) do not yet produce identical
89+
# results across DEBUG and REPRO builds (as defined below), so we disable on
90+
# default.
9091
DO_REPRO_TESTS ?=
9192

93+
# Time measurement (configurable by the CI)
9294
TIME ?= time
9395

94-
# Many compilers (Intel, GCC on ARM64) do not yet produce identical results
95-
# across DEBUG and REPRO builds (as defined below), so we disable on default.
96-
9796
#---
9897
# Dependencies
9998
DEPS = deps
@@ -154,10 +153,12 @@ SOURCE = \
154153
$(foreach ext,F90 inc c h,$(wildcard $(1)/*/*.$(ext) $(1)/*/*/*.$(ext)))
155154

156155
MOM_SOURCE = $(call SOURCE,../src) \
157-
$(wildcard ../config_src/solo_driver/*.F90) \
156+
$(wildcard ../config_src/infra/FMS1/*.F90) \
157+
$(wildcard ../config_src/drivers/solo_driver/*.F90) \
158158
$(wildcard ../config_src/ext*/*/*.F90)
159159
TARGET_SOURCE = $(call SOURCE,build/target_codebase/src) \
160-
$(wildcard build/target_codebase/config_src/solo_driver/*.F90) \
160+
$(wildcard build/target_codebase/config_src/infra/FMS1/*.F90) \
161+
$(wildcard build/target_codebase/config_src/drivers/solo_driver/*.F90) \
161162
$(wildcard build/target_codebase/config_src/ext*/*.F90)
162163
FMS_SOURCE = $(call SOURCE,$(DEPS)/fms/src)
163164

@@ -249,7 +250,7 @@ build/target/Makefile: | $(TARGET_CODEBASE)
249250
# Ideally we would want to re-run both Makefile and mkmf, but our mkmf call
250251
# is inside ./configure, so we must re-run ./configure as well.
251252
$(foreach b,$(filter-out target,$(BUILDS)),build/$(b)/Makefile): $(MOM_SOURCE)
252-
build/target/configure: $(TARGET_SOURCE)
253+
build/target_codebase/configure: $(TARGET_SOURCE)
253254

254255

255256
# Build MOM6
@@ -286,9 +287,6 @@ $(TARGET_CODEBASE)/ac/configure: $(TARGET_CODEBASE)
286287
$(TARGET_CODEBASE):
287288
git clone --recursive $(MOM_TARGET_URL) $@
288289
cd $@ && git checkout $(MOM_TARGET_BRANCH)
289-
# Copy modern autoconf files to target?
290-
mkdir -p $(TARGET_CODEBASE)/ac
291-
cp -r ../ac/{configure.ac,Makefile.in,m4} $(TARGET_CODEBASE)/ac
292290

293291

294292
#---

ac/configure.ac

+5-4
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ srcdir=$srcdir/..
4242
# Default to symmetric grid
4343
# NOTE: --enable is more properly used to add a feature, rather than to select
4444
# a compile-time mode, so this is not exactly being used as intended.
45-
MEM_LAYOUT=${srcdir}/config_src/dynamic_symmetric
45+
MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_symmetric
4646
AC_ARG_ENABLE([asymmetric],
4747
AS_HELP_STRING([--enable-asymmetric], [Use the asymmetric grid]))
4848
AS_IF([test "$enable_asymmetric" = yes],
49-
[MEM_LAYOUT=${srcdir}/config_src/dynamic])
49+
[MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_nonsymmetric])
5050

5151
# Default to solo_driver
52-
DRIVER_DIR=${srcdir}/config_src/solo_driver
52+
DRIVER_DIR=${srcdir}/config_src/drivers/solo_driver
5353
AC_ARG_WITH([driver],
5454
AS_HELP_STRING([--with-driver=coupled_driver|solo_driver], [Select directory for driver source code]))
5555
AS_IF([test "x$with_driver" != "x"],
56-
[DRIVER_DIR=${srcdir}/config_src/${with_driver}])
56+
[DRIVER_DIR=${srcdir}/config_src/drivers/${with_driver}])
5757

5858
# TODO: Rather than point to a pre-configured header file, autoconf could be
5959
# used to configure a header based on a template.
@@ -216,6 +216,7 @@ AS_IF([test -z "$MKMF"], [
216216
AC_CONFIG_COMMANDS([path_names],
217217
[list_paths -l \
218218
${srcdir}/src \
219+
${srcdir}/config_src/infra/FMS1 \
219220
${srcdir}/config_src/ext* \
220221
${DRIVER_DIR} \
221222
${MEM_LAYOUT}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/Doxyfile_nortd

+4-4
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,10 @@ WARN_LOGFILE = _build/doxygen_warn_nortd_log.txt
860860

861861
INPUT = ../src \
862862
front_page.md \
863-
../config_src/solo_driver \
864-
../config_src/dynamic_symmetric \
863+
../config_src/drivers/solo_driver \
864+
../config_src/memory/dynamic_symmetric \
865865
../config_src/external \
866-
../config_src/coupled_driver
866+
../config_src/drivers/FMS_cap
867867

868868
# This tag can be used to specify the character encoding of the source files
869869
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2212,7 +2212,7 @@ SEARCH_INCLUDES = YES
22122212
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
22132213

22142214
INCLUDE_PATH = ../src/framework \
2215-
../config_src/dynamic_symmetric
2215+
../config_src/memory/dynamic_symmetric
22162216

22172217
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
22182218
# patterns (like *.h and *.hpp) to filter out the header-files in the

docs/Doxyfile_nortd_latex

+4-4
Original file line numberDiff line numberDiff line change
@@ -860,10 +860,10 @@ WARN_LOGFILE = _build/doxygen_warn_nortd_latex_log.txt
860860

861861
INPUT = ../src \
862862
front_page.md \
863-
../config_src/solo_driver \
864-
../config_src/dynamic_symmetric \
863+
../config_src/drivers/solo_driver \
864+
../config_src/memory/dynamic_symmetric \
865865
../config_src/external \
866-
../config_src/coupled_driver
866+
../config_src/drivers/FMS_cap
867867

868868
# This tag can be used to specify the character encoding of the source files
869869
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2212,7 +2212,7 @@ SEARCH_INCLUDES = YES
22122212
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
22132213

22142214
INCLUDE_PATH = ../src/framework \
2215-
../config_src/dynamic_symmetric
2215+
../config_src/memory/dynamic_symmetric
22162216

22172217
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
22182218
# patterns (like *.h and *.hpp) to filter out the header-files in the

docs/Doxyfile_rtd

+4-4
Original file line numberDiff line numberDiff line change
@@ -810,10 +810,10 @@ WARN_LOGFILE = _build/doxygen_warn_rtd_log.txt
810810
# Note: If this tag is empty the current directory is searched.
811811

812812
INPUT = ../src \
813-
../config_src/solo_driver \
814-
../config_src/dynamic_symmetric \
813+
../config_src/drivers/solo_driver \
814+
../config_src/memory/dynamic_symmetric \
815815
../config_src/external \
816-
../config_src/coupled_driver
816+
../config_src/drivers/FMS_cap
817817

818818
# This tag can be used to specify the character encoding of the source files
819819
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -2072,7 +2072,7 @@ SEARCH_INCLUDES = YES
20722072
# preprocessor.
20732073
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
20742074

2075-
INCLUDE_PATH = ../src/framework ../config_src/dynamic_symmetric
2075+
INCLUDE_PATH = ../src/framework ../config_src/memory/dynamic_symmetric
20762076

20772077
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
20782078
# patterns (like *.h and *.hpp) to filter out the header-files in the

docs/Doxyfile_rtd_dox

+7-7
Original file line numberDiff line numberDiff line change
@@ -810,10 +810,10 @@ WARN_LOGFILE = _build/doxygen_rtd_dox_debug.txt
810810
# Note: If this tag is empty the current directory is searched.
811811

812812
INPUT = ../src \
813-
../config_src/solo_driver \
814-
../config_src/dynamic_symmetric \
813+
../config_src/drivers/solo_driver \
814+
../config_src/memory/dynamic_symmetric \
815815
../config_src/external \
816-
../config_src/coupled_driver \
816+
../config_src/drivers/FMS_cap \
817817
../src/ALE/MOM_ALE.F90 \
818818
../src/ALE/PCM_functions.F90 \
819819
../src/core/MOM.F90 \
@@ -838,10 +838,10 @@ INPUT = ../src \
838838
#INPUT = ../src/equation_of_state
839839

840840
#INPUT = ../src/ALE \
841-
# ../config_src/solo_driver \
842-
# ../config_src/dynamic_symmetric \
841+
# ../config_src/drivers/solo_driver \
842+
# ../config_src/memory/dynamic_symmetric \
843843
# ../config_src/external \
844-
# ../config_src/coupled_driver
844+
# ../config_src/drivers/FMS_cap
845845

846846
#INPUT = \
847847
# ../src/ALE/_ALE.dox \
@@ -2112,7 +2112,7 @@ SEARCH_INCLUDES = YES
21122112
# preprocessor.
21132113
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
21142114

2115-
INCLUDE_PATH = ../src/framework ../config_src/dynamic_symmetric
2115+
INCLUDE_PATH = ../src/framework ../config_src/memory/dynamic_symmetric
21162116

21172117
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
21182118
# patterns (like *.h and *.hpp) to filter out the header-files in the

docs/README.md

+12-8

docs/code_organization.rst

+22-15

src/parameterizations/vertical/MOM_ALE_sponge.F90

+6-2
Original file line numberDiff line numberDiff line change
@@ -960,12 +960,16 @@ subroutine apply_ALE_sponge(h, dt, G, GV, US, CS, Time)
960960
damp = dt * CS%Iresttime_col(c)
961961
I1pdamp = 1.0 / (1.0 + damp)
962962
tmp_val2(1:nz_data) = CS%Ref_val(m)%p(1:nz_data,c)
963+
do k=1,nz
964+
h_col(k)=h(i,j,k)
965+
enddo
963966
if (CS%time_varying_sponges) then
967+
964968
call remapping_core_h(CS%remap_cs, nz_data, CS%Ref_val(m)%h(1:nz_data,c), tmp_val2, &
965-
CS%nz, h_col, tmp_val1, h_neglect, h_neglect_edge)
969+
CS%nz, h_col, tmp_val1, h_neglect, h_neglect_edge)
966970
else
967971
call remapping_core_h(CS%remap_cs, nz_data, CS%Ref_h%p(1:nz_data,c), tmp_val2, &
968-
CS%nz, h_col, tmp_val1, h_neglect, h_neglect_edge)
972+
CS%nz, h_col, tmp_val1, h_neglect, h_neglect_edge)
969973
endif
970974
!Backward Euler method
971975
if (CS%id_sp_tendency(m) > 0) tmp(i,j,1:nz) = CS%var(m)%p(i,j,1:nz)

0 commit comments

Comments
 (0)