Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update to gfdl 20210308 #61

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8912b13
Fix the bug that Rayleigh_[uv] was not
herrwang0 Feb 20, 2021
42eb7c7
1. Initialize Rayleigh_[uv] to separate loops
herrwang0 Feb 24, 2021
a0b296e
Remove the trailing space
herrwang0 Feb 24, 2021
9544de2
Remove blank line spaces
herrwang0 Feb 24, 2021
d8733fe
Merge pull request #1337 from NOAA-GFDL/main
marshallward Feb 24, 2021
ac88645
Merge branch 'dev/gfdl' into fix-wavedrag-initRayleigh
marshallward Feb 25, 2021
6e49a91
+New config_src directory structure
Hallberg-NOAA Feb 25, 2021
f06669e
Merge pull request #1329 from herrwang0/fix-wavedrag-initRayleigh
marshallward Feb 25, 2021
0d22f32
+MOM6/docs reflects the new directory structure
Hallberg-NOAA Feb 25, 2021
fb882c9
Fix a missing line to reset vbt if smaller than vel_underflow in MOM_…
herrwang0 Feb 25, 2021
0393546
Depth-integrated momentum budget diagnostics
hmkhatri Feb 25, 2021
73addc4
Depth-integrated momentum budget diagnostics
hmkhatri Feb 25, 2021
5f827ed
typo correction
hmkhatri Feb 25, 2021
c0ddee0
Update build scripts for new dir structure
adcroft Feb 25, 2021
95ed51f
Correct path to FMS_cap in gnu:ice-ocean-nolibs job
adcroft Feb 25, 2021
efb3612
Remove AC_CHECK_FILE for legacy MOM_memory.h
marshallward Feb 25, 2021
8f0748c
Merge pull request #9 from marshallward/hallberg-fms2-acfix
adcroft Feb 26, 2021
3b8cc9c
Testing: Target uses local autoconf
marshallward Feb 26, 2021
d2ec275
Merge pull request #10 from marshallward/hallberg-fms2-acfix
adcroft Feb 26, 2021
e0bda29
Merge pull request #1341 from adcroft/Hallberg-NOAA-gfdl-fms2
marshallward Feb 26, 2021
77d44cb
Dimensional consistency test
hmkhatri Mar 1, 2021
2c4137b
dimensions
hmkhatri Mar 1, 2021
2165ebb
dimen.
hmkhatri Mar 1, 2021
7ed57b0
H_to_m
hmkhatri Mar 1, 2021
e52eabf
Change to stack arrays for 2D diagnostics
hmkhatri Mar 2, 2021
b895f1e
Changed to stack arrays
hmkhatri Mar 2, 2021
a545274
Merge pull request #1340 from herrwang0/fix-vel_underflow-missingline
marshallward Mar 2, 2021
fbf0e91
Merge branch 'dev/gfdl' into add_diagnostic
marshallward Mar 2, 2021
b57431d
Merge pull request #1343 from hmkhatri/add_diagnostic
marshallward Mar 3, 2021
ba7bbab
Typo corrected - Change from Jsd to JsdB in array allocations
hmkhatri Mar 5, 2021
075be64
Typo correction - Change from Jsd to JsdB in array allocations
hmkhatri Mar 5, 2021
e7a80bc
Merge pull request #1345 from hmkhatri/add_diagnostic
marshallward Mar 5, 2021
4e05839
Merge pull request #1342 from NOAA-GFDL/gfdl-fms2
marshallward Mar 8, 2021
a4049e7
Merge branch 'dev/gfdl' into main
marshallward Mar 8, 2021
3703ca7
Merge remote-tracking branch 'GFDL/main' into feature/update-to-GFDL-…
jiandewang Mar 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ setup:
# Clone regressions directory
- git clone --recursive http://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests && cd tests
# Install / update testing scripts
- git clone https://github.com/adcroft/MRS.git MRS
- git clone -b new-code-struct 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)
Expand Down Expand Up @@ -60,7 +60,7 @@ gnu:ocean-only-nolibs:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{solo_driver,dynamic_symmetric,ext*} ../../../src ../../MOM6-examples/src/FMS
- ../../MOM6-examples/src/mkmf/bin/list_paths -l ../../../config_src/{drivers/solo_driver,memory/dynamic_symmetric,infra/FMS1,ext*} ../../../src ../../MOM6-examples/src/FMS
- sed -i '/FMS\/.*\/test_/d' path_names
- ../../MOM6-examples/src/mkmf/bin/mkmf -t ../../MOM6-examples/src/mkmf/templates/ncrc-gnu.mk -p MOM6 -c"-Duse_libMPI -Duse_netCDF" path_names
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
Expand All @@ -73,7 +73,7 @@ gnu:ice-ocean-nolibs:
- time tar zxf $CACHE_DIR/tests_$CI_PIPELINE_ID.tgz && cd tests
- make -f MRS/Makefile.build build/gnu/env && cd build/gnu
# mkdir -p build/gnu/repro/symmetric_dynamic/ocean_only && cd build/gnu/repro/symmetric_dynamic/ocean_only
- ../../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}
- ../../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}
- sed -i '/FMS\/.*\/test_/d' path_names
- ../../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
- time (source ./env ; make NETCDF=3 REPRO=1 MOM6 -s -j)
Expand Down
20 changes: 9 additions & 11 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# MPIFC MPI Fortran compiler
#
# Build configuration:
#
# FCFLAGS_DEBUG Testing ("debug") compiler flags
# FCFLAGS_REPRO Production ("repro") compiler flags
# FCFLAGS_INIT Variable initialization flags
Expand Down Expand Up @@ -76,7 +75,6 @@ FCFLAGS_REPRO ?= -g -O2
FCFLAGS_INIT ?=
FCFLAGS_COVERAGE ?=
# Additional notes:
#
# - The default values are simple, minimalist flags, supported by nearly all
# compilers which are comparable to GFDL's canonical DEBUG and REPRO builds.
#
Expand All @@ -87,13 +85,14 @@ FCFLAGS_COVERAGE ?=
# so FCFLAGS_INIT is used to provide additional MOM6 configuration.

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

