Skip to content

Commit

Permalink
Changed Stanley stochastic coefficient from exp(X) to exp(aX) (#9)
Browse files Browse the repository at this point in the history
* Changed Stanley stochastic coefficient from exp(X) to exp(aX)

* Extra spaces removed
  • Loading branch information
jskenigson authored Jun 23, 2021
1 parent e551526 commit 3a0d0c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/MOM_stoch_eos.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module MOM_stoch_eos
!< temporal correlation stochastic EOS (deugging)
logical :: use_stoch_eos !< If true, use the stochastic equation of state (Stanley et al. 2020)
real :: stanley_coeff
real :: stanley_a
! integer :: id_stoch_eos = -1, id_stoch_phi = -1
end type MOM_stoch_eos_CS

Expand All @@ -62,6 +63,9 @@ subroutine MOM_stoch_eos_init(G,Time,param_file,stoch_eos_CS,restart_CS,diag)
call get_param(param_file, "MOM", "STANLEY_COEFF", stoch_eos_CS%stanley_coeff, &
"Coefficient correlating the temperature gradient "//&
"and SGS T variance.", default=0.0)
call get_param(param_file, "MOM", "STANLEY_A", stoch_eos_CS%stanley_a, &
"Coefficient a which scales chi in stochastic perturbation of the "//&
"SGS T variance.", default=1.0)
ALLOC_(stoch_eos_CS%pattern(G%isd:G%ied,G%jsd:G%jed)) ; stoch_eos_CS%pattern(:,:) = 0.0
vd = var_desc("stoch_eos_pattern","nondim","Random pattern for stoch EOS",'h','1')
call register_restart_field(stoch_eos_CS%pattern, vd, .false., restart_CS)
Expand Down Expand Up @@ -186,7 +190,7 @@ subroutine MOM_calc_varT(G,Gv,h,tv,stoch_eos_CS)
do k=1,G%ke
do j=G%jsc,G%jec
do i=G%isc,G%iec
tv%varT(i,j,k) = exp (stoch_eos_CS%pattern(i,j)) * tv%varT(i,j,k)
tv%varT(i,j,k) = exp (stoch_eos_CS%stanley_a * stoch_eos_CS%pattern(i,j)) * tv%varT(i,j,k)
enddo
enddo
enddo
Expand Down

0 comments on commit 3a0d0c9

Please sign in to comment.