Skip to content

Commit

Permalink
Merge pull request mom-ocean#1360 from Hallberg-NOAA/fewer_timelevels
Browse files Browse the repository at this point in the history
Remove inappropriate timelevel arguments
  • Loading branch information
marshallward authored Mar 31, 2021
2 parents 813fc79 + 97f1117 commit 6d4a483
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
19 changes: 9 additions & 10 deletions src/parameterizations/lateral/MOM_internal_tides.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2317,7 +2317,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
fail_if_missing=.true.)
filename = trim(CS%inputdir) // trim(h2_file)
call log_param(param_file, mdl, "INPUTDIR/H2_FILE", filename)
call MOM_read_data(filename, 'h2', h2, G%domain, timelevel=1, scale=US%m_to_Z)
call MOM_read_data(filename, 'h2', h2, G%domain, scale=US%m_to_Z)
do j=G%jsc,G%jec ; do i=G%isc,G%iec
! Restrict rms topo to 10 percent of column depth.
h2(i,j) = min(0.01*(G%bathyT(i,j))**2, h2(i,j))
Expand All @@ -2337,8 +2337,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
allocate(CS%refl_angle(isd:ied,jsd:jed)) ; CS%refl_angle(:,:) = CS%nullangle
if (file_exists(filename, G%domain)) then
call log_param(param_file, mdl, "INPUTDIR/REFL_ANGLE_FILE", filename)
call MOM_read_data(filename, 'refl_angle', CS%refl_angle, &
G%domain, timelevel=1)
call MOM_read_data(filename, 'refl_angle', CS%refl_angle, G%domain)
else
if (trim(refl_angle_file) /= '' ) call MOM_error(FATAL, &
"REFL_ANGLE_FILE: "//trim(filename)//" not found")
Expand All @@ -2357,7 +2356,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
allocate(CS%refl_pref(isd:ied,jsd:jed)) ; CS%refl_pref(:,:) = 1.0
if (file_exists(filename, G%domain)) then
call log_param(param_file, mdl, "INPUTDIR/REFL_PREF_FILE", filename)
call MOM_read_data(filename, 'refl_pref', CS%refl_pref, G%domain, timelevel=1)
call MOM_read_data(filename, 'refl_pref', CS%refl_pref, G%domain)
else
if (trim(refl_pref_file) /= '' ) call MOM_error(FATAL, &
"REFL_PREF_FILE: "//trim(filename)//" not found")
Expand Down Expand Up @@ -2385,7 +2384,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
allocate(ridge_temp(isd:ied,jsd:jed)) ; ridge_temp(:,:) = 0.0
if (file_exists(filename, G%domain)) then
call log_param(param_file, mdl, "INPUTDIR/REFL_DBL_FILE", filename)
call MOM_read_data(filename, 'refl_dbl', ridge_temp, G%domain, timelevel=1)
call MOM_read_data(filename, 'refl_dbl', ridge_temp, G%domain)
else
if (trim(refl_dbl_file) /= '' ) call MOM_error(FATAL, &
"REFL_DBL_FILE: "//trim(filename)//" not found")
Expand All @@ -2406,9 +2405,9 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
!filename = trim(CS%inputdir) // trim(land_mask_file)
!call log_param(param_file, mdl, "INPUTDIR/LAND_MASK_FILE", filename)
!G%mask2dCu(:,:) = 1 ; G%mask2dCv(:,:) = 1 ; G%mask2dT(:,:) = 1
!call MOM_read_data(filename, 'land_mask', G%mask2dCu, G%domain, timelevel=1)
!call MOM_read_data(filename, 'land_mask', G%mask2dCv, G%domain, timelevel=1)
!call MOM_read_data(filename, 'land_mask', G%mask2dT, G%domain, timelevel=1)
!call MOM_read_data(filename, 'land_mask', G%mask2dCu, G%domain)
!call MOM_read_data(filename, 'land_mask', G%mask2dCv, G%domain)
!call MOM_read_data(filename, 'land_mask', G%mask2dT, G%domain)
!call pass_vector(G%mask2dCu, G%mask2dCv, G%domain, To_All+Scalar_Pair, CGRID_NE)
!call pass_var(G%mask2dT,G%domain)

Expand All @@ -2419,7 +2418,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
!filename = trim(CS%inputdir) // trim(dy_Cu_file)
!call log_param(param_file, mdl, "INPUTDIR/dy_Cu_FILE", filename)
!G%dy_Cu(:,:) = 0.0
!call MOM_read_data(filename, 'dy_Cu', G%dy_Cu, G%domain, timelevel=1, scale=US%m_to_L)
!call MOM_read_data(filename, 'dy_Cu', G%dy_Cu, G%domain, scale=US%m_to_L)

! Read in prescribed partial north face blockages from file (if overwriting -BDM)
!call get_param(param_file, mdl, "dx_Cv_FILE", dx_Cv_file, &
Expand All @@ -2428,7 +2427,7 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
!filename = trim(CS%inputdir) // trim(dx_Cv_file)
!call log_param(param_file, mdl, "INPUTDIR/dx_Cv_FILE", filename)
!G%dx_Cv(:,:) = 0.0
!call MOM_read_data(filename, 'dx_Cv', G%dx_Cv, G%domain, timelevel=1, scale=US%m_to_L)
!call MOM_read_data(filename, 'dx_Cv', G%dx_Cv, G%domain, scale=US%m_to_L)
!call pass_vector(G%dy_Cu, G%dx_Cv, G%domain, To_All+Scalar_Pair, CGRID_NE)

! Register maps of reflection parameters
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_internal_tide_input.F90
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ subroutine int_tide_input_init(Time, G, GV, US, param_file, diag, CS, itide)
"tidal amplitudes with INT_TIDE_DISSIPATION.", default="tideamp.nc")
filename = trim(CS%inputdir) // trim(tideamp_file)
call log_param(param_file, mdl, "INPUTDIR/TIDEAMP_FILE", filename)
call MOM_read_data(filename, 'tideamp', itide%tideamp, G%domain, timelevel=1, scale=US%m_s_to_L_T)
call MOM_read_data(filename, 'tideamp', itide%tideamp, G%domain, scale=US%m_s_to_L_T)
endif

call get_param(param_file, mdl, "H2_FILE", h2_file, &
Expand All @@ -377,7 +377,7 @@ subroutine int_tide_input_init(Time, G, GV, US, param_file, diag, CS, itide)
fail_if_missing=.true.)
filename = trim(CS%inputdir) // trim(h2_file)
call log_param(param_file, mdl, "INPUTDIR/H2_FILE", filename)
call MOM_read_data(filename, 'h2', itide%h2, G%domain, timelevel=1, scale=US%m_to_Z**2)
call MOM_read_data(filename, 'h2', itide%h2, G%domain, scale=US%m_to_Z**2)

call get_param(param_file, mdl, "FRACTIONAL_ROUGHNESS_MAX", max_frac_rough, &
"The maximum topographic roughness amplitude as a fraction of the mean depth, "//&
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_set_viscosity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,7 @@ subroutine set_visc_init(Time, G, GV, US, param_file, diag, visc, CS, restart_CS
allocate(CS%tideamp(isd:ied,jsd:jed)) ; CS%tideamp(:,:) = 0.0
filename = trim(CS%inputdir) // trim(tideamp_file)
call log_param(param_file, mdl, "INPUTDIR/TIDEAMP_FILE", filename)
call MOM_read_data(filename, 'tideamp', CS%tideamp, G%domain, timelevel=1, scale=US%m_to_Z*US%T_to_s)
call MOM_read_data(filename, 'tideamp', CS%tideamp, G%domain, scale=US%m_to_Z*US%T_to_s)
call pass_var(CS%tideamp,G%domain)
endif
endif
Expand Down
4 changes: 2 additions & 2 deletions src/parameterizations/vertical/MOM_tidal_mixing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ logical function tidal_mixing_init(Time, G, GV, US, param_file, diag, CS)
"tidal amplitudes with INT_TIDE_DISSIPATION.", default="tideamp.nc")
filename = trim(CS%inputdir) // trim(tideamp_file)
call log_param(param_file, mdl, "INPUTDIR/TIDEAMP_FILE", filename)
call MOM_read_data(filename, 'tideamp', CS%tideamp, G%domain, timelevel=1, scale=US%m_to_Z*US%T_to_s)
call MOM_read_data(filename, 'tideamp', CS%tideamp, G%domain, scale=US%m_to_Z*US%T_to_s)
endif

call get_param(param_file, mdl, "H2_FILE", h2_file, &
Expand All @@ -469,7 +469,7 @@ logical function tidal_mixing_init(Time, G, GV, US, param_file, diag, CS)
fail_if_missing=(.not.CS%use_CVMix_tidal))
filename = trim(CS%inputdir) // trim(h2_file)
call log_param(param_file, mdl, "INPUTDIR/H2_FILE", filename)
call MOM_read_data(filename, 'h2', CS%h2, G%domain, timelevel=1, scale=US%m_to_Z**2)
call MOM_read_data(filename, 'h2', CS%h2, G%domain, scale=US%m_to_Z**2)

call get_param(param_file, mdl, "FRACTIONAL_ROUGHNESS_MAX", max_frac_rough, &
"The maximum topographic roughness amplitude as a fraction of the mean depth, "//&
Expand Down

0 comments on commit 6d4a483

Please sign in to comment.