Skip to content

Commit

Permalink
Merge remote-tracking branch 'gfdl/dev/gfdl' into esmg_work
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed Sep 24, 2024
2 parents 4dc4c86 + ba59078 commit e65fd22
Show file tree
Hide file tree
Showing 22 changed files with 1,691 additions and 451 deletions.
2 changes: 1 addition & 1 deletion .github/actions/ubuntu-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runs:
run: |
echo "::group::config.mk"
cd .testing
echo "FCFLAGS_DEBUG = -g -O0 -Wextra -Wno-compare-reals -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" >> config.mk
echo "FCFLAGS_DEBUG = -g -O0 -std=f2018 -Wextra -Wno-compare-reals -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" >> config.mk
echo "FCFLAGS_REPRO = -g -O2 -fbacktrace" >> config.mk
echo "FCFLAGS_INIT = -finit-real=snan -finit-integer=2147483647 -finit-derived" >> config.mk
echo "FCFLAGS_FMS = -g -fbacktrace -O0" >> config.mk
Expand Down
8 changes: 5 additions & 3 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,21 @@ export FMS_URL
# TODO: This needs more automated configuration
MPIRUN ?= mpirun

# Generic compiler variables are pass through to the builds
# Generic compiler variables are passed through to the builds
export CC
export MPICC
export FC
export MPIFC

# Builds are distinguished by FCFLAGS
FCFLAGS_DEBUG ?= -g -O0
FCFLAGS ?= -g -O0

FCFLAGS_DEBUG ?= $(FCFLAGS)
FCFLAGS_REPRO ?= -g -O2
FCFLAGS_OPT ?= -g -O3 -mavx -fno-omit-frame-pointer
FCFLAGS_INIT ?=
FCFLAGS_COVERAGE ?= -g -O0 -fbacktrace --coverage
FCFLAGS_FMS ?= $(FCFLAGS_DEBUG)
FCFLAGS_FMS ?= $(FCFLAGS)
# Additional notes:
# - These default values are simple, minimalist flags, supported by nearly all
# compilers, and are somewhat analogous to GFDL's DEBUG and REPRO builds.
Expand Down
6 changes: 6 additions & 0 deletions .testing/tc1/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ BOUND_CORIOLIS = True ! [Boolean] default = False
! have no effect on the SADOURNY Coriolis scheme if it
! were possible to use centered difference thickness fluxes.

! === module MOM_PressureForce_FV ===
MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False
! If true, use mass weighting when interpolating T/S for integrals
! near the bathymetry in FV pressure gradient calculations.


! === module MOM_hor_visc ===
AH_VEL_SCALE = 0.05 ! [m s-1] default = 0.0
! The velocity scale which is multiplied by the cube of
Expand Down
7 changes: 6 additions & 1 deletion .testing/tc2/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,16 @@ PGF_STANLEY_T2_DET_COEFF = -1.0 ! [nondim] default = -1.0
! gradient in the deterministic part of the Stanley form of the Brankart
! correction. Negative values disable the scheme.

! === module MOM_PressureForce_FV ===
MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False
! If true, use mass weighting when interpolating T/S for integrals
! near the bathymetry in FV pressure gradient calculations.

! === module MOM_hor_visc ===
LAPLACIAN = True
KH_VEL_SCALE = 0.05
SMAGORINSKY_KH = True ! [Boolean] default = False
SMAG_LAP_CONST = 0.06 ! [nondim] default = 0.0
SMAG_LAP_CONST = 0.06 ! [nondim] default = 0.0
AH_VEL_SCALE = 0.05 ! [m s-1] default = 0.0
! The velocity scale which is multiplied by the cube of
! the grid spacing to calculate the Laplacian viscosity.
Expand Down
3 changes: 3 additions & 0 deletions .testing/tc4/MOM_input
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ BOUND_CORIOLIS = True ! [Boolean] default = False
! === module MOM_PressureForce ===

! === module MOM_PressureForce_FV ===
MASS_WEIGHT_IN_PRESSURE_GRADIENT = True ! [Boolean] default = False
! If true, use mass weighting when interpolating T/S for integrals
! near the bathymetry in FV pressure gradient calculations.
RECONSTRUCT_FOR_PRESSURE = False ! [Boolean] default = True
! If True, use vertical reconstruction of T & S within the integrals of the FV
! pressure gradient calculation. If False, use the constant-by-layer algorithm.
Expand Down
8 changes: 4 additions & 4 deletions config_src/drivers/FMS_cap/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1065,10 +1065,10 @@ subroutine ocean_model_data2D_get(OS, Ocean, name, array2D, isc, jsc)
type(ocean_public_type), intent(in) :: Ocean !< A structure containing various publicly
!! visible ocean surface fields.
character(len=*) , intent(in) :: name !< The name of the field to extract
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [various]
integer , intent(in) :: isc !< The starting i-index of array2D
integer , intent(in) :: jsc !< The starting j-index of array2D
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [various]

integer :: g_isc, g_iec, g_jsc, g_jec, g_isd, g_ied, g_jsd, g_jed, i, j

Expand Down Expand Up @@ -1188,10 +1188,10 @@ subroutine ocean_model_get_UV_surf(OS, Ocean, name, array2D, isc, jsc)
type(ocean_public_type), intent(in) :: Ocean !< A structure containing various publicly
!! visible ocean surface fields.
character(len=*) , intent(in) :: name !< The name of the current (ua or va) to extract
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [L T-1 ~> m s-1]
integer , intent(in) :: isc !< The starting i-index of array2D
integer , intent(in) :: jsc !< The starting j-index of array2D
real, dimension(isc:,jsc:), intent(out):: array2D !< The values of the named field, it must
!! cover only the computational domain [L T-1 ~> m s-1]

type(ocean_grid_type) , pointer :: G !< The ocean's grid structure
type(surface), pointer :: sfc_state !< A structure containing fields that
Expand Down
Loading

0 comments on commit e65fd22

Please sign in to comment.