Skip to content

Commit

Permalink
+Remove carriage returns in parameter descriptions
Browse files Browse the repository at this point in the history
  Removed hard-coded newline symbols from most SIS2 parameter descriptions in
calls to get_param or log_param, instead allowing these routines to format the
output automatically.  All answers are bitwise identical, but there are changes
in many of the variable descriptions in the SIS_parameter_doc files.
  • Loading branch information
Hallberg-NOAA committed Mar 24, 2020
1 parent 83a9be4 commit 4ca127c
Show file tree
Hide file tree
Showing 18 changed files with 244 additions and 245 deletions.
50 changes: 25 additions & 25 deletions src/SIS2_ice_thm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,33 @@ subroutine SIS2_ice_thm_init(US, param_file, CS)
"The conductivity of heat in ice.", &
units="W m-1 K-1", default=2.03, scale=US%W_m2_to_QRZ_T*US%m_to_Z)
call get_param(param_file, mdl, "MIN_H_FOR_TEMP_CALC", CS%H_lo_lim, &
"The minimum ice thickness at which to do temperature \n"//&
"The minimum ice thickness at which to do temperature "//&
"calculations.", units="m", default=0.0, scale=US%m_to_Z)

call get_param(param_file, mdl, "DO_POND", CS%do_pond, &
"If true, calculate melt ponds and use them for\n"//&
"If true, calculate melt ponds and use them for "//&
"shortwave radiation calculation.", default=.false.)
call get_param(param_file, mdl, "TDRAIN", CS%tdrain, &
"Melt ponds drain to sea level when ice average temp.\n"//&
"Melt ponds drain to sea level when ice average temp. "//&
"exceeds TDRAIN (stand-in for mushy layer thermo)", default=-0.8) !### , units="degC")
call get_param(param_file, mdl, "R_MIN_POND", CS%r_min_pond, &
"Minimum retention rate of surface water sources in melt pond\n"//&
"Minimum retention rate of surface water sources in melt pond "//&
"(retention scales linearly with ice cover)", default=0.15) !### , units="nondim")
call get_param(param_file, mdl, "R_MAX_POND", CS%r_max_pond, &
"Maximum retention rate of surface water sources in melt pond\n"//&
"Maximum retention rate of surface water sources in melt pond "//&
"(retention scales linearly with ice cover)", default=0.9) !### , units="nondim")
call get_param(param_file, mdl, "MIN_POND_FRAC", CS%min_pond_frac, &
"Minimum melt pond cover (by ponds at sea level)\n"//&
"Minimum melt pond cover (by ponds at sea level) "//&
"pond drains to this when ice is porous.", default=0.2) !### , units="nondim")
call get_param(param_file, mdl, "MAX_POND_FRAC", CS%max_pond_frac, &
"Maximum melt pond cover - associated with pond volume\n"//&
"Maximum melt pond cover - associated with pond volume "//&
"that suppresses ice top to waterline", default=0.5) !### , units="nondim")
call get_param(param_file, mdl, "ICE_TEMP_RANGE_ESTIMATE", CS%temp_range_est,&
"An estimate of the range of snow and ice temperatures \n"//&
"that is used to evaluate whether an explicit diffusive \n"//&
"form of the heat fluxes or an inversion based on the \n"//&
"layer heat budget is more likely to be more accurate. \n"//&
"Setting this to 0 causes the explicit diffusive form. \n"//&
"An estimate of the range of snow and ice temperatures "//&
"that is used to evaluate whether an explicit diffusive "//&
"form of the heat fluxes or an inversion based on the "//&
"layer heat budget is more likely to be more accurate. "//&
"Setting this to 0 causes the explicit diffusive form. "//&
"to always be used.", units="degC", default=40.0)
CS%temp_range_est = abs(CS%temp_range_est)

