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

Patch main pr net fw sign bug #5

Closed
wants to merge 77 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
a9d5b2e
Adding new MLD diagnostic
breichl Apr 14, 2020
34d221c
Merge working tides version with latest dev/gfdl
andrew-c-ross Jul 29, 2020
a26a386
Should be uppercase
andrew-c-ross Jul 29, 2020
1539071
Add tide prefix to nodal ref date
andrew-c-ross Jul 29, 2020
ad95be5
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Jul 31, 2020
4c0f583
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Aug 13, 2020
726f70b
Revert to always allocating 1. Fixes failing tests
andrew-c-ross Aug 13, 2020
418d5cc
Add missing update of SSH when there is no ramp
andrew-c-ross Aug 18, 2020
7b2dcd9
Support setting tides by value=
andrew-c-ross Aug 18, 2020
656c535
Remove unused bt_vel
andrew-c-ross Aug 18, 2020
e3db1b8
Include tides in rotation. Currently fails custom rotation tests.
andrew-c-ross Aug 19, 2020
aa648c7
Rename OBC_N_TIDE_CONSTITUENTS to have tide prefix first
andrew-c-ross Aug 19, 2020
217df96
Fix bug: nest tidal calculation within loop
andrew-c-ross Aug 24, 2020
7bfc146
Should default to prev behavior of not using phase correction
andrew-c-ross Aug 25, 2020
ff13dc2
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Aug 25, 2020
6e6f7b4
Improve compatibility with code style guide
andrew-c-ross Aug 25, 2020
c7f42c8
Improve code style
andrew-c-ross Aug 25, 2020
3780b5c
Note minor differences in formula
andrew-c-ross Aug 27, 2020
e4f6624
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Aug 27, 2020
31f40a5
Fix typos
andrew-c-ross Aug 27, 2020
0804b04
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Aug 28, 2020
bbb6736
Correct documentation
andrew-c-ross Aug 28, 2020
3efb4b2
Merge branch 'dev/gfdl' into tidal_boundary
andrew-c-ross Aug 28, 2020
90c5625
Fix bug when equilibrium phase correction was not used and nodal refe…
andrew-c-ross Aug 31, 2020
aff69f2
Fix assorted typos and spaces
andrew-c-ross Aug 31, 2020
2ffaa30
Use time_type for reference times
andrew-c-ross Sep 10, 2020
3ea831b
Move longitudes to own type
andrew-c-ross Sep 10, 2020
b3ac797
Document some units
andrew-c-ross Sep 10, 2020
4314a57
Merge branch 'dev/gfdl' into tidal_boundary
Hallberg-NOAA Sep 18, 2020
6ce763d
Merge branch 'dev/gfdl' into tidal_boundary
Hallberg-NOAA Sep 21, 2020
1db8ec5
Autoconf: 2.63 support
marshallward Sep 22, 2020
e782c42
Autoconf cleanup
marshallward Sep 22, 2020
45991b7
Merge w/ dev/gfdl, 2 minor conflicts.
breichl Sep 24, 2020
b2c78be
Setting energy values for new MLD diagnostic to be run-time parameters.
breichl Sep 24, 2020
9fef140
Merge remote-tracking branch 'origin/dev/gfdl' into user/bgr/PE_MLD_Diag
breichl Sep 24, 2020
1dcebcd
Fix deleted empty line at beginning of MOM_diabatic_aux
breichl Sep 24, 2020
de89f6a
Remove unused iteration tracking integer
breichl Sep 24, 2020
ddd98da
Adding details of energy used for MLD_EN to NetCDF variable description
breichl Sep 24, 2020
73dc15f
Style updates to energy MLD calculation
breichl Sep 25, 2020
2ab5e96
MOM_sum_output: Reproducibility fix to energy
marshallward Sep 25, 2020
74ad1f6
Merge branch 'dev/gfdl' into ac263_support
adcroft Sep 25, 2020
36ca92f
Merge pull request #1213 from marshallward/ac263_support
adcroft Sep 25, 2020
701cb90
Merge branch 'ke_total_repro' of https://github.com/marshallward/MOM6…
adcroft Sep 25, 2020
7cb606e
Merge branch 'marshallward-ke_total_repro' into dev/gfdl
adcroft Sep 25, 2020
974a25a
Diagnostic for depth-averaged zonal acceleration from diapycnal mixing.
hmkhatri Sep 28, 2020
a326e03
Merge branch 'dev/gfdl' into tidal_boundary
Hallberg-NOAA Sep 28, 2020
dfc2885
Removed trailing spaces
hmkhatri Sep 29, 2020
22cb93e
spaces correction in loop
hmkhatri Sep 29, 2020
9dcb866
Idamp_var change
hmkhatri Sep 29, 2020
a5399a7
Merge branch 'dev/gfdl' into user/bgr/PE_MLD_Diag
marshallward Sep 29, 2020
12e603f
Adding tolerance check option in MOM_kappa_shear
breichl Sep 30, 2020
1634cee
Bugfix for an itt number iteration check in MOM_kappa_shear
breichl Sep 30, 2020
50d10ad
Fixing unit scaling issue where m_to_Z should have been m_to_L
breichl Oct 1, 2020
67da29c
Merge branch 'user/bgr/PE_MLD_Diag' of github.com:breichl/MOM6 into u…
breichl Oct 1, 2020
913830b
Open boundary forcing will also use TIDE_*_FREQ parameters if they ar…
andrew-c-ross Oct 2, 2020
81cf30a
Rewrite the energy MLD computation so it can use Newton's Method iter…
breichl Oct 2, 2020
d7b8e17
Dimension: Diagnostic fixes
marshallward Oct 5, 2020
cb82761
Bugfix: DT parsing in MOM_hor_visc
marshallward Oct 5, 2020
8bf3541
Delete spurious logical check
breichl Oct 6, 2020
cbe88ae
min_grid_sp_h[24] across PEs
marshallward Oct 6, 2020
bc5e023
(*)Add a halo update to fix VERTEX_SHEAR solutions
Hallberg-NOAA Oct 6, 2020
a451c87
Merge pull request #1215 from breichl/user/bgr/PE_MLD_Diag
marshallward Oct 6, 2020
a7d64b3
Merge branch 'dev/gfdl' into tidal_boundary
marshallward Oct 7, 2020
f52f70b
Merge pull request #1191 from andrew-c-ross/tidal_boundary
marshallward Oct 7, 2020
f881ed6
Merge branch 'dev/gfdl' into user/bgr/JHL_threshold_option
marshallward Oct 7, 2020
48da975
Merge pull request #1219 from breichl/user/bgr/JHL_threshold_option
marshallward Oct 8, 2020
1f02e4e
Merge branch 'dev/gfdl' into tc4_dim_fixes
Hallberg-NOAA Oct 8, 2020
921e7de
Merge branch 'dev/gfdl' into vertex_shear_halo2
Hallberg-NOAA Oct 14, 2020
fd0f227
+Change default for SPONGE_IDAMP_VAR to enable PR
Hallberg-NOAA Oct 15, 2020
f3196d3
Merge pull request #1220 from marshallward/tc4_dim_fixes
Hallberg-NOAA Oct 15, 2020
1b5d79b
Merge branch 'dev/gfdl' into add_diagnostic
Hallberg-NOAA Oct 15, 2020
58a662b
Merge pull request #1217 from hmkhatri/add_diagnostic
marshallward Oct 15, 2020
8ffa2d4
Merge branch 'dev/gfdl' into vertex_shear_halo2
marshallward Oct 15, 2020
3049856
Merge pull request #1221 from Hallberg-NOAA/vertex_shear_halo2
marshallward Oct 15, 2020
ca236a3
Sponge file init patch (#1222)
MJHarrison-GFDL Oct 16, 2020
136afce
Change bounding of Kv_BBL and bbl_thick in set_viscous_BBL() (#1223)
adcroft Oct 16, 2020
2bf92dd
Change default for USE_NET_FW_ADJUSTMENT_SIGN_BUG in drivers
adcroft Oct 19, 2020
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
21 changes: 17 additions & 4 deletions ac/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# - We would probably run this inside of a script to avoid the explicit
# dependency on git.

AC_PREREQ([2.63])

AC_INIT(
[MOM6],
[ ],
Expand Down Expand Up @@ -102,11 +104,22 @@ AS_IF(


# OpenMP configuration
AC_OPENMP

# NOTE: AC_OPENMP fails on `Fortran` for Autoconf <2.69 due to a m4 bug.
# For older versions, we test against CC and use the result for FC.
m4_version_prereq([2.69], [AC_OPENMP], [
AC_LANG_PUSH([C])
AC_OPENMP
AC_LANG_POP([C])
OPENMP_FCFLAGS="$OPENMP_CFLAGS"
])

# NOTE: Only apply OpenMP flags if explicitly enabled.
AS_IF(
[test "$enable_openmp" = yes],
[FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_FCFLAGS"])
[test "$enable_openmp" = yes], [
FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_FCFLAGS"
])


# FMS support
Expand Down
40 changes: 30 additions & 10 deletions ac/deps/configure.fms.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Autoconf configuration
AC_PREREQ([2.63])

AC_INIT(
[FMS],
[ ],
Expand All @@ -15,11 +17,11 @@ CC=$MPICC

# FMS configuration

# Linux and OSX have a gettid system call, but it is not implemented in older
# Linux and macOS have a gettid system call, but it is not implemented in older
# glibc implementations. When unavailable, a native syscall is used.
#
# On Linux, this is defined in unistd.h as __NR_gettid, and FMS is hard-coded
# to use this value. In OS X, this is defined in sys/syscall.h as SYS_gettid,
# to use this value. In macOS, this is defined in sys/syscall.h as SYS_gettid,
# so we override this macro if __NR_gettid is unavailable.
AC_CHECK_FUNCS([gettid], [], [
AC_MSG_CHECKING([if __NR_gettid must be redefined])
Expand Down Expand Up @@ -98,15 +100,31 @@ AS_IF(


# OpenMP configuration
AC_OPENMP

# NOTE: AC_OPENMP fails in Autoconf <2.69 when LANG is Fortran or Fortran 77.
# For older versions, we test against CC and use the result for FC.
m4_version_prereq([2.69], [AC_OPENMP], [
AC_LANG_PUSH([C])
AC_OPENMP
AC_LANG_POP([C])
OPENMP_FCFLAGS="$OPENMP_CFLAGS"
])

# NOTE: Only apply OpenMP flags if explicitly enabled.
AS_IF(
[test "$enable_openmp" = yes],
[FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_FCFLAGS"])
[test "$enable_openmp" = yes], [
FCFLAGS="$FCFLAGS $OPENMP_FCFLAGS"
LDFLAGS="$LDFLAGS $OPENMP_FCFLAGS"
])


# Unlimited line length
AC_FC_LINE_LENGTH([unlimited])
# Unlimited line length (2.67)
# AC_FC_LINE_LENGTH was added in 2.67.
m4_version_prereq([2.67],
[AC_FC_LINE_LENGTH([unlimited])],
[AX_FC_LINE_LENGTH([unlimited])]
)


# Allow invaliz BOZ assignment
AX_FC_ALLOW_INVALID_BOZ
Expand Down Expand Up @@ -141,12 +159,14 @@ AS_IF([test -z "$MKMF"], [
# MKMF commands
AC_CONFIG_COMMANDS([path_names],
[${LIST_PATHS} -l ${srcdir}],
[LIST_PATHS=${LIST_PATHS}])
[LIST_PATHS=${LIST_PATHS}]
)


AC_CONFIG_COMMANDS([mkmf],
[${MKMF} -p libFMS.a -m Makefile.mkmf path_names],
[MKMF=${MKMF}])
[MKMF=${MKMF}]
)


# Prepare output
Expand Down
18 changes: 9 additions & 9 deletions ac/deps/m4/ax_fc_cray_pointer.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ dnl
AC_DEFUN([AX_FC_CRAY_POINTER], [
AC_LANG_ASSERT([Fortran])
AC_MSG_CHECKING([for $FC option to support Cray pointers])
AC_CACHE_VAL([ac_cv_prog_fc_cray_ptr], [
ac_cv_prog_fc_cray_ptr='unknown'
AC_CACHE_VAL([ac_cv_fc_cray_ptr], [
ac_cv_fc_cray_ptr='unknown'
ac_save_FCFLAGS=$FCFLAGS
for ac_option in none -fcray-pointer -Mcray=pointer; do
test "$ac_option" != none && FCFLAGS="$ac_save_FCFLAGS $ac_option"
Expand All @@ -29,21 +29,21 @@ AC_DEFUN([AX_FC_CRAY_POINTER], [
integer aptr(2)
pointer (iptr, aptr)
])],
[ac_cv_prog_fc_cray_ptr=$ac_option],
[ac_cv_fc_cray_ptr=$ac_option],
)
FCFLAGS=$ac_save_FCFLAGS
AS_IF([test "$ac_cv_prog_fc_cray_ptr" != unknown], [break])
AS_IF([test "$ac_cv_fc_cray_ptr" != unknown], [break])
done
])
AS_CASE([ac_cv_prog_fc_cray_ptr],
AS_CASE([ac_cv_fc_cray_ptr],
[none], [AC_MSG_RESULT([none_needed])],
[unknown], [AC_MSG_RESULT([unsupported])],
[AC_MSG_RESULT([$ac_cv_prog_fc_cray_ptr])]
[AC_MSG_RESULT([$ac_cv_fc_cray_ptr])]
)
AS_IF([test "$ac_cv_prog_fc_cray_ptr" != unknown], [
AS_IF([test "$ac_cv_fc_cray_ptr" != unknown], [
m4_default([$1], [
AS_IF([test "$ac_cv_prog_fc_cray_ptr" != none],
[FCFLAGS="$FCFLAGS $ac_cv_prog_fc_cray_ptr"]
AS_IF([test "$ac_cv_fc_cray_ptr" != none],
[FCFLAGS="$FCFLAGS $ac_cv_fc_cray_ptr"]
)
])],
[m4_default([$2], [AC_MSG_ERROR(["$FC does not support Cray pointers"])])]
Expand Down
101 changes: 101 additions & 0 deletions ac/deps/m4/ax_fc_line_length.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# AX_FC_LINE_LENGTH([LENGTH], [ACTION-IF-SUCCESS],
# [ACTION-IF-FAILURE = FAILURE])
# ------------------------------------------------
# This is a backport of the AC_FC_LINE_LENGTH macro in Autoconf 2.67 and newer.
# Comments below are from the Autoconf 2.69 implementation.
#
# Look for a compiler flag to make the Fortran (FC) compiler accept long lines
# in the current (free- or fixed-format) source code, and adds it to FCFLAGS.
# The optional LENGTH may be 80, 132 (default), or `unlimited' for longer
# lines. Note that line lengths above 250 columns are not portable, and some
# compilers (hello ifort) do not accept more than 132 columns at least for
# fixed format. Call ACTION-IF-SUCCESS (defaults to nothing) if successful
# (i.e. can compile code using new extension) and ACTION-IF-FAILURE (defaults
# to failing with an error message) if not. (Defined via DEFUN_ONCE to
# prevent flag from being added to FCFLAGS multiple times.)
# You should call AC_FC_FREEFORM or AC_FC_FIXEDFORM to set the desired format
# prior to using this macro.
#
# The known flags are:
# -f{free,fixed}-line-length-N with N 72, 80, 132, or 0 or none for none.
# -ffree-line-length-none: GNU gfortran
# -ffree-line-length-huge: g95 (also -ffixed-line-length-N as above)
# -qfixed=132 80 72: IBM compiler (xlf)
# -Mextend: Cray
# -132 -80 -72: Intel compiler (ifort)
# Needs to come before -extend_source because ifort
# accepts that as well with an optional parameter and
# doesn't fail but only warns about unknown arguments.
# -extend_source: SGI compiler
# -W, -WNN (132, 80, 72): Absoft Fortran
# +es, +extend_source: HP Fortran (254 in either form, default is 72 fixed,
# 132 free)
# -w, (-)-wide: Lahey/Fujitsu Fortran (255 cols in fixed form)
# -e: Sun Fortran compiler (132 characters)
# -132: NAGWare
# -72, -f, -Wf,-f: f2c (a weak form of "free-form" and long lines).
# /XLine: Open Watcom

AC_DEFUN_ONCE([AX_FC_LINE_LENGTH], [
AC_LANG_ASSERT([Fortran])
m4_case(m4_default([$1], [132]),
[unlimited], [
ac_fc_line_len_string=unlimited
ac_fc_line_len=0
ac_fc_line_length_test='
subroutine longer_than_132(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,'\
'arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19)'
],
[132], [
ac_fc_line_len=132
ac_fc_line_length_test='
subroutine longer_than_80(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,'\
'arg10)'
],
[80], [
ac_fc_line_len=80
ac_fc_line_length_test='
subroutine longer_than_72(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)'
],
[m4_warning([Invalid length argument `$1'])]
)
: ${ac_fc_line_len_string=$ac_fc_line_len}
AC_MSG_CHECKING([for Fortran flag needed to accept $ac_fc_line_len_string column source lines])
AC_CACHE_VAL([ac_cv_fc_line_length], [
ac_cv_fc_line_length=unknown
ac_save_FCFLAGS=$FCFLAGS
for ac_flag in none \
-ffree-line-length-none \
-ffixed-line-length-none \
-ffree-line-length-huge \
-ffree-line-length-$ac_fc_line_len \
-ffixed-line-length-$ac_fc_line_len \
-qfixed=$ac_fc_line_len \
-Mextend \
-$ac_fc_line_len \
-extend_source \
-W$ac_fc_line_len \
-W +extend_source +es -wide --wide -w -e -f -Wf,-f -xline
do
test "$ac_flag" != none && FCFLAGS="$ac_save_FCFLAGS $ac_flag"
AC_COMPILE_IFELSE([$ac_fc_line_length_test
end subroutine
], [ac_cv_fc_line_length=$ac_flag]
)
FCFLAGS=$ac_save_FCFLAGS
dnl TODO: Remove conftest.{err,$ac_objext,$ac_ext} ??
AS_IF([test "$ac_cv_fc_line_length" != unknown], [break])
done
])
AC_MSG_RESULT([$ac_cv_fc_line_length])
AS_IF([test "$ac_cv_fc_line_length" != unknown], [
m4_default([$2], [
AS_IF([test "$ac_cv_fc_line_length" != none], [
FCFLAGS="$FCFLAGS $ac_cv_fc_line_length"
])
])], [
m4_default([$3], [
AC_MSG_ERROR([Fortran does not accept long source lines], 77)
])
])
])
2 changes: 1 addition & 1 deletion config_src/mct_driver/mom_surface_forcing_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.true.)
"the net fresh-water.", default=.false.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_BY_SCALING", &
CS%adjust_net_fresh_water_by_scaling, &
"If true, adjustments to net fresh water to achieve zero net are "//&
Expand Down
2 changes: 1 addition & 1 deletion config_src/nuopc_driver/mom_surface_forcing_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, restore_salt,
call get_param(param_file, mdl, "USE_NET_FW_ADJUSTMENT_SIGN_BUG", &
CS%use_net_FW_adjustment_sign_bug, &
"If true, use the wrong sign for the adjustment to "//&
"the net fresh-water.", default=.true.)
"the net fresh-water.", default=.false.)
call get_param(param_file, mdl, "ADJUST_NET_FRESH_WATER_BY_SCALING", &
CS%adjust_net_fresh_water_by_scaling, &
"If true, adjustments to net fresh water to achieve zero net are "//&
Expand Down
7 changes: 5 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1250,10 +1250,13 @@ subroutine step_MOM_thermo(CS, G, GV, US, u, v, h, tv, fluxes, dtdia, &
call apply_oda_tracer_increments(US%T_to_s*dtdia,G,tv,h,CS%odaCS)
endif

if (associated(fluxes%p_surf)) then
if (associated(fluxes%p_surf) .or. associated(fluxes%p_surf_full)) then
call extract_diabatic_member(CS%diabatic_CSp, diabatic_halo=halo_sz)
if (halo_sz > 0) then
call pass_var(fluxes%p_surf, G%Domain, clock=id_clock_pass, halo=halo_sz)
if (associated(fluxes%p_surf_full)) &
call pass_var(fluxes%p_surf_full, G%Domain, &
clock=id_clock_pass, halo=halo_sz, complete=.not.associated(fluxes%p_surf))
call pass_var(fluxes%p_surf, G%Domain, clock=id_clock_pass, halo=halo_sz, complete=.true.)
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_boundary_update.F90
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ subroutine update_OBC_data(OBC, G, GV, US, tv, h, CS, Time)
call shelfwave_set_OBC_data(OBC, CS%shelfwave_OBC_CSp, G, h, Time)
if (CS%use_dyed_channel) &
call dyed_channel_update_flow(OBC, CS%dyed_channel_OBC_CSp, G, Time)
if (OBC%needs_IO_for_data) &
if (OBC%needs_IO_for_data .or. OBC%add_tide_constituents) &
call update_OBC_segment_data(G, GV, US, OBC, tv, h, Time)

end subroutine update_OBC_data
Expand Down
Loading