Skip to content

Commit

Permalink
Merge pull request #49 from NOAA-GFDL/dev/gfdl
Browse files Browse the repository at this point in the history
Merge in updates from dev/gfdl
  • Loading branch information
wrongkindofdoctor authored Feb 14, 2020
2 parents 477d9f8 + f972168 commit aff2a13
Show file tree
Hide file tree
Showing 23 changed files with 972 additions and 594 deletions.
15 changes: 4 additions & 11 deletions config_src/solo_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ subroutine wind_forcing_const(sfc_state, forces, tau_x0, tau_y0, day, G, US, CS)
Pa_conversion = US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z

!set steady surface wind stresses, in units of Pa.
!### mag_tau = US%kg_m3_to_R*US%m_s_to_L_T**2*US%L_to_Z * sqrt( tau_x0**2 + tau_y0**2)
mag_tau = Pa_conversion * sqrt( tau_x0**2 + tau_y0**2)

do j=js,je ; do I=is-1,Ieq
Expand Down Expand Up @@ -1674,35 +1673,29 @@ subroutine surface_forcing_init(Time, G, US, param_file, diag, CS, tracer_flow_C
call get_param(param_file, mdl, "LATENT_HEAT_VAPORIZATION", CS%latent_heat_vapor, &
"The latent heat of fusion.", units="J/kg", default=hlv)
if (CS%restorebuoy) then
! These three variables use non-standard time units, but are rescaled as they are read.
call get_param(param_file, mdl, "FLUXCONST", CS%Flux_const, &
"The constant that relates the restoring surface fluxes "//&
"to the relative surface anomalies (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s, &
units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0, &
fail_if_missing=.true., unscaled=flux_const_default)

if (CS%use_temperature) then
call get_param(param_file, mdl, "FLUXCONST_T", CS%Flux_const_T, &
"The constant that relates the restoring surface temperature "//&
"flux to the relative surface anomaly (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=1.0, & ! scale=US%m_to_Z*US%T_to_s,
units="m day-1", scale=1.0/86400.0, & ! scale=US%m_to_Z*US%T_to_s,
default=flux_const_default)
call get_param(param_file, mdl, "FLUXCONST_S", CS%Flux_const_S, &
"The constant that relates the restoring surface salinity "//&
"flux to the relative surface anomaly (akin to a piston "//&
"velocity). Note the non-MKS units.", &
units="m day-1", scale=US%m_to_Z*US%T_to_s, &
units="m day-1", scale=US%m_to_Z*US%T_to_s/86400.0, &
default=flux_const_default)
endif

!### Convert flux constants from m day-1 to m s-1. Folding these into the scaling
! factors above could change a division into a multiply by a reciprocal, which could
! change answers at the level of roundoff.
CS%Flux_const = CS%Flux_const / 86400.0
CS%Flux_const_T = CS%Flux_const_T / 86400.0
CS%Flux_const_S = CS%Flux_const_S / 86400.0

if (trim(CS%buoy_config) == "linear") then
call get_param(param_file, mdl, "SST_NORTH", CS%T_north, &
"With buoy_config linear, the sea surface temperature "//&
Expand Down
2 changes: 1 addition & 1 deletion src/ALE/MOM_regridding.F90
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ subroutine initialize_regridding(CS, GV, US, max_depth, param_file, mdl, coord_m

if (coordinateMode(coord_mode) == REGRIDDING_ADAPTIVE) then
call get_param(param_file, mdl, "ADAPT_TIME_RATIO", adaptTimeRatio, &
"Ratio of ALE timestep to grid timescale.", units="s", default=1e-1) !### Should the units be "nondim"?
"Ratio of ALE timestep to grid timescale.", units="nondim", default=1e-1)
call get_param(param_file, mdl, "ADAPT_ZOOM_DEPTH", adaptZoom, &
"Depth of near-surface zooming region.", units="m", default=200.0, scale=GV%m_to_H)
call get_param(param_file, mdl, "ADAPT_ZOOM_COEFF", adaptZoomCoeff, &
Expand Down
4 changes: 2 additions & 2 deletions src/ALE/coord_slight.F90
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ subroutine rho_interfaces_col(rho_col, h_col, z_col, rho_tgt, nz, z_col_new, &
if (k_layer > 0) then ! The new location is inside of layer k_layer.
! Note that this is coded assuming that this layer is stably stratified.
if (.not.(ppoly_i_E(k1,2) > ppoly_i_E(k1,1))) call MOM_error(FATAL, &
"build_grid_SLight: Erroneously searching for an interface in an unstratified layer.") !### COMMENT OUT LATER?
"build_grid_SLight: Erroneously searching for an interface in an unstratified layer.")

! Use the false position method to find the location (degree <= 1) or the first guess.
zf = (rt - ppoly_i_E(k1,1)) / (ppoly_i_E(k1,2) - ppoly_i_E(k1,1))
Expand All @@ -698,7 +698,7 @@ subroutine rho_interfaces_col(rho_col, h_col, z_col, rho_tgt, nz, z_col_new, &
! Bracket the root.
zf1 = 0.0 ; rfn1 = a(1)
zf2 = 1.0 ; rfn2 = a(1) + (a(2) + (a(3) + (a(4) + a(5))))
if (rfn1 * rfn2 > 0.0) call MOM_error(FATAL, "build_grid_SLight: Bad bracketing.") !### COMMENT OUT LATER?
if (rfn1 * rfn2 > 0.0) call MOM_error(FATAL, "build_grid_SLight: Bad bracketing.")

do itt=1,max_itt
rfn = a(1) + zf*(a(2) + zf*(a(3) + zf*(a(4) + zf*a(5))))
Expand Down
Loading

0 comments on commit aff2a13

Please sign in to comment.