Skip to content

Commit

Permalink
(*)Correct scaling of DT_OBC_SEG_UPDATE_OBGC
Browse files Browse the repository at this point in the history
  Added a missing dimensional rescaling factor in the get_param call for the
recently added variable DT_OBC_SEG_UPDATE_OBGC in initialize_MOM, which would
have caused certain cases to fail the dimensional consistency tests.  All
answers are bitwise identical in cases that do not use dimensional rescaling,
but answers will change (and be corrected) in some cases that use dimensional
consistency tests.
  • Loading branch information
Hallberg-NOAA committed Dec 19, 2022
1 parent a644fb6 commit d07f26d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ module MOM
!! calculated, and if it is 0, dtbt is calculated every step.
type(time_type) :: dtbt_reset_interval !< A time_time representation of dtbt_reset_period.
type(time_type) :: dtbt_reset_time !< The next time DTBT should be calculated.
real :: dt_obc_seg_period !< The time interval between OBC segment updates for OBGC tracers
real :: dt_obc_seg_period !< The time interval between OBC segment updates for OBGC
!! tracers [T ~> s], or a negative value if the segment
!! data are time-invarant, or zero to update the OBGC
!! segment data with every call to update_OBC_segment_data.
type(time_type) :: dt_obc_seg_interval !< A time_time representation of dt_obc_seg_period.
type(time_type) :: dt_obc_seg_time !< The next time OBC segment update is applied to OBGC tracers.

Expand Down Expand Up @@ -2186,12 +2189,11 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
units="s", default=default_val, do_not_read=(dtbt > 0.0))
endif

CS%dt_obc_seg_period = -1.0
call get_param(param_file, "MOM", "DT_OBC_SEG_UPDATE_OBGC", CS%dt_obc_seg_period, &
"The time between OBC segment data updates for OBGC tracers. "//&
"This must be an integer multiple of DT and DT_THERM. "//&
"The default is set to DT.", &
units="s", default=US%T_to_s*CS%dt, do_not_log=.not.associated(CS%OBC))
units="s", default=US%T_to_s*CS%dt, scale=US%s_to_T, do_not_log=.not.associated(CS%OBC))

! This is here in case these values are used inappropriately.
use_frazil = .false. ; bound_salinity = .false.
Expand Down

0 comments on commit d07f26d

Please sign in to comment.