From 3a0d0c9b5f8441be5d9e90a51a8284f8799ec675 Mon Sep 17 00:00:00 2001 From: jskenigson Date: Wed, 23 Jun 2021 11:09:06 -0600 Subject: [PATCH] Changed Stanley stochastic coefficient from exp(X) to exp(aX) (#9) * Changed Stanley stochastic coefficient from exp(X) to exp(aX) * Extra spaces removed --- src/core/MOM_stoch_eos.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/MOM_stoch_eos.F90 b/src/core/MOM_stoch_eos.F90 index 7b77016050..da7e267ea4 100644 --- a/src/core/MOM_stoch_eos.F90 +++ b/src/core/MOM_stoch_eos.F90 @@ -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 @@ -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) @@ -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