diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1f9768a6a8..befac14642 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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) @@ -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) @@ -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) diff --git a/.testing/Makefile b/.testing/Makefile index 2806d54130..21da6cfde4 100644 --- a/.testing/Makefile +++ b/.testing/Makefile @@ -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 @@ -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. # @@ -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 @@ -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) @@ -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 @@ -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 #--- diff --git a/ac/configure.ac b/ac/configure.ac index 487230beb8..6ff4ae5e8b 100644 --- a/ac/configure.ac +++ b/ac/configure.ac @@ -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. @@ -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} diff --git a/config_src/coupled_driver/MOM_surface_forcing_gfdl.F90 b/config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90 similarity index 100% rename from config_src/coupled_driver/MOM_surface_forcing_gfdl.F90 rename to config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90 diff --git a/config_src/coupled_driver/ocean_model_MOM.F90 b/config_src/drivers/FMS_cap/ocean_model_MOM.F90 similarity index 100% rename from config_src/coupled_driver/ocean_model_MOM.F90 rename to config_src/drivers/FMS_cap/ocean_model_MOM.F90 diff --git a/config_src/ice_solo_driver/atmos_ocean_fluxes.F90 b/config_src/drivers/ice_solo_driver/atmos_ocean_fluxes.F90 similarity index 100% rename from config_src/ice_solo_driver/atmos_ocean_fluxes.F90 rename to config_src/drivers/ice_solo_driver/atmos_ocean_fluxes.F90 diff --git a/config_src/ice_solo_driver/ice_shelf_driver.F90 b/config_src/drivers/ice_solo_driver/ice_shelf_driver.F90 similarity index 99% rename from config_src/ice_solo_driver/ice_shelf_driver.F90 rename to config_src/drivers/ice_solo_driver/ice_shelf_driver.F90 index bd64050a6f..959e4676d0 100644 --- a/config_src/ice_solo_driver/ice_shelf_driver.F90 +++ b/config_src/drivers/ice_solo_driver/ice_shelf_driver.F90 @@ -185,6 +185,8 @@ program Shelf_main endif endif + call Get_MOM_Input(param_file, dirs) + ! Read ocean_solo restart, which can override settings from the namelist. if (file_exists(trim(dirs%restart_input_dir)//'ice_solo.res')) then call open_ASCII_file(unit, trim(dirs%restart_input_dir)//'ice_solo.res', action=READONLY_FILE) @@ -215,7 +217,6 @@ program Shelf_main Start_time = real_to_time(0.0) endif - call Get_MOM_Input(param_file, dirs) ! Determining the internal unit scaling factors for this run. call unit_scaling_init(param_file, US) diff --git a/config_src/mct_driver/mom_ocean_model_mct.F90 b/config_src/drivers/mct_cap/mom_ocean_model_mct.F90 similarity index 100% rename from config_src/mct_driver/mom_ocean_model_mct.F90 rename to config_src/drivers/mct_cap/mom_ocean_model_mct.F90 diff --git a/config_src/mct_driver/mom_surface_forcing_mct.F90 b/config_src/drivers/mct_cap/mom_surface_forcing_mct.F90 similarity index 100% rename from config_src/mct_driver/mom_surface_forcing_mct.F90 rename to config_src/drivers/mct_cap/mom_surface_forcing_mct.F90 diff --git a/config_src/mct_driver/ocn_cap_methods.F90 b/config_src/drivers/mct_cap/ocn_cap_methods.F90 similarity index 100% rename from config_src/mct_driver/ocn_cap_methods.F90 rename to config_src/drivers/mct_cap/ocn_cap_methods.F90 diff --git a/config_src/mct_driver/ocn_comp_mct.F90 b/config_src/drivers/mct_cap/ocn_comp_mct.F90 similarity index 100% rename from config_src/mct_driver/ocn_comp_mct.F90 rename to config_src/drivers/mct_cap/ocn_comp_mct.F90 diff --git a/config_src/mct_driver/ocn_cpl_indices.F90 b/config_src/drivers/mct_cap/ocn_cpl_indices.F90 similarity index 100% rename from config_src/mct_driver/ocn_cpl_indices.F90 rename to config_src/drivers/mct_cap/ocn_cpl_indices.F90 diff --git a/config_src/nuopc_driver/mom_cap.F90 b/config_src/drivers/nuopc_cap/mom_cap.F90 similarity index 100% rename from config_src/nuopc_driver/mom_cap.F90 rename to config_src/drivers/nuopc_cap/mom_cap.F90 diff --git a/config_src/nuopc_driver/mom_cap_methods.F90 b/config_src/drivers/nuopc_cap/mom_cap_methods.F90 similarity index 100% rename from config_src/nuopc_driver/mom_cap_methods.F90 rename to config_src/drivers/nuopc_cap/mom_cap_methods.F90 diff --git a/config_src/nuopc_driver/mom_cap_time.F90 b/config_src/drivers/nuopc_cap/mom_cap_time.F90 similarity index 100% rename from config_src/nuopc_driver/mom_cap_time.F90 rename to config_src/drivers/nuopc_cap/mom_cap_time.F90 diff --git a/config_src/nuopc_driver/mom_ocean_model_nuopc.F90 b/config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 similarity index 100% rename from config_src/nuopc_driver/mom_ocean_model_nuopc.F90 rename to config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90 diff --git a/config_src/nuopc_driver/mom_surface_forcing_nuopc.F90 b/config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 similarity index 100% rename from config_src/nuopc_driver/mom_surface_forcing_nuopc.F90 rename to config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90 diff --git a/config_src/nuopc_driver/ocn_comp_NUOPC.F90 b/config_src/drivers/nuopc_cap/ocn_comp_NUOPC.F90 similarity index 100% rename from config_src/nuopc_driver/ocn_comp_NUOPC.F90 rename to config_src/drivers/nuopc_cap/ocn_comp_NUOPC.F90 diff --git a/config_src/nuopc_driver/time_utils.F90 b/config_src/drivers/nuopc_cap/time_utils.F90 similarity index 100% rename from config_src/nuopc_driver/time_utils.F90 rename to config_src/drivers/nuopc_cap/time_utils.F90 diff --git a/config_src/solo_driver/MESO_surface_forcing.F90 b/config_src/drivers/solo_driver/MESO_surface_forcing.F90 similarity index 100% rename from config_src/solo_driver/MESO_surface_forcing.F90 rename to config_src/drivers/solo_driver/MESO_surface_forcing.F90 diff --git a/config_src/solo_driver/MOM_driver.F90 b/config_src/drivers/solo_driver/MOM_driver.F90 similarity index 99% rename from config_src/solo_driver/MOM_driver.F90 rename to config_src/drivers/solo_driver/MOM_driver.F90 index 9c222bb0bb..8edad7fa05 100644 --- a/config_src/solo_driver/MOM_driver.F90 +++ b/config_src/drivers/solo_driver/MOM_driver.F90 @@ -250,6 +250,10 @@ program MOM_main ! This call sets the number and affinity of threads with openMP. !$ call set_MOM_thread_affinity(ocean_nthreads, use_hyper_thread) + ! This call is required to initiate dirs%restart_input_dir for ocean_solo.res + ! The contents of dirs will be reread in initialize_MOM. + call get_MOM_input(dirs=dirs) + ! Read ocean_solo restart, which can override settings from the namelist. if (file_exists(trim(dirs%restart_input_dir)//'ocean_solo.res')) then call open_ASCII_file(unit, trim(dirs%restart_input_dir)//'ocean_solo.res', action=READONLY_FILE) diff --git a/config_src/solo_driver/MOM_surface_forcing.F90 b/config_src/drivers/solo_driver/MOM_surface_forcing.F90 similarity index 100% rename from config_src/solo_driver/MOM_surface_forcing.F90 rename to config_src/drivers/solo_driver/MOM_surface_forcing.F90 diff --git a/config_src/solo_driver/atmos_ocean_fluxes.F90 b/config_src/drivers/solo_driver/atmos_ocean_fluxes.F90 similarity index 100% rename from config_src/solo_driver/atmos_ocean_fluxes.F90 rename to config_src/drivers/solo_driver/atmos_ocean_fluxes.F90 diff --git a/config_src/solo_driver/user_surface_forcing.F90 b/config_src/drivers/solo_driver/user_surface_forcing.F90 similarity index 100% rename from config_src/solo_driver/user_surface_forcing.F90 rename to config_src/drivers/solo_driver/user_surface_forcing.F90 diff --git a/config_src/unit_drivers/MOM_sum_driver.F90 b/config_src/drivers/unit_drivers/MOM_sum_driver.F90 similarity index 100% rename from config_src/unit_drivers/MOM_sum_driver.F90 rename to config_src/drivers/unit_drivers/MOM_sum_driver.F90 diff --git a/src/framework/MOM_coms_infra.F90 b/config_src/infra/FMS1/MOM_coms_infra.F90 similarity index 100% rename from src/framework/MOM_coms_infra.F90 rename to config_src/infra/FMS1/MOM_coms_infra.F90 diff --git a/src/framework/MOM_constants.F90 b/config_src/infra/FMS1/MOM_constants.F90 similarity index 100% rename from src/framework/MOM_constants.F90 rename to config_src/infra/FMS1/MOM_constants.F90 diff --git a/src/framework/MOM_couplertype_infra.F90 b/config_src/infra/FMS1/MOM_couplertype_infra.F90 similarity index 100% rename from src/framework/MOM_couplertype_infra.F90 rename to config_src/infra/FMS1/MOM_couplertype_infra.F90 diff --git a/src/framework/MOM_cpu_clock_infra.F90 b/config_src/infra/FMS1/MOM_cpu_clock_infra.F90 similarity index 100% rename from src/framework/MOM_cpu_clock_infra.F90 rename to config_src/infra/FMS1/MOM_cpu_clock_infra.F90 diff --git a/src/framework/MOM_data_override_infra.F90 b/config_src/infra/FMS1/MOM_data_override_infra.F90 similarity index 100% rename from src/framework/MOM_data_override_infra.F90 rename to config_src/infra/FMS1/MOM_data_override_infra.F90 diff --git a/src/framework/MOM_diag_manager_infra.F90 b/config_src/infra/FMS1/MOM_diag_manager_infra.F90 similarity index 99% rename from src/framework/MOM_diag_manager_infra.F90 rename to config_src/infra/FMS1/MOM_diag_manager_infra.F90 index 702c464814..18c80cf24c 100644 --- a/src/framework/MOM_diag_manager_infra.F90 +++ b/config_src/infra/FMS1/MOM_diag_manager_infra.F90 @@ -20,9 +20,9 @@ module MOM_diag_manager_infra use diag_manager_mod, only : register_diag_field_fms => register_diag_field use diag_manager_mod, only : register_static_field_fms => register_static_field use diag_manager_mod, only : get_diag_field_id_fms => get_diag_field_id -use time_manager_mod, only : time_type +use MOM_time_manager, only : time_type use MOM_domain_infra, only : MOM_domain_type -use MOM_error_handler, only : MOM_error, FATAL, WARNING +use MOM_error_infra, only : MOM_error => MOM_err, FATAL, WARNING implicit none ; private diff --git a/src/framework/MOM_domain_infra.F90 b/config_src/infra/FMS1/MOM_domain_infra.F90 similarity index 99% rename from src/framework/MOM_domain_infra.F90 rename to config_src/infra/FMS1/MOM_domain_infra.F90 index 86e85e60a6..fc39777a2f 100644 --- a/src/framework/MOM_domain_infra.F90 +++ b/config_src/infra/FMS1/MOM_domain_infra.F90 @@ -4,7 +4,7 @@ module MOM_domain_infra ! This file is part of MOM6. See LICENSE.md for the license. use MOM_coms_infra, only : PE_here, root_PE, num_PEs -use MOM_cpu_clock, only : cpu_clock_begin, cpu_clock_end +use MOM_cpu_clock_infra, only : cpu_clock_begin, cpu_clock_end use MOM_error_infra, only : MOM_error=>MOM_err, NOTE, WARNING, FATAL use mpp_domains_mod, only : domain2D, domain1D @@ -1689,6 +1689,8 @@ subroutine clone_MD_to_d2D(MD_in, mpp_domain, min_halo, halo_size, symmetric, & if ((MD_in%io_layout(1) + MD_in%io_layout(2) > 0) .and. & (MD_in%layout(1)*MD_in%layout(2) > 1)) then call mpp_define_io_domain(mpp_domain, MD_in%io_layout) + else + call mpp_define_io_domain(mpp_domain, (/ 1, 1 /) ) endif end subroutine clone_MD_to_d2D diff --git a/src/framework/MOM_ensemble_manager_infra.F90 b/config_src/infra/FMS1/MOM_ensemble_manager_infra.F90 similarity index 100% rename from src/framework/MOM_ensemble_manager_infra.F90 rename to config_src/infra/FMS1/MOM_ensemble_manager_infra.F90 diff --git a/src/framework/MOM_error_infra.F90 b/config_src/infra/FMS1/MOM_error_infra.F90 similarity index 100% rename from src/framework/MOM_error_infra.F90 rename to config_src/infra/FMS1/MOM_error_infra.F90 diff --git a/src/framework/MOM_interp_infra.F90 b/config_src/infra/FMS1/MOM_interp_infra.F90 similarity index 100% rename from src/framework/MOM_interp_infra.F90 rename to config_src/infra/FMS1/MOM_interp_infra.F90 diff --git a/src/framework/MOM_io_infra.F90 b/config_src/infra/FMS1/MOM_io_infra.F90 similarity index 100% rename from src/framework/MOM_io_infra.F90 rename to config_src/infra/FMS1/MOM_io_infra.F90 diff --git a/src/framework/MOM_time_manager.F90 b/config_src/infra/FMS1/MOM_time_manager.F90 similarity index 100% rename from src/framework/MOM_time_manager.F90 rename to config_src/infra/FMS1/MOM_time_manager.F90 diff --git a/config_src/dynamic/MOM_memory.h b/config_src/memory/dynamic_nonsymmetric/MOM_memory.h similarity index 100% rename from config_src/dynamic/MOM_memory.h rename to config_src/memory/dynamic_nonsymmetric/MOM_memory.h diff --git a/config_src/dynamic_symmetric/MOM_memory.h b/config_src/memory/dynamic_symmetric/MOM_memory.h similarity index 100% rename from config_src/dynamic_symmetric/MOM_memory.h rename to config_src/memory/dynamic_symmetric/MOM_memory.h diff --git a/docs/Doxyfile_nortd b/docs/Doxyfile_nortd index ca18bf49ee..4a81c20bd7 100644 --- a/docs/Doxyfile_nortd +++ b/docs/Doxyfile_nortd @@ -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 @@ -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 diff --git a/docs/Doxyfile_nortd_latex b/docs/Doxyfile_nortd_latex index f779d0215d..207e645195 100644 --- a/docs/Doxyfile_nortd_latex +++ b/docs/Doxyfile_nortd_latex @@ -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 @@ -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 diff --git a/docs/Doxyfile_rtd b/docs/Doxyfile_rtd index 561de8382d..479c03e1b4 100644 --- a/docs/Doxyfile_rtd +++ b/docs/Doxyfile_rtd @@ -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 @@ -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 diff --git a/docs/Doxyfile_rtd_dox b/docs/Doxyfile_rtd_dox index b9c7c3c0d3..c7919584dd 100644 --- a/docs/Doxyfile_rtd_dox +++ b/docs/Doxyfile_rtd_dox @@ -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 \ @@ -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 \ @@ -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 diff --git a/docs/README.md b/docs/README.md index b071ce5927..1bec91f288 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/code_organization.rst b/docs/code_organization.rst index c83997497d..8e5ac39d57 100644 --- a/docs/code_organization.rst +++ b/docs/code_organization.rst @@ -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 @@ -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 @@ -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. diff --git a/pkg/CVMix-src b/pkg/CVMix-src index 534fc38e75..9423197f89 160000 --- a/pkg/CVMix-src +++ b/pkg/CVMix-src @@ -1 +1 @@ -Subproject commit 534fc38e759fcb8a2563fa0dc4c0bbf81f758db9 +Subproject commit 9423197f894112edfcb1502245f7d7b873d551f9 diff --git a/src/core/MOM_isopycnal_slopes.F90 b/src/core/MOM_isopycnal_slopes.F90 index e1f573f6ea..98b5b10998 100644 --- a/src/core/MOM_isopycnal_slopes.F90 +++ b/src/core/MOM_isopycnal_slopes.F90 @@ -37,14 +37,14 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & !! thermodynamic variables real, intent(in) :: dt_kappa_smooth !< A smoothing vertical diffusivity !! times a smoothing timescale [Z2 ~> m2]. - real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)+1), intent(inout) :: slope_x !< Isopycnal slope in i-direction [nondim] - real, dimension(SZI_(G),SZJB_(G),SZK_(GV)+1), intent(inout) :: slope_y !< Isopycnal slope in j-direction [nondim] + real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)+1), intent(inout) :: slope_x !< Isopycnal slope in i-dir [Z L-1 ~> nondim] + real, dimension(SZI_(G),SZJB_(G),SZK_(GV)+1), intent(inout) :: slope_y !< Isopycnal slope in j-dir [Z L-1 ~> nondim] real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)+1), & optional, intent(inout) :: N2_u !< Brunt-Vaisala frequency squared at - !! interfaces between u-points [T-2 ~> s-2] + !! interfaces between u-points [L2 Z-2 T-2 ~> s-2] real, dimension(SZI_(G),SZJB_(G),SZK_(GV)+1), & optional, intent(inout) :: N2_v !< Brunt-Vaisala frequency squared at - !! interfaces between u-points [T-2 ~> s-2] + !! interfaces between v-points [L2 Z-2 T-2 ~> s-2] integer, optional, intent(in) :: halo !< Halo width over which to compute type(ocean_OBC_type), optional, pointer :: OBC !< Open boundaries control structure. @@ -86,7 +86,7 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & real :: drdz ! Vertical density gradient [R Z-1 ~> kg m-4]. real :: Slope ! The slope of density surfaces, calculated in a way ! that is always between -1 and 1. - real :: mag_grad2 ! The squared magnitude of the 3-d density gradient [R2 L-2 ~> kg2 m-8]. + real :: mag_grad2 ! The squared magnitude of the 3-d density gradient [R2 Z-2 ~> kg2 m-8]. real :: slope2_Ratio ! The ratio of the slope squared to slope_max squared. real :: h_neglect ! A thickness that is so small it is usually lost ! in roundoff and can be neglected [H ~> m or kg m-2]. @@ -94,7 +94,7 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & real :: dz_neglect ! A change in interface heighs that is so small it is usually lost ! in roundoff and can be neglected [Z ~> m]. logical :: use_EOS ! If true, density is calculated from T & S using an equation of state. - real :: G_Rho0 ! The gravitational acceleration divided by density [Z2 T-2 R-1 ~> m5 kg-2 s-2] + real :: G_Rho0 ! The gravitational acceleration divided by density [L2 Z-1 T-2 R-1 ~> m4 s-2 kg-1] real :: Z_to_L ! A conversion factor between from units for e to the ! units for lateral distances. real :: L_to_Z ! A conversion factor between from units for lateral distances @@ -134,7 +134,7 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & present_N2_u = PRESENT(N2_u) present_N2_v = PRESENT(N2_v) - G_Rho0 = (US%L_to_Z*L_to_Z*GV%g_Earth) / GV%Rho0 + G_Rho0 = GV%g_Earth / GV%Rho0 if (present_N2_u) then do j=js,je ; do I=is-1,ie N2_u(I,j,1) = 0. @@ -248,17 +248,17 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & ! This estimate of slope is accurate for small slopes, but bounded ! to be between -1 and 1. - mag_grad2 = drdx**2 + (L_to_Z*drdz)**2 + mag_grad2 = (Z_to_L*drdx)**2 + drdz**2 if (mag_grad2 > 0.0) then slope_x(I,j,K) = drdx / sqrt(mag_grad2) else ! Just in case mag_grad2 = 0 ever. slope_x(I,j,K) = 0.0 endif - if (present_N2_u) N2_u(I,j,k) = G_Rho0 * drdz * G%mask2dCu(I,j) ! Square of buoyancy frequency [T-2 ~> s-2] + if (present_N2_u) N2_u(I,j,k) = G_Rho0 * drdz * G%mask2dCu(I,j) ! Square of buoyancy freq. [L2 Z-2 T-2 ~> s-2] else ! With .not.use_EOS, the layers are constant density. - slope_x(I,j,K) = (Z_to_L*(e(i,j,K)-e(i+1,j,K))) * G%IdxCu(I,j) + slope_x(I,j,K) = (e(i,j,K)-e(i+1,j,K)) * G%IdxCu(I,j) endif if (local_open_u_BC) then l_seg = OBC%segnum_u(I,j) @@ -351,17 +351,17 @@ subroutine calc_isoneutral_slopes(G, GV, US, h, e, tv, dt_kappa_smooth, & ! This estimate of slope is accurate for small slopes, but bounded ! to be between -1 and 1. - mag_grad2 = drdy**2 + (L_to_Z*drdz)**2 + mag_grad2 = (Z_to_L*drdy)**2 + drdz**2 if (mag_grad2 > 0.0) then slope_y(i,J,K) = drdy / sqrt(mag_grad2) else ! Just in case mag_grad2 = 0 ever. slope_y(i,J,K) = 0.0 endif - if (present_N2_v) N2_v(i,J,k) = G_Rho0 * drdz * G%mask2dCv(i,J) ! Square of buoyancy frequency [T-2 ~> s-2] + if (present_N2_v) N2_v(i,J,k) = G_Rho0 * drdz * G%mask2dCv(i,J) ! Square of buoyancy freq. [L2 Z-2 T-2 ~> s-2] else ! With .not.use_EOS, the layers are constant density. - slope_y(i,J,K) = (Z_to_L*(e(i,j,K)-e(i,j+1,K))) * G%IdyCv(i,J) + slope_y(i,J,K) = (e(i,j,K)-e(i,j+1,K)) * G%IdyCv(i,J) endif if (local_open_v_BC) then l_seg = OBC%segnum_v(i,J) diff --git a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 index e3a6f1599e..7d95c43b98 100644 --- a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 +++ b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 @@ -1125,16 +1125,18 @@ subroutine VarMix_init(Time, G, GV, US, param_file, diag, CS) if (CS%calculate_Eady_growth_rate .and. CS%use_stored_slopes) then CS%id_N2_u = register_diag_field('ocean_model', 'N2_u', diag%axesCui, Time, & 'Square of Brunt-Vaisala frequency, N^2, at u-points, as used in Visbeck et al.', & - 's-2', conversion=US%s_to_T**2) + 's-2', conversion=(US%L_to_Z*US%s_to_T)**2) CS%id_N2_v = register_diag_field('ocean_model', 'N2_v', diag%axesCvi, Time, & 'Square of Brunt-Vaisala frequency, N^2, at v-points, as used in Visbeck et al.', & - 's-2', conversion=US%s_to_T**2) + 's-2', conversion=(US%L_to_Z*US%s_to_T)**2) endif if (CS%use_stored_slopes) then CS%id_S2_u = register_diag_field('ocean_model', 'S2_u', diag%axesCu1, Time, & - 'Depth average square of slope magnitude, S^2, at u-points, as used in Visbeck et al.', 'nondim') + 'Depth average square of slope magnitude, S^2, at u-points, as used in Visbeck et al.', & + 'nondim', conversion=US%Z_to_L**2) CS%id_S2_v = register_diag_field('ocean_model', 'S2_v', diag%axesCv1, Time, & - 'Depth average square of slope magnitude, S^2, at v-points, as used in Visbeck et al.', 'nondim') + 'Depth average square of slope magnitude, S^2, at v-points, as used in Visbeck et al.', & + 'nondim', conversion=US%Z_to_L**2) endif oneOrTwo = 1.0 diff --git a/src/parameterizations/lateral/MOM_thickness_diffuse.F90 b/src/parameterizations/lateral/MOM_thickness_diffuse.F90 index 4d602f9a67..02a49a2a1a 100644 --- a/src/parameterizations/lateral/MOM_thickness_diffuse.F90 +++ b/src/parameterizations/lateral/MOM_thickness_diffuse.F90 @@ -40,7 +40,7 @@ module MOM_thickness_diffuse real :: max_Khth_CFL !< Maximum value of the diffusive CFL for thickness diffusion real :: Khth_Min !< Minimum value of Khth [L2 T-1 ~> m2 s-1] real :: Khth_Max !< Maximum value of Khth [L2 T-1 ~> m2 s-1], or 0 for no max - real :: slope_max !< Slopes steeper than slope_max are limited in some way [nondim]. + real :: slope_max !< Slopes steeper than slope_max are limited in some way [Z L-1 ~> nondim]. real :: kappa_smooth !< Vertical diffusivity used to interpolate more !! sensible values of T & S into thin layers [Z2 T-1 ~> m2 s-1]. logical :: thickness_diffuse !< If true, interfaces heights are diffused. @@ -83,8 +83,8 @@ module MOM_thickness_diffuse type(diag_ctrl), pointer :: diag => NULL() !< structure used to regulate timing of diagnostics real, pointer :: GMwork(:,:) => NULL() !< Work by thickness diffusivity [R Z L2 T-3 ~> W m-2] - real, pointer :: diagSlopeX(:,:,:) => NULL() !< Diagnostic: zonal neutral slope [nondim] - real, pointer :: diagSlopeY(:,:,:) => NULL() !< Diagnostic: zonal neutral slope [nondim] + real, pointer :: diagSlopeX(:,:,:) => NULL() !< Diagnostic: zonal neutral slope [Z L-1 ~> nondim] + real, pointer :: diagSlopeY(:,:,:) => NULL() !< Diagnostic: zonal neutral slope [Z L-1 ~> nondim] real, dimension(:,:,:), pointer :: & KH_u_GME => NULL(), & !< interface height diffusivities in u-columns [L2 T-1 ~> m2 s-1] @@ -578,8 +578,8 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV !! the isopycnal slopes are taken directly from !! the interface slopes without consideration of !! density gradients [nondim]. - real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)+1), optional, intent(in) :: slope_x !< Isopycnal slope at u-points - real, dimension(SZI_(G),SZJB_(G),SZK_(GV)+1), optional, intent(in) :: slope_y !< Isopycnal slope at v-points + real, dimension(SZIB_(G),SZJ_(G),SZK_(GV)+1), optional, intent(in) :: slope_x !< Isopyc. slope at u [Z L-1 ~> nondim] + real, dimension(SZI_(G),SZJB_(G),SZK_(GV)+1), optional, intent(in) :: slope_y !< Isopyc. slope at v [Z L-1 ~> nondim] ! Local variables real, dimension(SZI_(G), SZJ_(G), SZK_(GV)) :: & T, & ! The temperature (or density) [degC], with the values in @@ -660,7 +660,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV real :: Slope ! The slope of density surfaces, calculated in a way ! that is always between -1 and 1, nondimensional. real :: mag_grad2 ! The squared magnitude of the 3-d density gradient [R2 L-2 ~> kg2 m-8]. - real :: I_slope_max2 ! The inverse of slope_max squared, nondimensional. + real :: I_slope_max2 ! The inverse of slope_max squared [L2 Z-2 ~> nondim]. real :: h_neglect ! A thickness that is so small it is usually lost ! in roundoff and can be neglected [H ~> m or kg m-2]. real :: h_neglect2 ! h_neglect^2 [H2 ~> m2 or kg2 m-4]. @@ -919,7 +919,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV ! This estimate of slope is accurate for small slopes, but bounded ! to be between -1 and 1. - mag_grad2 = drdx**2 + (US%L_to_Z*drdz)**2 + mag_grad2 = (US%Z_to_L*drdx)**2 + drdz**2 if (mag_grad2 > 0.0) then Slope = drdx / sqrt(mag_grad2) slope2_Ratio_u(I,K) = Slope**2 * I_slope_max2 @@ -933,7 +933,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV ! that ignore density gradients along layers. if (present_int_slope_u) then Slope = (1.0 - int_slope_u(I,j,K)) * Slope + & - int_slope_u(I,j,K) * US%Z_to_L*((e(i+1,j,K)-e(i,j,K)) * G%IdxCu(I,j)) + int_slope_u(I,j,K) * ((e(i+1,j,K)-e(i,j,K)) * G%IdxCu(I,j)) slope2_Ratio_u(I,K) = (1.0 - int_slope_u(I,j,K)) * slope2_Ratio_u(I,K) endif @@ -942,7 +942,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV if (CS%id_slope_x > 0) CS%diagSlopeX(I,j,k) = Slope ! Estimate the streamfunction at each interface [Z L2 T-1 ~> m3 s-1]. - Sfn_unlim_u(I,K) = -((KH_u(I,j,K)*G%dy_Cu(I,j))*US%L_to_Z*Slope) + Sfn_unlim_u(I,K) = -((KH_u(I,j,K)*G%dy_Cu(I,j))*Slope) ! Avoid moving dense water upslope from below the level of ! the bottom on the receiving side. @@ -968,10 +968,10 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV if (present_slope_x) then Slope = slope_x(I,j,k) else - Slope = US%Z_to_L*((e(i,j,K)-e(i+1,j,K))*G%IdxCu(I,j)) * G%mask2dCu(I,j) + Slope = ((e(i,j,K)-e(i+1,j,K))*G%IdxCu(I,j)) * G%mask2dCu(I,j) endif if (CS%id_slope_x > 0) CS%diagSlopeX(I,j,k) = Slope - Sfn_unlim_u(I,K) = ((KH_u(I,j,K)*G%dy_Cu(I,j))*US%L_to_Z*Slope) + Sfn_unlim_u(I,K) = ((KH_u(I,j,K)*G%dy_Cu(I,j))*Slope) hN2_u(I,K) = GV%g_prime(K) endif ! if (use_EOS) else ! if (k > nk_linear) @@ -1189,7 +1189,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV ! This estimate of slope is accurate for small slopes, but bounded ! to be between -1 and 1. - mag_grad2 = drdy**2 + (US%L_to_Z*drdz)**2 + mag_grad2 = (US%Z_to_L*drdy)**2 + drdz**2 if (mag_grad2 > 0.0) then Slope = drdy / sqrt(mag_grad2) slope2_Ratio_v(i,K) = Slope**2 * I_slope_max2 @@ -1203,7 +1203,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV ! that ignore density gradients along layers. if (present_int_slope_v) then Slope = (1.0 - int_slope_v(i,J,K)) * Slope + & - int_slope_v(i,J,K) * US%Z_to_L*((e(i,j+1,K)-e(i,j,K)) * G%IdyCv(i,J)) + int_slope_v(i,J,K) * ((e(i,j+1,K)-e(i,j,K)) * G%IdyCv(i,J)) slope2_Ratio_v(i,K) = (1.0 - int_slope_v(i,J,K)) * slope2_Ratio_v(i,K) endif @@ -1212,7 +1212,7 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV if (CS%id_slope_y > 0) CS%diagSlopeY(I,j,k) = Slope ! Estimate the streamfunction at each interface [Z L2 T-1 ~> m3 s-1]. - Sfn_unlim_v(i,K) = -((KH_v(i,J,K)*G%dx_Cv(i,J))*US%L_to_Z*Slope) + Sfn_unlim_v(i,K) = -((KH_v(i,J,K)*G%dx_Cv(i,J))*Slope) ! Avoid moving dense water upslope from below the level of ! the bottom on the receiving side. @@ -1238,10 +1238,10 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV if (present_slope_y) then Slope = slope_y(i,J,k) else - Slope = US%Z_to_L*((e(i,j,K)-e(i,j+1,K))*G%IdyCv(i,J)) * G%mask2dCv(i,J) + Slope = ((e(i,j,K)-e(i,j+1,K))*G%IdyCv(i,J)) * G%mask2dCv(i,J) endif if (CS%id_slope_y > 0) CS%diagSlopeY(I,j,k) = Slope - Sfn_unlim_v(i,K) = ((KH_v(i,J,K)*G%dx_Cv(i,J))*US%L_to_Z*Slope) + Sfn_unlim_v(i,K) = ((KH_v(i,J,K)*G%dx_Cv(i,J))*Slope) hN2_v(i,K) = GV%g_prime(K) endif ! if (use_EOS) else ! if (k > nk_linear) @@ -1955,7 +1955,7 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS) "longer than DT, or 0 to use DT.", units="s", default=0.0, scale=US%s_to_T) call get_param(param_file, mdl, "KHTH_SLOPE_MAX", CS%slope_max, & "A slope beyond which the calculated isopycnal slope is "//& - "not reliable and is scaled away.", units="nondim", default=0.01) + "not reliable and is scaled away.", units="nondim", default=0.01, scale=US%L_to_Z) call get_param(param_file, mdl, "KD_SMOOTH", CS%kappa_smooth, & "A diapycnal diffusivity that is used to interpolate "//& "more sensible values of T & S into thin layers.", & @@ -2073,10 +2073,10 @@ subroutine thickness_diffuse_init(Time, G, GV, US, param_file, diag, CDp, CS) 'm2 s-1', conversion=US%L_to_m**2*US%s_to_T) CS%id_slope_x = register_diag_field('ocean_model', 'neutral_slope_x', diag%axesCui, Time, & - 'Zonal slope of neutral surface', 'nondim') + 'Zonal slope of neutral surface', 'nondim', conversion=US%Z_to_L) if (CS%id_slope_x > 0) call safe_alloc_ptr(CS%diagSlopeX,G%IsdB,G%IedB,G%jsd,G%jed,GV%ke+1) CS%id_slope_y = register_diag_field('ocean_model', 'neutral_slope_y', diag%axesCvi, Time, & - 'Meridional slope of neutral surface', 'nondim') + 'Meridional slope of neutral surface', 'nondim', conversion=US%Z_to_L) if (CS%id_slope_y > 0) call safe_alloc_ptr(CS%diagSlopeY,G%isd,G%ied,G%JsdB,G%JedB,GV%ke+1) CS%id_sfn_x = register_diag_field('ocean_model', 'GM_sfn_x', diag%axesCui, Time, & 'Parameterized Zonal Overturning Streamfunction', & diff --git a/src/parameterizations/vertical/MOM_tidal_mixing.F90 b/src/parameterizations/vertical/MOM_tidal_mixing.F90 index b870dff1af..512179445b 100644 --- a/src/parameterizations/vertical/MOM_tidal_mixing.F90 +++ b/src/parameterizations/vertical/MOM_tidal_mixing.F90 @@ -882,7 +882,6 @@ subroutine calculate_CVMix_tidal(h, j, G, GV, US, CS, N2_int, Kd_lay, Kd_int, Kv ! summing q_i*TidalConstituent_i over the number of constituents. call CVMix_compute_SchmittnerCoeff( nlev = GV%ke, & energy_flux = tidal_qe_md(:), & - rho = rho_fw, & SchmittnerCoeff = Schmittner_coeff, & exp_hab_zetar = exp_hab_zetar, & CVmix_tidal_params_user = CS%CVMix_tidal_params) @@ -896,7 +895,6 @@ subroutine calculate_CVMix_tidal(h, j, G, GV, US, CS, N2_int, Kd_lay, Kd_int, Kv Tdiff_out = Kd_tidal, & Nsqr = N2_int_i, & OceanDepth = -iFaceHeight(GV%ke+1), & - vert_dep = vert_dep, & nlev = GV%ke, & max_nlev = GV%ke, & SchmittnerCoeff = Schmittner_coeff, &