Expand Down Expand Up @@ -1699,31 +1699,31 @@ subroutine ice_thermo_init(param_file, ITV, US, init_EOS )
"The nominal density of snow as used by SIS.", &
units="kg m-3", default=330.0, scale=US%kg_m3_to_R)
call get_param(param_file, mdl, "CP_ICE", ITV%Cp_ice, &
"The heat capacity of fresh ice, approximated as a \n"//&
"constant.", units="J kg-1 K-1", default=2100.0, scale=US%J_kg_to_Q)
"The heat capacity of fresh ice, approximated as a constant.", &
units="J kg-1 K-1", default=2100.0, scale=US%J_kg_to_Q)
call get_param(param_file, mdl, "CP_SEAWATER", ITV%Cp_Water, &
"The heat capacity of sea water, approximated as a \n"//&
"constant.", units="J kg-1 K-1", default=4200.0, scale=US%J_kg_to_Q)
"The heat capacity of sea water, approximated as a constant.", &
units="J kg-1 K-1", default=4200.0, scale=US%J_kg_to_Q)
call get_param(param_file, mdl, "CP_BRINE", ITV%Cp_brine, &
"The heat capacity of water in brine pockets within the \n"//&
"sea-ice, approximated as a constant. CP_BRINE and \n"//&
"CP_SEAWATER should be equal, but for computational \n"//&
"The heat capacity of water in brine pockets within the "//&
"sea-ice, approximated as a constant. CP_BRINE and "//&
"CP_SEAWATER should be equal, but for computational "//&
"convenience CP_BRINE can be set equal to CP_ICE.", &
units="J kg-1 K-1", default=US%Q_to_J_kg*ITV%Cp_Water, scale=US%J_kg_to_Q)
call get_param(param_file, mdl, "DTFREEZE_DS", ITV%dTf_dS, &
"The derivative of the freezing temperature with salinity.", &
units="deg C PSU-1", default=-0.054)

call get_param(param_file, mdl, "ENTHALPY_LIQUID_0", ITV%enth_liq_0, &
"The enthalpy of liquid fresh water at 0 C. The solutions \n"//&
"should be physically consistent when this is adjusted, \n"//&
"because only the relative value is of physical meaning, \n"//&
"The enthalpy of liquid fresh water at 0 C. The solutions "//&
"should be physically consistent when this is adjusted, "//&
"because only the relative value is of physical meaning, "//&
"but roundoff errors can change the solution.", &
units="J kg-1", default=0.0, scale=US%J_kg_to_Q)
call obsolete_real(param_file, "ENTHALPY_UNITS", warning_val=1.0)
call get_param(param_file, mdl, "SUBLIMATION_BUG", ITV%sublimation_bug, &
"If true use an older calculation that omits the latent \n"//&
"heat of fusion from the latent heat of sublimation. \n"//&
"If true use an older calculation that omits the latent "//&
"heat of fusion from the latent heat of sublimation. "//&
"This variable should be obsoleted as soon as possible.", &
default=.false.)

Expand All @@ -1733,7 +1733,7 @@ subroutine ice_thermo_init(param_file, ITV, US, init_EOS )
if (specified_ice) then
ITV%slab_ice = .true.
call log_param(param_file, mdl, "USE_SLAB_ICE", ITV%slab_ice, &
"Use the very old slab-style ice. With SPECIFIED_ICE, \n"//&
"Use the very old slab-style ice. With SPECIFIED_ICE, "//&
"USE_SLAB_ICE is always true.")
else
call get_param(param_file, mdl, "USE_SLAB_ICE", ITV%slab_ice, &
Expand Down
4 changes: 2 additions & 2 deletions src/SIS_continuity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1395,7 +1395,7 @@ subroutine SIS_continuity_init(Time, G, param_file, diag, CS, CS_cvr)
hint="Use SIS_CONTINUITY_SCHEME instead.")

call get_param(param_file, mdl, "CONT_PPM_VOLUME_BASED_CFL", CS%vol_CFL, &
"If true, use the ratio of the open face lengths to the \n"//&
"If true, use the ratio of the open face lengths to the "//&
"tracer cell areas when estimating CFL numbers.", &
default=.false.)

Expand Down Expand Up @@ -1423,7 +1423,7 @@ subroutine SIS_continuity_init(Time, G, param_file, diag, CS, CS_cvr)
end select

call get_param(param_file, mdl, "COVER_PPM_VOLUME_BASED_CFL", CS_cvr%vol_CFL, &
"If true, use the ratio of the open face lengths to the cell\n"//&
"If true, use the ratio of the open face lengths to the cell "//&
"areas when estimating CFL numbers in ice cover transport.", &
default=.false.)
endif
Expand Down
4 changes: 2 additions & 2 deletions src/SIS_debugging.F90
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ subroutine SIS_debugging_init(param_file)
"If true, write out verbose debugging data.", &
default=.false., debuggingParam=.true.)
call get_param(param_file, mdl, "DEBUG_CHKSUMS", debug_chksums, &
"If true, checksums are performed on arrays in the \n"//&
"If true, checksums are performed on arrays in the "//&
"various vec_chksum routines.", default=debug, &
debuggingParam=.true.)
call get_param(param_file, mdl, "DEBUG_REDUNDANT", debug_redundant, &
"If true, debug redundant data points during calls to \n"//&
"If true, debug redundant data points during calls to "//&
"the various vec_chksum routines.", default=debug, &
debuggingParam=.true.)

