Skip to content

Commit 84f8d8e

Browse files
committed
Included stability functions for Gaspard implementation in ICON as described in Brueggemann et al. (2024)
1 parent e13cbac commit 84f8d8e

6 files changed

Lines changed: 97 additions & 4 deletions

File tree

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ DOCSRC_turbulence = $(SRCDIR)/turbulence/turbulence.F90 \
8181
$(SRCDIR)/turbulence/cmue_d.F90 \
8282
$(SRCDIR)/turbulence/cmue_ma.F90 \
8383
$(SRCDIR)/turbulence/cmue_sg.F90 \
84-
$(SRCDIR)/turbulence/cmue_rf.F90 \
84+
$(SRCDIR)/turbulence/cmue_icon.F90 \
8585
$(SRCDIR)/turbulence/compute_cpsi3.F90 \
8686
$(SRCDIR)/turbulence/compute_rist.F90 \
8787
$(SRCDIR)/turbulence/internal_wave.F90 \

src/turbulence/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ add_library(turbulence
88
cmue_d_h15.F90
99
cmue_ma.F90
1010
cmue_sg.F90
11+
cmue_icon.F90
1112
compute_cpsi3.F90
1213
compute_rist.F90
1314
dissipationeq.F90

src/turbulence/cmue_icon.F90

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#include"cppdefs.h"
2+
!-----------------------------------------------------------------------
3+
!BOP
4+
!
5+
! !ROUTINE: The stability function as implemented in ICON \label{sec:icon}
6+
!
7+
! !INTERFACE:
8+
subroutine cmue_icon(nlev)
9+
!
10+
! !DESCRIPTION:
11+
! This subroutine computes stability functions according to
12+
! \begin{equation}
13+
! c_{\mu}=c_{\mu}^0,\qquad c'_{\mu}=\frac{c_{\mu}^0}{Pr_t}
14+
! \end{equation}
15+
! as a function of the turbulent Prandtl number $Pr_t$, where $c_{\mu}^0$ is
16+
! a constant to be specified in {\tt gotm.yaml}. The turbulent Prandtl--number
17+
! is specified as
18+
! \begin{equation}
19+
! Pr_t = \min \left(1, \max \left( 10, 6.6*Ri \right) \right)
20+
! \comma
21+
! \end{equation}
22+
! where where $Ri$ is the gradient Richardson-number. This model is part of the
23+
! implementation of the model by \cite{Gaspardetal1990} in ICON as described in
24+
! \cite{BrueggemannEtAl2024}. The model coefficients by \cite{Gaspardetal1990}
25+
! translate to $c_\mu^0=0.514$ .
26+
!
27+
! !USES:
28+
use turbulence, only: cm0_fix
29+
use turbulence, only: cmue1,cmue2,as,an
30+
IMPLICIT NONE
31+
!
32+
! !INPUT PARAMETERS:
33+
integer, intent(in) :: nlev
34+
!
35+
! !REVISION HISTORY:
36+
! Original author(s): Lars Umlauf
37+
!
38+
!EOP
39+
!
40+
! !LOCAL VARIABLES:
41+
REALTYPE :: Ri(0:nlev), Pr(0:nlev)
42+
REALTYPE,parameter :: RiFac = 6.6
43+
REALTYPE,parameter :: PrMin = 1.0, PrMax = 10.0
44+
REALTYPE,parameter :: Small = 1.e-8
45+
!
46+
!-----------------------------------------------------------------------
47+
!BOC
48+
49+
Ri = an / (as + Small)
50+
Pr = min(PrMax,RiFac*Ri)
51+
Pr = max(PrMin,Pr)
52+
53+
Pr(0) = 1.
54+
Pr(nlev) = 1.
55+
56+
cmue1 = cm0_fix
57+
cmue2 = cm0_fix/Pr
58+
59+
60+
return
61+
end subroutine cmue_icon
62+
!EOC
63+
64+
!-----------------------------------------------------------------------
65+
! Copyright by the GOTM-team under the GNU Public License - www.gnu.org
66+
!-----------------------------------------------------------------------

src/turbulence/compute_cpsi3.F90

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ REALTYPE function compute_cpsi3(c1,c2,Ri)
2121
use turbulence, only: Constant
2222
use turbulence, only: Munk_Anderson
2323
use turbulence, only: Schumann_Gerz
24+
use turbulence, only: ICON
2425
IMPLICIT NONE
2526
!
2627
! !INPUT PARAMETERS:
@@ -52,6 +53,8 @@ REALTYPE function compute_cpsi3(c1,c2,Ri)
5253
call cmue_ma(2)
5354
case(Schumann_Gerz)
5455
call cmue_sg(2)
56+
case(ICON)
57+
call cmue_icon(2)
5558
end select
5659
else
5760
call cmue_d(2)
@@ -68,6 +71,8 @@ REALTYPE function compute_cpsi3(c1,c2,Ri)
6871
call cmue_ma(2)
6972
case(Schumann_Gerz)
7073
call cmue_sg(2)
74+
case(ICON)
75+
call cmue_icon(2)
7176
end select
7277
else
7378
call cmue_d(2)
@@ -98,6 +103,8 @@ REALTYPE function compute_cpsi3(c1,c2,Ri)
98103
call cmue_ma(2)
99104
case(Schumann_Gerz)
100105
call cmue_sg(2)
106+
case(ICON)
107+
call cmue_icon(2)
101108
end select
102109
else
103110
call cmue_d(2)

src/turbulence/compute_rist.F90

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ REALTYPE function compute_rist(c1,c2,c3)
2424
use turbulence, only: Constant
2525
use turbulence, only: Munk_Anderson
2626
use turbulence, only: Schumann_Gerz
27+
use turbulence, only: ICON
2728
IMPLICIT NONE
2829
!
2930
! !INPUT PARAMETERS:
@@ -65,6 +66,8 @@ REALTYPE function compute_rist(c1,c2,c3)
6566
call cmue_ma(2)
6667
case(Schumann_Gerz)
6768
call cmue_sg(2)
69+
case(ICON)
70+
call cmue_icon(2)
6871
end select
6972
else
7073
call cmue_d(2)
@@ -81,6 +84,8 @@ REALTYPE function compute_rist(c1,c2,c3)
8184
call cmue_ma(2)
8285
case(Schumann_Gerz)
8386
call cmue_sg(2)
87+
case(ICON)
88+
call cmue_icon(2)
8489
end select
8590
else
8691
call cmue_d(2)
@@ -118,6 +123,8 @@ REALTYPE function compute_rist(c1,c2,c3)
118123
call cmue_ma(2)
119124
case(Schumann_Gerz)
120125
call cmue_sg(2)
126+
case(ICON)
127+
call cmue_icon(2)
121128
end select
122129
else
123130
call cmue_d(2)
@@ -139,6 +146,8 @@ REALTYPE function compute_rist(c1,c2,c3)
139146
call cmue_ma(2)
140147
case(Schumann_Gerz)
141148
call cmue_sg(2)
149+
case(ICON)
150+
call cmue_icon(2)
142151
end select
143152
else
144153
call cmue_d(2)
@@ -155,6 +164,8 @@ REALTYPE function compute_rist(c1,c2,c3)
155164
call cmue_ma(2)
156165
case(Schumann_Gerz)
157166
call cmue_sg(2)
167+
case(ICON)
168+
call cmue_icon(2)
158169
end select
159170
else
160171
call cmue_d(2)
@@ -189,6 +200,8 @@ REALTYPE function compute_rist(c1,c2,c3)
189200
call cmue_ma(2)
190201
case(Schumann_Gerz)
191202
call cmue_sg(2)
203+
case(ICON)
204+
call cmue_icon(2)
192205
end select
193206
else
194207
call cmue_d(2)

src/turbulence/turbulence.F90

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ module turbulence
249249
integer, parameter, public :: Constant=1
250250
integer, parameter, public :: Munk_Anderson=2
251251
integer, parameter, public :: Schumann_Gerz=3
252+
integer, parameter, public :: ICON=4
252253

253254
! method to update length scale
254255
integer, parameter, public :: Parabolic=1
@@ -629,7 +630,7 @@ subroutine init_turbulence_yaml(branch)
629630
call branch%get(len_scale_method, 'len_scale_method', 'dissipative length scale', &
630631
options=(/option(parabolic, 'parabolic', 'parabolic'), option(triangular, 'triangular', 'triangular'), option(Xing_Davies, 'Xing and Davies (1995)', 'Xing_Davies'), option(Robert_Ouellet, 'Robert and Ouellet (1987)', 'Robert_Ouellet'), option(Blackadar, 'Blackadar (two boundaries) (1962)', 'Blackadar'), option(Bougeault_Andre, 'Bougeault and Andre (1986)', 'Bougeault_Andre'), option(diss_eq, 'dynamic dissipation rate equation', 'dissipation'), option(omega_eq, 'dynamic omega equation', 'omega'), option(length_eq, 'dynamic Mellor-Yamada q^2 l-equation', 'Mellor_Yamada'), option(generic_eq, 'generic length scale (GLS)', 'gls')/),default=diss_eq)
631632
call branch%get(stab_method, 'stab_method', 'stability functions', &
632-
options=(/option(1, 'constant', 'constant'), option(Munk_Anderson, 'Munk and Anderson (1954)', 'Munk_Anderson'), option(Schumann_Gerz, 'Schumann and Gerz (1995)', 'Schumann_Gerz')/),default=1)
633+
options=(/option(1, 'constant', 'constant'), option(Munk_Anderson, 'Munk and Anderson (1954)', 'Munk_Anderson'), option(Schumann_Gerz, 'Schumann and Gerz (1995)', 'Schumann_Gerz'), option(ICON, 'Brueggemann et al. (2024)', 'ICON')/),default=1)
633634