# Time measurement (configurable by the CI)
TIME ?= time

# Many compilers (Intel, GCC on ARM64) do not yet produce identical results
# across DEBUG and REPRO builds (as defined below), so we disable on default.

#---
# Dependencies
DEPS = deps
Expand Down Expand Up @@ -154,10 +153,12 @@ SOURCE = \
$(foreach ext,F90 inc c h,$(wildcard $(1)/*/*.$(ext) $(1)/*/*/*.$(ext)))

MOM_SOURCE = $(call SOURCE,../src) \
$(wildcard ../config_src/solo_driver/*.F90) \
$(wildcard ../config_src/infra/FMS1/*.F90) \
$(wildcard ../config_src/drivers/solo_driver/*.F90) \
$(wildcard ../config_src/ext*/*/*.F90)
TARGET_SOURCE = $(call SOURCE,build/target_codebase/src) \
$(wildcard build/target_codebase/config_src/solo_driver/*.F90) \
$(wildcard build/target_codebase/config_src/infra/FMS1/*.F90) \
$(wildcard build/target_codebase/config_src/drivers/solo_driver/*.F90) \
$(wildcard build/target_codebase/config_src/ext*/*.F90)
FMS_SOURCE = $(call SOURCE,$(DEPS)/fms/src)

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


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


#---
Expand Down
9 changes: 5 additions & 4 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ srcdir=$srcdir/..
# Default to symmetric grid
# NOTE: --enable is more properly used to add a feature, rather than to select
# a compile-time mode, so this is not exactly being used as intended.
MEM_LAYOUT=${srcdir}/config_src/dynamic_symmetric
MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_symmetric
AC_ARG_ENABLE([asymmetric],
AS_HELP_STRING([--enable-asymmetric], [Use the asymmetric grid]))
AS_IF([test "$enable_asymmetric" = yes],
[MEM_LAYOUT=${srcdir}/config_src/dynamic])
[MEM_LAYOUT=${srcdir}/config_src/memory/dynamic_nonsymmetric])

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