Expand Down
12 changes: 6 additions & 6 deletions src/SIS_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ subroutine set_SIS_axes_info(G, IG, param_file, diag_cs, set_vertical, axes_set_
! Read all relevant parameters and write them to the model log.
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "GRID_CONFIG", grid_config, &
"The method for defining the horizontal grid. Valid \n"//&
"The method for defining the horizontal grid. Valid "//&
"entries include:\n"//&
"\t file - read the grid from GRID_FILE \n"//&
"\t mosaic - read the grid from a mosaic grid file \n"//&
Expand All @@ -158,10 +158,10 @@ subroutine set_SIS_axes_info(G, IG, param_file, diag_cs, set_vertical, axes_set_
! This is a cartesian grid, and may have different axis units.
Cartesian_grid = .true.
call get_param(param_file, mdl, "AXIS_UNITS", units_temp, &
"The units for the x- and y- axis labels. AXIS_UNITS \n"//&
"should be defined as 'k' for km, 'm' for m, or 'd' \n"//&
"for degrees of latitude and longitude (the default). \n"//&
"Except on a Cartesian grid, only degrees are currently \n"//&
"The units for the x- and y- axis labels. AXIS_UNITS "//&
"should be defined as 'k' for km, 'm' for m, or 'd' "//&
"for degrees of latitude and longitude (the default). "//&
"Except on a Cartesian grid, only degrees are currently "//&
"implemented.", default='degrees')
if (units_temp(1:1) == 'k') then
G%x_axis_units = "kilometers" ; G%y_axis_units = "kilometers"
Expand Down Expand Up @@ -820,7 +820,7 @@ subroutine SIS_diag_mediator_init(G, IG, param_file, diag_cs, component, err_msg
doc_file_param = "AVAILABLE_DIAGS_FILE"
endif
call get_param(param_file, mdl, trim(doc_file_param), doc_file, &
"A file into which to write a list of all available \n"//&
"A file into which to write a list of all available "//&
"sea ice diagnostics that can be included in a diag_table.", &
default=doc_file_dflt)
if (len_trim(doc_file) > 0) then
Expand Down
14 changes: 7 additions & 7 deletions src/SIS_dyn_bgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@ subroutine SIS_B_dyn_init(Time, G, US, param_file, diag, CS)
! Read all relevant parameters and write them to the model log.
call log_version(param_file, mdl, version)
call get_param(param_file, mdl, "DT_RHEOLOGY", CS%dt_Rheo, &
"The sub-cycling time step for iterating the rheology \n"//&
"and ice momentum equations. If DT_RHEOLOGY is negative, \n"//&
"The sub-cycling time step for iterating the rheology "//&
"and ice momentum equations. If DT_RHEOLOGY is negative, "//&
"the time step is set via NSTEPS_DYN.", units="seconds", scale=US%s_to_T, &
default=-1.0)
CS%evp_sub_steps = -1
if (CS%dt_Rheo <= 0.0) &
call get_param(param_file, mdl, "NSTEPS_DYN", CS%evp_sub_steps, &
"The number of iterations of the rheology and ice \n"//&
"The number of iterations of the rheology and ice "//&
"momentum equations for each slow ice time step.", default=432)

call get_param(param_file, mdl, "ICE_STRENGTH_PSTAR", CS%p0, &
"A constant in the expression for the ice strength, \n"//&
"A constant in the expression for the ice strength, "//&
"P* in Hunke & Dukowicz 1997.", &
units="Pa", scale=US%kg_m3_to_R*US%m_s_to_L_T**2, default=2.75e4)
call get_param(param_file, mdl, "ICE_STRENGTH_CSTAR", CS%c0, &
"A constant in the exponent of the expression for the \n"//&
"A constant in the exponent of the expression for the "//&
"ice strength, c* in Hunke & Dukowicz 1997.", &
units="nondim", default=20.)
call get_param(param_file, mdl, "ICE_CDRAG_WATER", CS%cdw, &
Expand Down Expand Up @@ -140,8 +140,8 @@ subroutine SIS_B_dyn_init(Time, G, US, param_file, diag, CS)
"If true, debug redundant data points.", default=CS%debug, &
debuggingParam=.true.)
call get_param(param_file, mdl, "AIR_WATER_STRESS_TURN_ANGLE", CS%blturn, &
"An angle by which to rotate the velocities at the air- \n"//&
"water boundary in calculating stresses.", units="degrees", &
"An angle by which to rotate the velocities at the air-water "//&
"boundary in calculating stresses.", units="degrees", &
default=0.0)


Expand Down
Loading

0 comments on commit 4ca127c

Please sign in to comment.