Skip to content

Commit

Permalink
Fix the syntax or substance in 10 comment units
Browse files Browse the repository at this point in the history
  Corrected incorrect syntax in the descriptions of 4 positions variables in
write energy, 1 reused position variable in set_grid_metrics_from_mosaic and 1
position variable in bkgnd_mixing_CS.  Also added the unscaled units to the
comments documenting two lines of calculations in wave_speeds, and added the
scaled units to two variables related to the ice-shelf surface mass balance.
Only comments are changed and all answers are bitwise identical.
  • Loading branch information
Hallberg-NOAA committed Feb 1, 2025
1 parent 188c3d8 commit d88bc68
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/diagnostics/MOM_sum_output.F90
Original file line number Diff line number Diff line change
Expand Up @@ -439,14 +439,14 @@ subroutine write_energy(u, v, h, tv, day, n, G, GV, US, CS, tracer_CSp, dt_forci
real :: T_min ! The global minimum unmasked value of the temperature [degC]
real :: T_max ! The global maximum unmasked value of the temperature [degC]
real :: T_min_x ! The x-positions of the global temperature minima
! in the units of G%geoLonT, often [degreeT_E] or [km]
! in the units of G%geoLonT, often [degrees_E] or [km]
real :: T_min_y ! The y-positions of the global temperature minima
! in the units of G%geoLatT, often [degreeT_N] or [km]
! in the units of G%geoLatT, often [degrees_N] or [km]
real :: T_min_z ! The z-positions of the global temperature minima [layer]
real :: T_max_x ! The x-positions of the global temperature maxima
! in the units of G%geoLonT, often [degreeT_E] or [km]
! in the units of G%geoLonT, often [degrees_E] or [km]
real :: T_max_y ! The y-positions of the global temperature maxima
! in the units of G%geoLatT, often [degreeT_N] or [km]
! in the units of G%geoLatT, often [degrees_N] or [km]
real :: T_max_z ! The z-positions of the global temperature maxima [layer]


Expand Down
4 changes: 2 additions & 2 deletions src/diagnostics/MOM_wave_speed.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1303,9 +1303,9 @@ subroutine wave_speeds(h, tv, G, GV, US, nmodes, cn, CS, w_struct, u_struct, u_s
! renormalization of the integral of the profile
w2avg = 0.0
do k=1,kc
w2avg = w2avg + 0.5*(mode_struct(K)**2+mode_struct(K+1)**2)*Hc(k) ! [H L4 T-4]
w2avg = w2avg + 0.5*(mode_struct(K)**2+mode_struct(K+1)**2)*Hc(k) ! [H L4 T-4 ~> m5 s-4 or kg m2 s-4]
enddo
renorm = sqrt(htot(i)*a_int/w2avg) ! [T2 L-2]
renorm = sqrt(htot(i)*a_int/w2avg) ! [T2 L-2 ~> s2 m-2]
do K=1,kc+1 ; mode_struct(K) = renorm * mode_struct(K) ; enddo
! after renorm, mode_struct is again [nondim]
if (abs(dlam) < tol_solve*lam_1) exit
Expand Down
4 changes: 2 additions & 2 deletions src/ice_shelf/MOM_ice_shelf_initialize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -662,11 +662,11 @@ end subroutine initialize_ice_AGlen
subroutine initialize_ice_SMB(SMB, G, US, PF)
type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure
real, dimension(SZDI_(G),SZDJ_(G)), &
intent(inout) :: SMB !< Ice surface mass balance parameter, often in [kg m-2 s-1]
intent(inout) :: SMB !< Ice surface mass balance parameter, often in [R Z T-1 ~> kg m-2 s-1]
type(unit_scale_type), intent(in) :: US !< A structure containing unit conversion factors
type(param_file_type), intent(in) :: PF !< A structure to parse for run-time parameters

real :: SMB_val ! Constant ice surface mass balance parameter, often in [kg m-2 s-1]
real :: SMB_val ! Constant ice surface mass balance parameter, often in [R Z T-1 ~> kg m-2 s-1]
character(len=40) :: mdl = "initialize_ice_SMB" ! This subroutine's name.
character(len=200) :: config
character(len=200) :: varname
Expand Down
3 changes: 2 additions & 1 deletion src/initialization/MOM_grid_initialize.F90
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ subroutine set_grid_metrics_from_mosaic(G, param_file, US)
real, dimension(2*G%isd-2:2*G%ied+1,2*G%jsd-2:2*G%jed+1) :: tmpT ! Areas [L2 ~> m2]
real, dimension(2*G%isd-3:2*G%ied+1,2*G%jsd-2:2*G%jed+1) :: tmpU ! East face supergrid spacing [L ~> m]
real, dimension(2*G%isd-2:2*G%ied+1,2*G%jsd-3:2*G%jed+1) :: tmpV ! North face supergrid spacing [L ~> m]
real, dimension(2*G%isd-3:2*G%ied+1,2*G%jsd-3:2*G%jed+1) :: tmpZ ! Corner latitudes or longitudes [degN] or [degE]
real, dimension(2*G%isd-3:2*G%ied+1,2*G%jsd-3:2*G%jed+1) :: tmpZ ! Corner latitudes [degrees_N] or
! longitudes [degrees_E]
real, dimension(:,:), allocatable :: tmpGlbl ! A global array of axis labels [degrees_N] or [km] or [m]
character(len=200) :: filename, grid_file, inputdir
character(len=64) :: mdl = "MOM_grid_init set_grid_metrics_from_mosaic"
Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_bkgnd_mixing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module MOM_bkgnd_mixing
!! twice the Earth's rotation period, used with the
!! Henyey scaling from the mixing [nondim]
real :: Henyey_max_lat !< A latitude poleward of which the Henyey profile
!! is returned to the minimum diffusivity [degN]
!! is returned to the minimum diffusivity [degrees_N]
real :: prandtl_bkgnd !< Turbulent Prandtl number used to convert
!! vertical background diffusivity into viscosity [nondim]
real :: Kd_tanh_lat_scale !< A nondimensional scaling for the range of
Expand Down

0 comments on commit d88bc68

Please sign in to comment.