Skip to content

Commit

Permalink
Merge branch 'dev/master' of github.com:ESMG/MOM6 into dev/master
Browse files Browse the repository at this point in the history
  • Loading branch information
kshedstrom committed May 21, 2016
2 parents 8cc50a1 + 981b6e2 commit 6a61e89
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
17 changes: 11 additions & 6 deletions config_src/coupled_driver/MOM_surface_forcing.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module MOM_surface_forcing
! the winds that are being provided in calls to
! update_ocean_model.
logical :: use_temperature ! If true, temp and saln used as state variables
real :: wind_stress_multiplier !< A multiplier applied to incoming wind stress (nondim).

! smg: remove when have A=B code reconciled
logical :: bulkmixedlayer ! If true, model based on bulk mixed layer code
Expand Down Expand Up @@ -419,14 +420,14 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, G, CS, state,
do j=js,je ; do i=is,ie

if (wind_stagger == BGRID_NE) then
if (ASSOCIATED(IOB%u_flux)) taux_at_q(I,J) = IOB%u_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%v_flux)) tauy_at_q(I,J) = IOB%v_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%u_flux)) taux_at_q(I,J) = IOB%u_flux(i-i0,j-j0) * CS%wind_stress_multiplier
if (ASSOCIATED(IOB%v_flux)) tauy_at_q(I,J) = IOB%v_flux(i-i0,j-j0) * CS%wind_stress_multiplier
elseif (wind_stagger == AGRID) then
if (ASSOCIATED(IOB%u_flux)) taux_at_h(i,j) = IOB%u_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%v_flux)) tauy_at_h(i,j) = IOB%v_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%u_flux)) taux_at_h(i,j) = IOB%u_flux(i-i0,j-j0) * CS%wind_stress_multiplier
if (ASSOCIATED(IOB%v_flux)) tauy_at_h(i,j) = IOB%v_flux(i-i0,j-j0) * CS%wind_stress_multiplier
else ! C-grid wind stresses.
if (ASSOCIATED(IOB%u_flux)) fluxes%taux(I,j) = IOB%u_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%v_flux)) fluxes%tauy(i,J) = IOB%v_flux(i-i0,j-j0)
if (ASSOCIATED(IOB%u_flux)) fluxes%taux(I,j) = IOB%u_flux(i-i0,j-j0) * CS%wind_stress_multiplier
if (ASSOCIATED(IOB%v_flux)) fluxes%tauy(i,J) = IOB%v_flux(i-i0,j-j0) * CS%wind_stress_multiplier
endif

if (ASSOCIATED(IOB%lprec)) &
Expand Down Expand Up @@ -893,6 +894,10 @@ subroutine surface_forcing_init(Time, G, param_file, diag, CS, restore_salt)
elseif (uppercase(stagger(1:1)) == 'C') then ; CS%wind_stagger = CGRID_NE
else ; call MOM_error(FATAL,"surface_forcing_init: WIND_STAGGER = "// &
trim(stagger)//" is invalid.") ; endif
call get_param(param_file, mod, "WIND_STRESS_MULTIPLIER", CS%wind_stress_multiplier, &
"A factor multiplying the wind-stress given to the ocean by the\n"//&
"coupler. This is used for testing and should be =1.0 for any\n"//&
"production runs.", default=1.0)

if (restore_salt) then
call get_param(param_file, mod, "FLUXCONST", CS%Flux_const, &
Expand Down
9 changes: 7 additions & 2 deletions src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, PF, dirs, &
use_temperature = ASSOCIATED(tv%T)
useALE = associated(ALE_CSp)
use_EOS = associated(tv%eqn_of_state)
useALE = associated(ALE_CSp)
if (use_EOS) eos => tv%eqn_of_state

!====================================================================
Expand Down Expand Up @@ -230,7 +229,13 @@ subroutine MOM_initialize_state(u, v, h, tv, Time, G, GV, PF, dirs, &
select case (trim(config))
case ("file"); call initialize_thickness_from_file(h, G, GV, PF, .false.)
case ("thickness_file"); call initialize_thickness_from_file(h, G, GV, PF, .true.)
case ("coord"); call ALE_initThicknessToCoord( ALE_CSp, G, h )
case ("coord")
if (useALE) then
call ALE_initThicknessToCoord( ALE_CSp, G, h )
else
call MOM_error(FATAL, "MOM_initialize_state: USE_REGRIDDING must be True "//&
"for THICKNESS_CONFIG of 'coord'")
endif
case ("uniform"); call initialize_thickness_uniform(h, G, GV, PF)
case ("DOME"); call DOME_initialize_thickness(h, G, GV, PF)
case ("ISOMIP"); call ISOMIP_initialize_thickness(h, G, GV, PF, tv)
Expand Down

0 comments on commit 6a61e89

Please sign in to comment.