Skip to content

Commit

Permalink
+Corrected units in dumbbell get_param calls
Browse files Browse the repository at this point in the history
  Corrected the units in some get_param calls in the dumbbell test case.  All
answers are bitwise identical, but there will be minor changes in the
MOM_parameter_doc files for the dumbbell test case.
  • Loading branch information
Hallberg-NOAA committed Mar 26, 2022
1 parent fad341e commit 4c70d40
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/user/MOM_controlled_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ subroutine register_ctrl_forcing_restarts(G, param_file, CS, restart_CS)
call register_restart_field(CS%avg_time, "avg_time", .false., restart_CS, &
longname="Cyclical accumulated averaging time", units="sec", z_grid='1', t_grid=period_str)
call register_restart_field(CS%avg_SST_anom, "avg_SST_anom", .false., restart_CS, &
longname="Cyclical average SST Anomaly", units="deg C", z_grid='1', t_grid=period_str)
longname="Cyclical average SST Anomaly", units="degC", z_grid='1', t_grid=period_str)
call register_restart_field(CS%avg_SSS_anom, "avg_SSS_anom", .false., restart_CS, &
longname="Cyclical average SSS Anomaly", units="g kg-1", z_grid='1', t_grid=period_str)
endif
Expand Down
42 changes: 21 additions & 21 deletions src/user/dumbbell_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ subroutine dumbbell_initialize_topography( D, G, param_file, max_depth )
real :: x, y, delta, dblen, dbfrac
logical :: dbrotate

call get_param(param_file, mdl,"DUMBBELL_LEN",dblen, &
call get_param(param_file, mdl, "DUMBBELL_LEN",dblen, &
'Lateral Length scale for dumbbell.',&
units='k', default=600., do_not_log=.false.)
call get_param(param_file, mdl,"DUMBBELL_FRACTION",dbfrac, &
units='km', default=600., do_not_log=.false.)
call get_param(param_file, mdl, "DUMBBELL_FRACTION",dbfrac, &
'Meridional fraction for narrow part of dumbbell.',&
units='nondim', default=0.5, do_not_log=.false.)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
Expand Down Expand Up @@ -141,8 +141,8 @@ subroutine dumbbell_initialize_thickness ( h, depth_tot, G, GV, US, param_file,
select case ( coordinateMode(verticalCoordinate) )

case ( REGRIDDING_LAYER, REGRIDDING_RHO ) ! Initial thicknesses for isopycnal coordinates
call get_param(param_file, mdl,"INITIAL_SSS", S_surf, default=34., do_not_log=.true.)
call get_param(param_file, mdl,"INITIAL_S_RANGE", S_range, default=2., do_not_log=.true.)
call get_param(param_file, mdl, "INITIAL_SSS", S_surf, default=34., do_not_log=.true.)
call get_param(param_file, mdl, "INITIAL_S_RANGE", S_range, default=2., do_not_log=.true.)
call get_param(param_file, mdl, "S_REF", S_ref, default=35.0, do_not_log=.true.)
call get_param(param_file, mdl, "TS_RANGE_S_LIGHT", S_light, default = S_Ref, do_not_log=.true.)
call get_param(param_file, mdl, "TS_RANGE_S_DENSE", S_dense, default = S_Ref, do_not_log=.true.)
Expand Down Expand Up @@ -230,23 +230,23 @@ subroutine dumbbell_initialize_temperature_salinity ( T, S, h, G, GV, param_file

call get_param(param_file, mdl, "REGRIDDING_COORDINATE_MODE", verticalCoordinate, &
default=DEFAULT_COORDINATE_MODE, do_not_log=just_read)
call get_param(param_file, mdl,"INITIAL_DENSITY_PROFILE", density_profile, &
call get_param(param_file, mdl, "INITIAL_DENSITY_PROFILE", density_profile, &
'Initial profile shape. Valid values are "linear", "parabolic" '// &
'and "exponential".', default='linear', do_not_log=just_read)
call get_param(param_file, mdl,"DUMBBELL_SREF", S_surf, &
call get_param(param_file, mdl, "DUMBBELL_SREF", S_surf, &
'DUMBBELL REFERENCE SALINITY', units='1e-3', default=34., do_not_log=just_read)
call get_param(param_file, mdl,"DUMBBELL_S_RANGE", S_range, &
'DUMBBELL salinity range (right-left)', units='1e-3', &
default=2., do_not_log=just_read)
call get_param(param_file, mdl,"DUMBBELL_LEN",dblen, &
'Lateral Length scale for dumbbell ',&
units='k', default=600., do_not_log=just_read)
call get_param(param_file, mdl, "DUMBBELL_S_RANGE", S_range, &
'DUMBBELL salinity range (right-left)', units='1e-3', default=2., &
do_not_log=just_read)
call get_param(param_file, mdl, "DUMBBELL_LEN", dblen, &
'Lateral Length scale for dumbbell ', &
units='km', default=600., do_not_log=just_read)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.',&
'Logical for rotation of dumbbell domain.', &
units='nondim', default=.false., do_not_log=just_read)

if (G%x_axis_units == 'm') then
dblen=dblen*1.e3
dblen = dblen*1.e3
endif

do j=G%jsc,G%jec
Expand All @@ -259,16 +259,16 @@ subroutine dumbbell_initialize_temperature_salinity ( T, S, h, G, GV, param_file
x = ( G%geoLonT(i,j) ) / dblen
endif
do k=1,nz
T(i,j,k)=T_surf
T(i,j,k) = T_surf
enddo
if (x>=0. ) then
do k=1,nz
S(i,j,k)=S_surf + 0.5*S_range
S(i,j,k) = S_surf + 0.5*S_range
enddo
endif
if (x<0. ) then
do k=1,nz
S(i,j,k)=S_surf - 0.5*S_range
S(i,j,k) = S_surf - 0.5*S_range
enddo
endif

Expand Down Expand Up @@ -303,7 +303,7 @@ subroutine dumbbell_initialize_sponges(G, GV, US, tv, depth_tot, param_file, use

call get_param(param_file, mdl,"DUMBBELL_LEN",dblen, &
'Lateral Length scale for dumbbell ',&
units='k', default=600., do_not_log=.true.)
units='km', default=600., do_not_log=.true.)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.',&
units='nondim', default=.false., do_not_log=.true.)
Expand Down Expand Up @@ -378,12 +378,12 @@ subroutine dumbbell_initialize_sponges(G, GV, US, tv, depth_tot, param_file, use
endif
if (x>=0.25 ) then
do k=1,nz
S(i,j,k)=S_ref + 0.5*S_range
S(i,j,k) = S_ref + 0.5*S_range
enddo
endif
if (x<=-0.25 ) then
do k=1,nz
S(i,j,k)=S_ref - 0.5*S_range
S(i,j,k) = S_ref - 0.5*S_range
enddo
endif
enddo ; enddo
Expand Down
2 changes: 1 addition & 1 deletion src/user/dumbbell_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ subroutine dumbbell_surface_forcing_init(Time, G, US, param_file, diag, CS)
units="Pa", default = 10000.0, scale=US%kg_m3_to_R*US%m_s_to_L_T**2)
call get_param(param_file, mdl, "DUMBBELL_SLP_PERIOD", CS%slp_period, &
"Periodicity of SLP forcing in reservoirs.", &
units="days", default = 1.0)
units="days", default=1.0)
call get_param(param_file, mdl, "DUMBBELL_ROTATION", dbrotate, &
'Logical for rotation of dumbbell domain.',&
units='nondim', default=.false., do_not_log=.true.)
Expand Down

0 comments on commit 4c70d40

Please sign in to comment.