Skip to content

Commit 0ff0daa

Browse files
Merge pull request mom-ocean#87 from Hallberg-NOAA/stop_logging_NEW_SPONGES
+Stop logging NEW_SPONGES
2 parents 966d50f + 2993f1b commit 0ff0daa

2 files changed

Lines changed: 29 additions & 13 deletions

File tree

src/diagnostics/MOM_obsolete_params.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ subroutine find_obsolete_params(param_file)
9393
call obsolete_real(param_file, "MIN_Z_DIAG_INTERVAL")
9494
call obsolete_char(param_file, "Z_OUTPUT_GRID_FILE")
9595

96+
! This parameter is on the to-do list to be obsoleted.
97+
! call obsolete_logical(param_file, "NEW_SPONGES", hint="Use INTERPOLATE_SPONGE_TIME_SPACE instead.")
98+
9699
! Write the file version number to the model log.
97100
call log_version(param_file, mdl, version)
98101

src/initialization/MOM_state_initialization.F90

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,10 +1895,9 @@ subroutine initialize_sponges_file(G, GV, US, use_temperature, tv, u, v, depth_t
18951895
character(len=200) :: filename, inputdir ! Strings for file/path and path.
18961896

18971897
logical :: use_ALE ! True if ALE is being used, False if in layered mode
1898-
logical :: time_space_interp_sponge ! True if using sponge data which
1899-
! need to be interpolated from in both the horizontal dimension and in
1900-
! time prior to vertical remapping.
1901-
1898+
logical :: new_sponge_param ! The value of a deprecated parameter.
1899+
logical :: time_space_interp_sponge ! If true use sponge data that need to be interpolated in both
1900+
! the horizontal dimension and in time prior to vertical remapping.
19021901

19031902
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = GV%ke
19041903
isd = G%isd ; ied = G%ied ; jsd = G%jsd ; jed = G%jed
@@ -1951,20 +1950,34 @@ subroutine initialize_sponges_file(G, GV, US, use_temperature, tv, u, v, depth_t
19511950
"SPONGE_UV_DAMPING_FILE for the velocities.", default=Idamp_var)
19521951
endif
19531952
call get_param(param_file, mdl, "USE_REGRIDDING", use_ALE, do_not_log = .true.)
1954-
time_space_interp_sponge = .false.
1955-
call get_param(param_file, mdl, "NEW_SPONGES", time_space_interp_sponge, &
1953+
1954+
!### NEW_SPONGES should be obsoleted properly, rather than merely deprecated, at which
1955+
! point only the else branch of the new_sponge_param block would be retained.
1956+
call get_param(param_file, mdl, "NEW_SPONGES", new_sponge_param, &
19561957
"Set True if using the newer sponging code which "//&
19571958
"performs on-the-fly regridding in lat-lon-time.",&
1958-
"of sponge restoring data.", default=.false.)
1959-
if (time_space_interp_sponge) then
1960-
call MOM_error(WARNING, " initialize_sponges: NEW_SPONGES has been deprecated. "//&
1959+
"of sponge restoring data.", default=.false., do_not_log=.true.)
1960+
if (new_sponge_param) then
1961+
call get_param(param_file, mdl, "INTERPOLATE_SPONGE_TIME_SPACE", time_space_interp_sponge, &
1962+
"If True, perform on-the-fly regridding in lat-lon-time of sponge restoring data.", &
1963+
default=.true., do_not_log=.true.)
1964+
if (.not.time_space_interp_sponge) then
1965+
call MOM_error(FATAL, " initialize_sponges: NEW_SPONGES has been deprecated, "//&
1966+
"but is set to true inconsistently with INTERPOLATE_SPONGE_TIME_SPACE. "//&
1967+
"Remove the NEW_SPONGES input line.")
1968+
else
1969+
call MOM_error(WARNING, " initialize_sponges: NEW_SPONGES has been deprecated. "//&
19611970
"Please use INTERPOLATE_SPONGE_TIME_SPACE instead. Setting "//&
19621971
"INTERPOLATE_SPONGE_TIME_SPACE = True.")
1972+
endif
1973+
call log_param(param_file, mdl, "INTERPOLATE_SPONGE_TIME_SPACE", time_space_interp_sponge, &
1974+
"If True, perform on-the-fly regridding in lat-lon-time of sponge restoring data.", &
1975+
default=.true.)
1976+
else
1977+
call get_param(param_file, mdl, "INTERPOLATE_SPONGE_TIME_SPACE", time_space_interp_sponge, &
1978+
"If True, perform on-the-fly regridding in lat-lon-time of sponge restoring data.", &
1979+
default=.false.)
19631980
endif
1964-
call get_param(param_file, mdl, "INTERPOLATE_SPONGE_TIME_SPACE", time_space_interp_sponge, &
1965-
"Set True if using the newer sponging code which "//&
1966-
"performs on-the-fly regridding in lat-lon-time.",&
1967-
"of sponge restoring data.", default=time_space_interp_sponge)
19681981

19691982

19701983
! Read in sponge damping rate for tracers

0 commit comments

Comments
 (0)