Skip to content

Commit

Permalink
change VR12-MA wave_method string to EFACTOR
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Aug 17, 2021
1 parent 80e1e2e commit 734e537
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call query_ocean_state(ocean_state, use_waves=use_waves, wave_method=wave_method)
if (use_waves) then
call query_ocean_state(ocean_state, NumWaveBands=Ice_ocean_boundary%num_stk_bands)
if (wave_method == "VR12-MA") then
if (wave_method == "EFACTOR") then
allocate( Ice_ocean_boundary%lamult(isc:iec,jsc:jec) )
Ice_ocean_boundary%lamult = 0.0
else
Expand Down Expand Up @@ -761,7 +761,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
!call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_runoff_heat_flx" , "will provide")
!call fld_list_add(fldsToOcn_num, fldsToOcn, "mean_calving_heat_flx" , "will provide")
if (use_waves) then
if (wave_method == "VR12-MA") then
if (wave_method == "EFACTOR") then
call fld_list_add(fldsToOcn_num, fldsToOcn, "Sw_lamult" , "will provide")
else
if (Ice_ocean_boundary%num_stk_bands > 3) then
Expand Down
2 changes: 1 addition & 1 deletion config_src/drivers/nuopc_cap/mom_ocean_model_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ subroutine update_ocean_model(Ice_ocean_boundary, OS, Ocean_sfc, &
call set_net_mass_forcing(OS%fluxes, OS%forces, OS%grid, OS%US)

if (OS%use_waves) then
if (OS%wave_method /= "VR12-MA") then
if (OS%wave_method /= "EFACTOR") then
call Update_Surface_Waves(OS%grid, OS%GV, OS%US, OS%time, ocean_coupling_time_step, OS%waves, OS%forces)
endif
endif
Expand Down
25 changes: 13 additions & 12 deletions src/user/MOM_wave_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ module MOM_wave_interface

! Switches needed in import_stokes_drift
!>@{ Enumeration values for the wave method
integer, parameter :: TESTPROF = 0, SURFBANDS = 1, DHH85 = 2, LF17 = 3, VR12MA = 4, NULL_WaveMethod = -99
integer, parameter :: TESTPROF = 0, SURFBANDS = 1, DHH85 = 2, LF17 = 3, EFACTOR = 4, NULL_WaveMethod = -99
!>@}
!>@{ Enumeration values for the wave data source
integer, parameter :: DATAOVR = 1, COUPLER = 2, INPUT = 3
Expand All @@ -186,7 +186,7 @@ module MOM_wave_interface
character*(13), parameter :: SURFBANDS_STRING = "SURFACE_BANDS" !< surface bands string
character*(5), parameter :: DHH85_STRING = "DHH85" !< DHH85 wave method string
character*(4), parameter :: LF17_STRING = "LF17" !< LF17 wave method string
character*(7), parameter :: VR12MA_STRING = "VR12-MA" !< VR12-MA wave method string
character*(7), parameter :: EFACTOR_STRING = "EFACTOR" !< EFACTOR (based on vr12-ma) wave method string

contains

Expand Down Expand Up @@ -288,10 +288,11 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag )
" wave spectrum with prescribed values. \n"// &
" LF17 - Infers Stokes drift profile from wind \n"// &
" speed following Li and Fox-Kemper 2017.\n"// &
" VR12-MA - Applies an enhancement factor to the KPP\n"//&
" turbulent velocity scale received from \n"// &
" WW3 and is based on the surface layer \n"// &
" and projected Langmuir number. (Li 2016)\n", &
" EFACTOR - Applies an enhancement factor to the KPP\n"//&
" turbulent velocity scale received \n"// &
" directly from WW3 and is based on the \n"// &
" surface layer and projected Langmuir \n"// &
" number (Li 2016)\n", &
units='', default=NULL_STRING)
select case (TRIM(TMPSTRING1))
case (NULL_STRING)! No Waves
Expand Down Expand Up @@ -390,8 +391,8 @@ subroutine MOM_wave_interface_init(time, G, GV, US, param_file, CS, diag )
default=.false.)
case (LF17_STRING)!Li and Fox-Kemper 17 wind-sea Langmuir number
CS%WaveMethod = LF17
case (VR12MA_STRING)!Li and Fox-Kemper 16
CS%WaveMethod = VR12MA
case (EFACTOR_STRING)!Li and Fox-Kemper 16
CS%WaveMethod = EFACTOR
case default
call MOM_error(FATAL,'Check WAVE_METHOD.')
end select
Expand Down Expand Up @@ -770,8 +771,8 @@ subroutine Update_Stokes_Drift(G, GV, US, CS, h, ustar)
enddo
CS%DHH85_is_set = .true.
endif
elseif (CS%WaveMethod==VR12MA) then
return ! todo
elseif (CS%WaveMethod==EFACTOR) then
return ! pass
else! Keep this else, fallback to 0 Stokes drift
do kk= 1,GV%ke
do jj = G%jsd,G%jed
Expand Down Expand Up @@ -1075,8 +1076,8 @@ function get_wave_method(CS)
get_wave_method = DHH85_STRING
case (LF17)
get_wave_method = LF17_STRING
case (VR12MA)
get_wave_method = VR12MA_STRING
case (EFACTOR)
get_wave_method = EFACTOR_STRING
end select
else
get_wave_method = NULL_STRING
Expand Down

0 comments on commit 734e537

Please sign in to comment.