634635
twig => branch%get_child('bc', 'boundary conditions')
635636
call twig%get(k_ubc, 'k_ubc', 'upper boundary condition for k-equation', &
@@ -2250,10 +2251,10 @@ subroutine report_model
22502251
LEVEL2 ' '
22512252
LEVEL3 'At the surface:'
22522253
LEVEL3 'spatial decay rate (no shear), alpha =', gen_alpha
2253-
LEVEL3 'length-scale slope (no shear), L =', gen_l
2254+
LEVEL3 'length-scale slope (no shear), L =', gen_l
22542255
LEVEL2 '--------------------------------------------------------'
22552256
LEVEL2 ' '
2256-
case(Xing_Davies)
2257+
case(Xing_Davies)
22572258
LEVEL2 ' '
22582259
LEVEL2 '--------------------------------------------------------'
22592260
LEVEL2 'You are using a one-equation model'
@@ -3000,6 +3001,8 @@ subroutine stabilityfunctions(nlev)
30003001
call cmue_ma(nlev)
30013002
case(Schumann_Gerz)
30023003
call cmue_sg(nlev)
3004+
case(ICON)
3005+
call cmue_icon(nlev)
30033006
case default
30043007

30053008
STDERR '... not a valid stability function'
@@ -3115,6 +3118,9 @@ subroutine compute_cm0(turb_method,stab_method,scnd_method)
31153118
case(Schumann_Gerz)
31163119
cm0 = cm0_fix
31173120
cmsf = cm0_fix
3121+
case(ICON)
3122+
cm0 = cm0_fix
3123+
cmsf = cm0_fix
31183124
case default
31193125

31203126
STDERR '... not a valid stability function to compute cm0'

0 commit comments

Comments
 (0)