Skip to content

Commit

Permalink
+Standardize user module axis unit documentation
Browse files Browse the repository at this point in the history
  Standardized documentation of axis-related variable units in user modules.
Some of these use the new G%x_ax_unit_short elements to automatically write the
AXIS_UNITS-dependent units into the MOM_parameter_doc files.  All answers are
bitwise identical but there are minor changes in some MOM_parameter_doc files.
  • Loading branch information
Hallberg-NOAA committed Dec 15, 2022
1 parent ba5e51c commit f67883d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/tracer/oil_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ function register_oil_tracer(HI, GV, US, param_file, CS, tr_Reg, restart_CS)
"found in the restart files of a restarted run.", &
default=.false.)
call get_param(param_file, mdl, "OIL_SOURCE_LONGITUDE", CS%oil_source_longitude, &
"The geographic longitude of the oil source.", units="degrees E", &
"The geographic longitude of the oil source.", units="degrees_E", &
fail_if_missing=.true.)
call get_param(param_file, mdl, "OIL_SOURCE_LATITUDE", CS%oil_source_latitude, &
"The geographic latitude of the oil source.", units="degrees N", &
"The geographic latitude of the oil source.", units="degrees_N", &
fail_if_missing=.true.)
call get_param(param_file, mdl, "OIL_SOURCE_LAYER", CS%oil_source_k, &
"The layer into which the oil is introduced, or a "//&
Expand Down
8 changes: 4 additions & 4 deletions src/user/BFB_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module BFB_surface_forcing
real :: Flux_const !< The restoring rate at the surface [Z T-1 ~> m s-1].
real :: SST_s !< SST at the southern edge of the linear forcing ramp [C ~> degC]
real :: SST_n !< SST at the northern edge of the linear forcing ramp [C ~> degC]
real :: lfrslat !< Southern latitude where the linear forcing ramp begins [degLat]
real :: lfrnlat !< Northern latitude where the linear forcing ramp ends [degLat]
real :: lfrslat !< Southern latitude where the linear forcing ramp begins [degrees_N] or [km]
real :: lfrnlat !< Northern latitude where the linear forcing ramp ends [degrees_N] or [km]
real :: drho_dt !< Rate of change of density with temperature [R C-1 ~> kg m-3 degC-1].
!! Note that temperature is being used as a dummy variable here.
!! All temperatures are converted into density.
Expand Down Expand Up @@ -206,10 +206,10 @@ subroutine BFB_surface_forcing_init(Time, G, US, param_file, diag, CS)
units="kg m-3", default=1035.0, scale=US%kg_m3_to_R)
call get_param(param_file, mdl, "LFR_SLAT", CS%lfrslat, &
"Southern latitude where the linear forcing ramp begins.", &
units="degrees", default=20.0)
units=G%y_ax_unit_short, default=20.0)
call get_param(param_file, mdl, "LFR_NLAT", CS%lfrnlat, &
"Northern latitude where the linear forcing ramp ends.", &
units="degrees", default=40.0)
units=G%y_ax_unit_short, default=40.0)
call get_param(param_file, mdl, "SST_S", CS%SST_s, &
"SST at the southern edge of the linear forcing ramp.", &
units="degC", default=20.0, scale=US%degC_to_C)
Expand Down
2 changes: 1 addition & 1 deletion src/user/basin_builder.F90
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ subroutine basin_builder_topography(D, G, param_file, max_depth)
character(len=17) :: pname1, pname2 ! For construction of parameter names
character(len=20) :: funcs ! Basin build function
real, dimension(20) :: pars ! Parameters for each function
real :: lon ! Longitude [degrees_E}
real :: lon ! Longitude [degrees_E]
real :: lat ! Latitude [degrees_N]
integer :: i, j, n, n_funcs

Expand Down
10 changes: 5 additions & 5 deletions src/user/external_gwave_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ subroutine external_gwave_initialize_thickness(h, G, GV, US, param_file, just_re
real :: eta1D(SZK_(GV)+1) ! Interface height relative to the sea surface
! positive upward [Z ~> m].
real :: ssh_anomaly_height ! Vertical height of ssh anomaly [Z ~> m]
real :: ssh_anomaly_width ! Lateral width of anomaly [degrees]
real :: ssh_anomaly_width ! Lateral width of anomaly, often in [km] or [degrees_E]
character(len=40) :: mdl = "external_gwave_initialize_thickness" ! This subroutine's name.
! This include declares and sets the variable "version".
# include "version_variable.h"
Expand All @@ -53,11 +53,11 @@ subroutine external_gwave_initialize_thickness(h, G, GV, US, param_file, just_re

if (.not.just_read) call log_version(param_file, mdl, version, "")
call get_param(param_file, mdl, "SSH_ANOMALY_HEIGHT", ssh_anomaly_height, &
"The vertical displacement of the SSH anomaly. ", units="m", scale=US%m_to_Z, &
fail_if_missing=.not.just_read, do_not_log=just_read)
"The vertical displacement of the SSH anomaly. ", &
units="m", scale=US%m_to_Z, fail_if_missing=.not.just_read, do_not_log=just_read)
call get_param(param_file, mdl, "SSH_ANOMALY_WIDTH", ssh_anomaly_width, &
"The lateral width of the SSH anomaly. ", units="coordinate", &
fail_if_missing=.not.just_read, do_not_log=just_read)
"The lateral width of the SSH anomaly. ", &
units=G%x_ax_unit_short, fail_if_missing=.not.just_read, do_not_log=just_read)

if (just_read) return ! All run-time parameters have been read, so return.

Expand Down
2 changes: 1 addition & 1 deletion src/user/user_change_diffusivity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ subroutine user_change_diff_init(Time, G, GV, US, param_file, diag, CS)
"applied. The four values specify the latitudes at "//&
"which the extra diffusivity starts to increase from 0, "//&
"hits its full value, starts to decrease again, and is "//&
"back to 0.", units="degree", default=-1.0e9)
"back to 0.", units="degrees_N", default=-1.0e9)
call get_param(param_file, mdl, "USER_KD_ADD_RHO_RANGE", CS%rho_range(:), &
"Four successive values that define a range of potential "//&
"densities over which the user-given extra diffusivity "//&
Expand Down

0 comments on commit f67883d

Please sign in to comment.