# TODO: Rather than point to a pre-configured header file, autoconf could be
# used to configure a header based on a template.
Expand Down Expand Up @@ -216,6 +216,7 @@ AS_IF([test -z "$MKMF"], [
AC_CONFIG_COMMANDS([path_names],
[list_paths -l \
${srcdir}/src \
${srcdir}/config_src/infra/FMS1 \
${srcdir}/config_src/ext* \
${DRIVER_DIR} \
${MEM_LAYOUT}
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/Doxyfile_nortd
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,10 @@ WARN_LOGFILE = _build/doxygen_warn_nortd_log.txt

INPUT = ../src \
front_page.md \
../config_src/solo_driver \
../config_src/dynamic_symmetric \
../config_src/drivers/solo_driver \
../config_src/memory/dynamic_symmetric \
../config_src/external \
../config_src/coupled_driver
../config_src/drivers/FMS_cap

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

INCLUDE_PATH = ../src/framework \
../config_src/dynamic_symmetric
../config_src/memory/dynamic_symmetric

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
Expand Down
8 changes: 4 additions & 4 deletions docs/Doxyfile_nortd_latex
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,10 @@ WARN_LOGFILE = _build/doxygen_warn_nortd_latex_log.txt

INPUT = ../src \
front_page.md \
../config_src/solo_driver \
../config_src/dynamic_symmetric \
../config_src/drivers/solo_driver \
../config_src/memory/dynamic_symmetric \
../config_src/external \
../config_src/coupled_driver
../config_src/drivers/FMS_cap

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

INCLUDE_PATH = ../src/framework \
../config_src/dynamic_symmetric
../config_src/memory/dynamic_symmetric

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
Expand Down
8 changes: 4 additions & 4 deletions docs/Doxyfile_rtd
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,10 @@ WARN_LOGFILE = _build/doxygen_warn_rtd_log.txt
# Note: If this tag is empty the current directory is searched.

INPUT = ../src \
../config_src/solo_driver \
../config_src/dynamic_symmetric \
../config_src/drivers/solo_driver \
../config_src/memory/dynamic_symmetric \
../config_src/external \
../config_src/coupled_driver
../config_src/drivers/FMS_cap

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

INCLUDE_PATH = ../src/framework ../config_src/dynamic_symmetric
INCLUDE_PATH = ../src/framework ../config_src/memory/dynamic_symmetric

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
Expand Down
14 changes: 7 additions & 7 deletions docs/Doxyfile_rtd_dox
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,10 @@ WARN_LOGFILE = _build/doxygen_rtd_dox_debug.txt
# Note: If this tag is empty the current directory is searched.

INPUT = ../src \
../config_src/solo_driver \
../config_src/dynamic_symmetric \
../config_src/drivers/solo_driver \
../config_src/memory/dynamic_symmetric \
../config_src/external \
../config_src/coupled_driver \
../config_src/drivers/FMS_cap \
../src/ALE/MOM_ALE.F90 \
../src/ALE/PCM_functions.F90 \
../src/core/MOM.F90 \
Expand All @@ -838,10 +838,10 @@ INPUT = ../src \
#INPUT = ../src/equation_of_state

#INPUT = ../src/ALE \
# ../config_src/solo_driver \
# ../config_src/dynamic_symmetric \
# ../config_src/drivers/solo_driver \
# ../config_src/memory/dynamic_symmetric \
# ../config_src/external \
# ../config_src/coupled_driver
# ../config_src/drivers/FMS_cap

#INPUT = \
# ../src/ALE/_ALE.dox \
Expand Down Expand Up @@ -2112,7 +2112,7 @@ SEARCH_INCLUDES = YES
# preprocessor.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.

INCLUDE_PATH = ../src/framework ../config_src/dynamic_symmetric
INCLUDE_PATH = ../src/framework ../config_src/memory/dynamic_symmetric

# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
Expand Down
20 changes: 12 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ The starting state of directories and files:
```
SRC/
config_src/
coupled_driver
dynamic
dynamic_symmetric
drivers/
FMS_cap
ice_solo_driver
mct_cap
nuopc_cap
solo_driver
unit_drivers
external
ice_solo_driver
mct_driver
nuopc_driver
solo_driver
unit_drivers
infra/
FMS1
memory/
dynamic
dynamic_symmetric
pkg/
CVMix-src
GSW-Fortran
Expand Down
37 changes: 22 additions & 15 deletions docs/code_organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ The directory tree is::

MOM6
├── config_src
│   ├── coupled_driver
│   ├── dynamic
│   ├── dynamic_symmetric
│   ├── drivers
│   │   ├── FMS_cap
│   │   ├── ice_solo_driver
│   │   ├── mct_cap
│   │   ├── nuopc_cap
│   │   ├── solo_driver
│   │   └── unit_drivers
│   ├── external
│   │   ├── GFDL_ocean_BGC
│   │   └── ODA_hooks
│   ├── ice_solo_driver
│   ├── mct_driver
│   ├── nuopc_driver
│   ├── solo_driver
│   └── unit_drivers
│   ├── memory
│   │   ├── dynamic_nonsymmetric
│   │   ├── dynamic_symmetric
├── docs
│   └── images
├── pkg
Expand Down Expand Up @@ -84,11 +86,11 @@ The directory tree is::
`config_src/`
-------------

`dynamic/`, `dynamic_symmetric/`
One or none of `config_src/dynamic/` or `config_src/dynamic_symmetric/` can
be included at compile time. If neither is used then a `MOM_memory.h` file
specific to the model configuration must be present - this is known as a
"static" compile with fixed layout and domain shape.
`memory/dynamic_nonsymmetric/`, `memory/dynamic_symmetric/`
One or none of `config_src/memory/dynamic_nonsymmetric/` or
`config_src/dynamic_symmetric/` can be included at compile time. If neither
is used then a `MOM_memory.h` file specific to the model configuration must be
present - this is known as a"static" compile with fixed layout and domain shape.

`external/`
Contains "null" modules providing the API to optional components to use
Expand All @@ -98,12 +100,17 @@ The directory tree is::
To use the actual ODA or BGC, add the appropriate source to the search
paths .

`solo_driver/`
`infra/FMS1`
Contains MOM6-specific thin wrappers to all of the FMS types and routines that
are used by MOM6. The code in this directory should only be called by the
infrastructure-agnostic code in src/framework.

`drivers/solo_driver/`
This driver produces an ocean-only executable with no other coupled
components (no sea-ice, no atmosphere, etc.). It is the simplest
configuration and fastest to compile and thus used for a lot of testing.

`coupled_driver/`
`drivers/FMS_cap/`
This driver provides an interface for the GFDL coupler to call. It requires
compiling MOM6 along with at least a sea-ice model and possibly all other
components in a coupled model.
Expand Down
Loading