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

GFDL to main 2022-10-27 #1586

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a22f691
Fix ALE sponge diagnostics (#188)
WenhaoChen89 Aug 19, 2022
9c5f77e
Fix ice shelf initialization
MJHarrison-GFDL Aug 9, 2022
27cd343
Merge branch 'main' into main_to_dev
marshallward Aug 22, 2022
e3c71b0
+Add runtime parameter CHANNEL_DRAG_MAX_BBL_THICK
Hallberg-NOAA Aug 6, 2022
3db3882
Change porous_barrier_ptrs to allocatable
herrwang0 Apr 16, 2022
e5cfaa9
Add a control structure for porous barrier
herrwang0 Apr 16, 2022
00b48f1
Fix porous_widths loop range
herrwang0 Apr 20, 2022
6e91d02
Add a method to read a full set of porous barrier
herrwang0 Apr 21, 2022
0e25c5f
Add timer for porous barrier
herrwang0 Apr 28, 2022
bd4ae08
Add options for various eta interpolation methods
herrwang0 May 2, 2022
8243071
Re-arrange looping orders in porous_widths
herrwang0 May 2, 2022
43502d4
Split porous barrier interface and layer widths
herrwang0 May 3, 2022
016f042
Reduce unnecessary porous barrier calculations
herrwang0 May 23, 2022
9113105
Add PORBAR_ANSWER_DATE flag
herrwang0 Aug 6, 2022
b8bf337
Bugfix for uninitialized eta_[uv]
herrwang0 Aug 8, 2022
34247a9
Bugfix for allocating porous barrier variables
herrwang0 Aug 22, 2022
1c85a00
+Fix nudged OBCs for tracers (#194)
WenhaoChen89 Aug 28, 2022
575595a
Report error logs from codecov upload fail
marshallward Aug 12, 2022
9a2c92b
Obsolete the HENYEY_IGW_BACKGROUND_NEW option.
kshedstrom Aug 30, 2022
66ba6a7
Merge pull request #193 from marshallward/codecov_err_report
Hallberg-NOAA Aug 30, 2022
97dfe71
Completing the job of obsoleting something.
kshedstrom Aug 30, 2022
0e4cda9
+Add an interface filtering capability
Hallberg-NOAA Aug 13, 2022
a490004
Corrected doxygen comments for interface filter
Hallberg-NOAA Aug 15, 2022
ba9e7f1
Disable sigsetjmp for default compilation
marshallward Aug 17, 2022
03bc321
Merge pull request #196 from marshallward/sigsetjmp_default
Hallberg-NOAA Sep 8, 2022
00044b2
(*)+Rename KDML to KD_ML_TOT and restrict its use
Hallberg-NOAA Sep 1, 2022
f248112
+(*)Replace KVBBL with KV_EXTRA_BBL
Hallberg-NOAA Sep 1, 2022
a20e5f6
+Spell HARMONIC right in PORBAR_ETA_INTERP docs
Hallberg-NOAA Sep 1, 2022
ba48d9d
+Replace KVML with KV_ML_INVZ2
Hallberg-NOAA Sep 2, 2022
6ecf4e1
Refactor boundary layer code in find_coupling_coef
Hallberg-NOAA Sep 2, 2022
9c58e0f
+Add FIXED_DEPTH_LOTW_ML and LOTW_VISCOUS_ML_FLOOR
Hallberg-NOAA Sep 3, 2022
f02b1d6
+(*)Set ustar with wind_forcing_2gyre
Hallberg-NOAA Sep 5, 2022
de3f260
+Made the von Karman constant a runtime parameter
Hallberg-NOAA Sep 5, 2022
13b40a3
Merge branch 'dev/gfdl' into obs_henyey_new
Hallberg-NOAA Sep 11, 2022
6f05649
Merge pull request #200 from ESMG/obs_henyey_new
marshallward Sep 13, 2022
974e1ea
Barotropic weight vectorization
marshallward Sep 5, 2022
5d729f3
Merge pull request #202 from marshallward/btstep_wt_vec
Hallberg-NOAA Sep 14, 2022
f0d6680
Avoid extra post_data calls from vertvisc
Hallberg-NOAA Sep 13, 2022
fae71c4
*Change defaults for KV_ML_INVZ2 and 3 bug flags
Hallberg-NOAA Sep 14, 2022
be04ce6
Correct a couple of typos in BT solver
herrwang0 Sep 18, 2022
4ef14d6
Log actual BT halo size values
herrwang0 Sep 18, 2022
d88c58a
Fix hifreq BT steps diagnostics
herrwang0 Sep 19, 2022
e8ec939
FMS2: open_ASCII_file and open_namelist_file
marshallward Jul 7, 2022
6e91a74
Merge pull request #206 from marshallward/read_ascii
Hallberg-NOAA Sep 22, 2022
ffa9eeb
Merge branch 'main' into dev/gfdl
marshallward Sep 26, 2022
2e9c21e
+Add only_read_from_restarts
Hallberg-NOAA Sep 13, 2022
5201c34
+Add new runtime parameter STORE_CORIOLIS_ACCEL
Hallberg-NOAA Sep 13, 2022
9fcdce9
updates to MOM6 documentation
StephenGriffies Oct 9, 2022
d214ad8
Add netcdf-fortran to MacOS homebrew build
marshallward Oct 4, 2022
539ba09
updates to MOM6 documentation
StephenGriffies Oct 7, 2022
253262c
correct some doxygen errors related to subsections, cites
StephenGriffies Oct 7, 2022
06afa1c
correct some \cite errors
StephenGriffies Oct 7, 2022
b7018c6
edits for resolving rtd compile errors
StephenGriffies Oct 11, 2022
7fccd19
Implement spherical harmonics SAL from MPAS-Ocean
herrwang0 Jul 21, 2022
f9d5b05
Self-contained spherical harmonics module
herrwang0 Jul 28, 2022
aff923c
New module to store Love Numbers
herrwang0 Aug 4, 2022
2b9bd38
Add reproducing sum option to SHT
herrwang0 Aug 4, 2022
1c83b2d
Optimize spherical harmonics module
herrwang0 Aug 4, 2022
a2e883a
Move some SHT SAL related allocations to init
herrwang0 Sep 7, 2022
d5d1ae2
Add documentations in spherical harmonics module
herrwang0 Sep 26, 2022
a907bfd
Small modification of spherical harmonic SAL
herrwang0 Sep 28, 2022
32c2af3
+Split remap_all_state_vars into 2 routines
Hallberg-NOAA Oct 4, 2022
992f1c7
+Add new arguments to ALE_main
Hallberg-NOAA Oct 6, 2022
37acb38
Reorder dzRegrid diagnostic
Hallberg-NOAA Oct 6, 2022
d66f03c
+Split ALE_main into ALE_regrid & ALE_remap calls
Hallberg-NOAA Oct 6, 2022
cd2852a
Document variable units in core modules
Hallberg-NOAA Sep 14, 2022
181e115
*+Corrected some oblique OBC restarts
Hallberg-NOAA Sep 19, 2022
b3a95ae
+Attempt to fix an imperfect restart issue.
kshedstrom Sep 28, 2022
80e7d1c
*+Added G%OBCmaskCu and G%OBCmaskCv
Hallberg-NOAA Oct 10, 2022
84682aa
+Eliminate unused OBC arguments
Hallberg-NOAA Oct 13, 2022
7c4dfd4
Conditionally deallocate spherical harmonic fields
marshallward Nov 3, 2022
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
1 change: 1 addition & 0 deletions .github/actions/macos-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ runs:
brew update
brew install automake
brew install netcdf
brew install netcdf-fortran
brew install mpich
echo "::endgroup::"
21 changes: 17 additions & 4 deletions .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,25 @@ endif
SOURCE = \
$(foreach ext,F90 inc c h,$(wildcard $(1)/*/*.$(ext) $(1)/*/*/*.$(ext)))

MOM_SOURCE = $(call SOURCE,../src) \
$(wildcard ../config_src/infra/FMS1/*.F90) \
MOM_SOURCE = \
$(call SOURCE,../src) \
$(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/infra/FMS1/*.F90) \

TARGET_SOURCE = \
$(call SOURCE,build/target_codebase/src) \
$(wildcard build/target_codebase/config_src/drivers/solo_driver/*.F90) \
$(wildcard build/target_codebase/config_src/ext*/*.F90)

# NOTE: Current default framework is FMS1, but this could change.
ifeq ($(FRAMEWORK), fms2)
MOM_SOURCE +=$(wildcard ../config_src/infra/FMS2/*.F90)
TARGET_SOURCE += $(wildcard build/target_codebase/config_src/infra/FMS2/*.F90)
else
MOM_SOURCE += $(wildcard ../config_src/infra/FMS1/*.F90)
TARGET_SOURCE += $(wildcard build/target_codebase/config_src/infra/FMS1/*.F90)
endif

FMS_SOURCE = $(call SOURCE,deps/fms/src)


Expand Down Expand Up @@ -602,6 +613,7 @@ report.cov: run.cov codecov
2> build/cov/codecov.err \
&& echo -e "${MAGENTA}Report uploaded to codecov.${RESET}" \
|| { \
cat build/cov/codecov.err ; \
echo -e "${RED}Failed to upload report.${RESET}" ; \
if [ "$(REQUIRE_COVERAGE_UPLOAD)" = true ] ; then false ; fi ; \
}
Expand Down Expand Up @@ -740,6 +752,7 @@ report.cov.unit: build/unit/MOM_file_parser_tests.F90.gcov codecov
2> build/unit/codecov.err \
&& echo -e "${MAGENTA}Report uploaded to codecov.${RESET}" \
|| { \
cat build/unit/codecov.err ; \
echo -e "${RED}Failed to upload report.${RESET}" ; \
if [ "$(REQUIRE_COVERAGE_UPLOAD)" = true ] ; then false ; fi ; \
}
Expand Down
31 changes: 19 additions & 12 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -234,21 +234,28 @@ AC_SUBST([SRC_DIRS],
AC_CONFIG_COMMANDS(Makefile.dep, [make depend])


# setjmp verification
# POSIX verification tests
AC_LANG_PUSH([C])

# Verify that either sigsetjmp (POSIX) or __sigsetjmp (glibc) are available.
AC_CHECK_FUNC([sigsetjmp])
AS_IF([test "$ac_cv_func_sigsetjmp" == "yes"], [
SIGSETJMP_NAME="sigsetjmp"
], [
AC_CHECK_FUNC([__sigsetjmp], [
SIGSETJMP_NAME="__sigsetjmp"
], [
AC_MSG_ERROR([Could not find a symbol for sigsetjmp.])
# These symbols may be defined as macros, making them inaccessible by Fortran.
# The following exist in BSD and Linux, so we just test for them.
AC_CHECK_FUNC([setjmp], [], [AC_MSG_ERROR([Could not find setjmp.])])
AC_CHECK_FUNC([longjmp], [], [AC_MSG_ERROR([Could not find longjmp.])])
AC_CHECK_FUNC([siglongjmp], [], [AC_MSG_ERROR([Could not find siglongjmp.])])

# Determine the sigsetjmp symbol. If missing, then point to sigsetjmp_missing.
#
# Supported symbols:
# sigsetjmp POSIX, BSD libc (MacOS)
# __sigsetjmp glibc (Linux)
SIGSETJMP="sigsetjmp_missing"
for sigsetjmp_fn in sigsetjmp __sigsetjmp; do
AC_CHECK_FUNC([${sigsetjmp_fn}], [
SIGSETJMP=${sigsetjmp_fn}
break
])
])
AC_DEFINE_UNQUOTED([SIGSETJMP_NAME], ["$SIGSETJMP_NAME"])
done
AC_DEFINE_UNQUOTED([SIGSETJMP_NAME], ["${SIGSETJMP}"])

# Determine the size of jmp_buf and sigjmp_buf
AC_CHECK_SIZEOF([jmp_buf], [], [#include <setjmp.h>])
Expand Down
12 changes: 9 additions & 3 deletions config_src/drivers/FMS_cap/ocean_model_MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module ocean_model_mod
use MOM_variables, only : surface
use MOM_verticalGrid, only : verticalGrid_type
use MOM_ice_shelf, only : initialize_ice_shelf, shelf_calc_flux, ice_shelf_CS
use MOM_ice_shelf, only : initialize_ice_shelf_fluxes, initialize_ice_shelf_forces
use MOM_ice_shelf, only : add_shelf_forces, ice_shelf_end, ice_shelf_save_restart
use MOM_wave_interface, only: wave_parameters_CS, MOM_wave_interface_init
use MOM_wave_interface, only: Update_Surface_Waves
Expand Down Expand Up @@ -274,9 +275,13 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, wind_stagger, gas
if (.not.OS%is_ocean_pe) return

OS%Time = Time_in ; OS%Time_dyn = Time_in
! Call initialize MOM with an optional Ice Shelf CS which, if present triggers
! initialization of ice shelf parameters and arrays.

call initialize_MOM(OS%Time, Time_init, param_file, OS%dirs, OS%MOM_CSp, &
OS%restart_CSp, Time_in, offline_tracer_mode=OS%offline_tracer_mode, &
diag_ptr=OS%diag, count_calls=.true., waves_CSp=OS%Waves)
diag_ptr=OS%diag, count_calls=.true., ice_shelf_CSp=OS%ice_shelf_CSp, &
waves_CSp=OS%Waves)
call get_MOM_state_elements(OS%MOM_CSp, G=OS%grid, GV=OS%GV, US=OS%US, C_p=OS%C_p, &
C_p_scaled=OS%fluxes%C_p, use_temp=use_temperature)

Expand Down Expand Up @@ -372,9 +377,10 @@ subroutine ocean_model_init(Ocean_sfc, OS, Time_init, Time_in, wind_stagger, gas
endif

if (OS%use_ice_shelf) then
call initialize_ice_shelf(param_file, OS%grid, OS%Time, OS%ice_shelf_CSp, &
OS%diag, OS%forces, OS%fluxes)
call initialize_ice_shelf_fluxes(OS%ice_shelf_CSp, OS%grid, OS%US, OS%fluxes)
call initialize_ice_shelf_forces(OS%ice_shelf_CSp, OS%grid, OS%US, OS%forces)
endif

if (OS%icebergs_alter_ocean) then
call marine_ice_init(OS%Time, OS%grid, param_file, OS%diag, OS%marine_ice_CSp)
if (.not. OS%use_ice_shelf) &
Expand Down
72 changes: 41 additions & 31 deletions config_src/drivers/solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module MOM_surface_forcing
real :: gyres_taux_cos_amp !< The amplitude of cosine wind stress gyres [R L Z T-1 ~> Pa], if WIND_CONFIG=='gyres'
real :: gyres_taux_n_pis !< The number of sine lobes in the basin if WIND_CONFIG=='gyres'
integer :: answer_date !< This 8-digit integer gives the approximate date with which the order
!! of arithmetic and and expressions were added to the code.
!! of arithmetic and expressions were added to the code.
!! Dates before 20190101 use original answers.
!! Dates after 20190101 use a form of the gyre wind stresses that are
!! rotationally invariant and more likely to be the same between compilers.
Expand Down Expand Up @@ -161,8 +161,8 @@ module MOM_surface_forcing
character(len=200) :: salinityrestore_file = '' !< The file from which to read the sea surface
!! salinity to restore toward

character(len=80) :: stress_x_var = '' !< X-windstress variable name in the input file
character(len=80) :: stress_y_var = '' !< Y-windstress variable name in the input file
character(len=80) :: stress_x_var = '' !< X-wind stress variable name in the input file
character(len=80) :: stress_y_var = '' !< Y-wind stress variable name in the input file
character(len=80) :: ustar_var = '' !< ustar variable name in the input file
character(len=80) :: LW_var = '' !< longwave heat flux variable name in the input file
character(len=80) :: SW_var = '' !< shortwave heat flux variable name in the input file
Expand Down Expand Up @@ -447,6 +447,8 @@ subroutine wind_forcing_2gyre(sfc_state, forces, day, G, US, CS)
forces%tauy(i,J) = 0.0
enddo ; enddo

if (associated(forces%ustar)) call stresses_to_ustar(forces, G, US, CS)

call callTree_leave("wind_forcing_2gyre")
end subroutine wind_forcing_2gyre

Expand Down Expand Up @@ -484,6 +486,8 @@ subroutine wind_forcing_1gyre(sfc_state, forces, day, G, US, CS)
forces%tauy(i,J) = 0.0
enddo ; enddo

if (associated(forces%ustar)) call stresses_to_ustar(forces, G, US, CS)

call callTree_leave("wind_forcing_1gyre")
end subroutine wind_forcing_1gyre

Expand All @@ -499,8 +503,6 @@ subroutine wind_forcing_gyres(sfc_state, forces, day, G, US, CS)
!! a previous surface_forcing_init call
! Local variables
real :: PI ! A common irrational number, 3.1415926535... [nondim]
real :: I_rho ! The inverse of the reference density times a ratio of scaling
! factors [Z L-1 R-1 ~> m3 kg-1]
real :: y ! The latitude relative to the south normalized by the domain extent [nondim]
integer :: i, j, is, ie, js, je, Isq, Ieq, Jsq, Jeq

Expand Down Expand Up @@ -530,12 +532,7 @@ subroutine wind_forcing_gyres(sfc_state, forces, day, G, US, CS)
forces%taux(i-1,j)*forces%taux(i-1,j) + forces%taux(i,j)*forces%taux(i,j)))/CS%Rho0) )
enddo ; enddo
else
I_rho = US%L_to_Z / CS%Rho0
do j=js,je ; do i=is,ie
forces%ustar(i,j) = sqrt( (CS%gust_const + &
sqrt(0.5*((forces%tauy(i,J-1)**2 + forces%tauy(i,J)**2) + &
(forces%taux(I-1,j)**2 + forces%taux(I,j)**2))) ) * I_rho )
enddo ; enddo
call stresses_to_ustar(forces, G, US, CS)
endif

call callTree_leave("wind_forcing_gyres")
Expand All @@ -558,8 +555,6 @@ subroutine Neverworld_wind_forcing(sfc_state, forces, day, G, US, CS)
real :: Pa_to_RLZ_T2 ! A unit conversion factor from Pa to the internal units
! for wind stresses [R Z L T-2 Pa-1 ~> 1]
real :: PI ! A common irrational number, 3.1415926535... [nondim]
real :: I_rho ! The inverse of the reference density times a ratio of scaling
! factors [Z L-1 R-1 ~> m3 kg-1]
real :: y ! The latitude relative to the south normalized by the domain extent [nondim]
real :: tau_max ! The magnitude of the wind stress [R Z L T-2 ~> Pa]
real :: off ! An offset in the relative latitude [nondim]
Expand Down Expand Up @@ -602,14 +597,7 @@ subroutine Neverworld_wind_forcing(sfc_state, forces, day, G, US, CS)
enddo ; enddo

! Set the surface friction velocity, in units of [Z T-1 ~> m s-1]. ustar is always positive.
if (associated(forces%ustar)) then
I_rho = US%L_to_Z / CS%Rho0
do j=js,je ; do i=is,ie
forces%ustar(i,j) = sqrt( (CS%gust_const + &
sqrt(0.5*((forces%tauy(i,J-1)**2 + forces%tauy(i,J)**2) + &
(forces%taux(I-1,j)**2 + forces%taux(I,j)**2))) ) * I_rho )
enddo ; enddo
endif
if (associated(forces%ustar)) call stresses_to_ustar(forces, G, US, CS)

end subroutine Neverworld_wind_forcing

Expand All @@ -625,8 +613,6 @@ subroutine scurve_wind_forcing(sfc_state, forces, day, G, US, CS)
!! a previous surface_forcing_init call
! Local variables
integer :: i, j, kseg
real :: I_rho ! The inverse of the reference density times a ratio of scaling
! factors [Z L-1 R-1 ~> m3 kg-1]
real :: y_curve ! The latitude relative to the southern end of a curve segment [degreesN]
real :: L_curve ! The latitudinal extent of a curve segment [degreesN]
! real :: ydata(7) = (/ -70., -45., -15., 0., 15., 45., 70. /)
Expand Down Expand Up @@ -657,14 +643,7 @@ subroutine scurve_wind_forcing(sfc_state, forces, day, G, US, CS)
enddo ; enddo

! Set the surface friction velocity, in units of [Z T-1 ~> m s-1]. ustar is always positive.
if (associated(forces%ustar)) then
I_rho = US%L_to_Z / CS%Rho0
do j=G%jsc,G%jec ; do i=G%isc,G%iec
forces%ustar(i,j) = sqrt( (CS%gust_const + &
sqrt(0.5*((forces%tauy(i,J-1)**2 + forces%tauy(i,J)**2) + &
(forces%taux(I-1,j)**2 + forces%taux(I,j)**2))) ) * I_rho )
enddo ; enddo
endif
if (associated(forces%ustar)) call stresses_to_ustar(forces, G, US, CS)

end subroutine scurve_wind_forcing

Expand Down Expand Up @@ -892,6 +871,37 @@ subroutine wind_forcing_by_data_override(sfc_state, forces, day, G, US, CS)
call callTree_leave("wind_forcing_by_data_override")
end subroutine wind_forcing_by_data_override

!> Translate the wind stresses into the friction velocity, including effects of background gustiness.
subroutine stresses_to_ustar(forces, G, US, CS)
type(mech_forcing), intent(inout) :: forces !< A structure with the driving mechanical forces
type(ocean_grid_type), intent(in) :: G !< Grid structure.
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
type(surface_forcing_CS), pointer :: CS !< pointer to control structure returned by
!! a previous surface_forcing_init call
! Local variables
real :: I_rho ! The inverse of the reference density times a ratio of scaling
! factors [Z L-1 R-1 ~> m3 kg-1]
integer :: i, j, is, ie, js, je

is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec

I_rho = US%L_to_Z / CS%Rho0

if (CS%read_gust_2d) then
do j=js,je ; do i=is,ie
forces%ustar(i,j) = sqrt( (CS%gust(i,j) + &
sqrt(0.5*((forces%tauy(i,j-1)**2 + forces%tauy(i,j)**2) + &
(forces%taux(i-1,j)**2 + forces%taux(i,j)**2))) ) * I_rho )
enddo ; enddo
else
do j=js,je ; do i=is,ie
forces%ustar(i,j) = sqrt( (CS%gust_const + &
sqrt(0.5*((forces%tauy(i,J-1)**2 + forces%tauy(i,J)**2) + &
(forces%taux(I-1,j)**2 + forces%taux(I,j)**2))) ) * I_rho )
enddo ; enddo
endif

end subroutine stresses_to_ustar

!> Specifies zero surface buoyancy fluxes from input files.
subroutine buoyancy_forcing_from_files(sfc_state, fluxes, day, dt, G, US, CS)
Expand Down
Loading