Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ocean-mixing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inmcm-mirror
ocean-mixing
Commits
48469f17
Commit
48469f17
authored
6 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
adding turbulence closure explicit initialization
parent
0ddc8885
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
obl_k_epsilon.f90
+25
-0
25 additions, 0 deletions
obl_k_epsilon.f90
obl_main.f90
+23
-14
23 additions, 14 deletions
obl_main.f90
obl_pph.f90
+17
-1
17 additions, 1 deletion
obl_pph.f90
obl_pph_dyn.f90
+22
-0
22 additions, 0 deletions
obl_pph_dyn.f90
with
87 additions
and
15 deletions
obl_k_epsilon.f90
+
25
−
0
View file @
48469f17
...
@@ -16,6 +16,7 @@ module obl_k_epsilon
...
@@ -16,6 +16,7 @@ module obl_k_epsilon
! public interface
! public interface
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
public
::
init_turbulence_closure
public
::
advance_turbulence_closure
public
::
advance_turbulence_closure
public
::
define_stability_functions
public
::
define_stability_functions
...
@@ -63,6 +64,30 @@ module obl_k_epsilon
...
@@ -63,6 +64,30 @@ module obl_k_epsilon
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
end
subroutine
end
subroutine
! --------------------------------------------------------------------------------
subroutine
init_turbulence_closure
(
param
,
bc
,
grid
)
!< @brief advance turbulence closure
! ----------------------------------------------------------------------------
use
obl_state
type
(
kepsilonParamType
),
intent
(
in
)
::
param
type
(
oblBcType
),
intent
(
in
)
::
bc
type
(
gridDataType
),
intent
(
in
)
::
grid
! --------------------------------------------------------------------------------
call
TKE_init
(
TKE
,
param
,
grid
%
cz
)
call
EPS_init
(
EPS
,
param
,
grid
%
cz
,
grid
%
height
)
call
TKE_bc
(
TKE
,
&
bc
%
U_dyn0
,
bc
%
U_dynH
,
param
,
grid
%
cz
)
call
EPS_bc
(
EPS
,
&
bc
%
U_dyn0
,
bc
%
U_dynH
,
param
,
grid
%
dz
,
grid
%
cz
)
call
get_eddy_viscosity
(
Km
,
TKE
,
EPS
,
param
,
grid
)
call
get_eddy_diffusivity
(
Kh
,
Km
,
param
,
grid
)
end
subroutine
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
!< @brief advance turbulence closure
!< @brief advance turbulence closure
...
...
This diff is collapsed.
Click to expand it.
obl_main.f90
+
23
−
14
View file @
48469f17
...
@@ -27,12 +27,15 @@ program obl_main
...
@@ -27,12 +27,15 @@ program obl_main
use
obl_bc
use
obl_bc
use
obl_pph
,
only
:
pphParamType
,
&
use
obl_pph
,
only
:
pphParamType
,
&
define_stability_functions_pph
=>
define_stability_functions
,
&
define_stability_functions_pph
=>
define_stability_functions
,
&
init_turbulence_closure_pph
=>
init_turbulence_closure
,
&
advance_turbulence_closure_pph
=>
advance_turbulence_closure
advance_turbulence_closure_pph
=>
advance_turbulence_closure
use
obl_pph_dyn
,
only
:
pphDynParamType
,
&
use
obl_pph_dyn
,
only
:
pphDynParamType
,
&
define_stability_functions_pph_dyn
=>
define_stability_functions
,
&
define_stability_functions_pph_dyn
=>
define_stability_functions
,
&
init_turbulence_closure_pph_dyn
=>
init_turbulence_closure
,
&
advance_turbulence_closure_pph_dyn
=>
advance_turbulence_closure
advance_turbulence_closure_pph_dyn
=>
advance_turbulence_closure
use
obl_k_epsilon
,
only
:
kepsilonParamType
,
&
use
obl_k_epsilon
,
only
:
kepsilonParamType
,
&
define_stability_functions_k_epsilon
=>
define_stability_functions
,
&
define_stability_functions_k_epsilon
=>
define_stability_functions
,
&
init_turbulence_closure_k_epsilon
=>
init_turbulence_closure
,
&
advance_turbulence_closure_k_epsilon
=>
advance_turbulence_closure
,
&
advance_turbulence_closure_k_epsilon
=>
advance_turbulence_closure
,
&
TKE_init
,
EPS_init
,
TKE_bc
,
EPS_bc
TKE_init
,
EPS_init
,
TKE_bc
,
EPS_bc
use
obl_io_plt
use
obl_io_plt
...
@@ -191,8 +194,6 @@ program obl_main
...
@@ -191,8 +194,6 @@ program obl_main
write
(
*
,
*
)
' FAILURE! > unable to set time '
write
(
*
,
*
)
' FAILURE! > unable to set time '
return
return
endif
endif
time_current
=
time_begin
time_index
=
1
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
!< allocating state vector
!< allocating state vector
...
@@ -238,16 +239,24 @@ program obl_main
...
@@ -238,16 +239,24 @@ program obl_main
!< initialization of turbulence closure
!< initialization of turbulence closure
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
if
(
closure_mode
.eq.
3
.or.
closure_mode
.eq.
4
)
then
!< define fluxes & dynamic scales at startup
call
TKE_init
(
TKE
,
param_k_epsilo
n
,
grid
%
cz
)
call
advance_surface_fluxes
(
bc
,
time_begi
n
,
grid
)
call
EPS_init
(
EPS
,
param_k_epsilon
,
grid
%
cz
,
grid
%
height
)
call
advance_bottom_fluxes
(
bc
,
time_begin
,
grid
)
!< have to define Km, Kh at init
if
(
closure_mode
.eq.
1
)
then
Km
=
0.0
call
define_stability_functions_pph
(
param_pph
,
bc
,
grid
)
Kh
=
0.0
call
init_turbulence_closure_pph
(
param_pph
,
bc
,
grid
)
else
if
(
closure_mode
.eq.
2
)
then
call
define_stability_functions_pph_dyn
(
param_pph_dyn
,
bc
,
grid
)
call
init_turbulence_closure_pph_dyn
(
param_pph_dyn
,
bc
,
grid
)
else
if
(
closure_mode
.eq.
4
)
then
call
define_stability_functions_k_epsilon
(
param_k_epsilon
,
bc
,
grid
)
call
init_turbulence_closure_k_epsilon
(
param_k_epsilon
,
bc
,
grid
)
endif
endif
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
time_current
=
time_begin
time_index
=
1
do
while
(
time_current
<
time_end
)
do
while
(
time_current
<
time_end
)
! ----------------------------------------------------------------------------
! ----------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
obl_pph.f90
+
17
−
1
View file @
48469f17
...
@@ -15,6 +15,7 @@ module obl_pph
...
@@ -15,6 +15,7 @@ module obl_pph
! public interface
! public interface
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
public
::
init_turbulence_closure
public
::
advance_turbulence_closure
public
::
advance_turbulence_closure
public
::
define_stability_functions
public
::
define_stability_functions
...
@@ -58,6 +59,21 @@ module obl_pph
...
@@ -58,6 +59,21 @@ module obl_pph
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
end
subroutine
end
subroutine
! --------------------------------------------------------------------------------
subroutine
init_turbulence_closure
(
param
,
bc
,
grid
)
!< @brief advance turbulence closure
! ----------------------------------------------------------------------------
use
obl_state
type
(
pphParamType
),
intent
(
in
)
::
param
type
(
oblBcType
),
intent
(
in
)
::
bc
type
(
gridDataType
),
intent
(
in
)
::
grid
! --------------------------------------------------------------------------------
call
get_eddy_viscosity
(
Km
,
Ri_grad
,
param
,
grid
)
call
get_eddy_diffusivity
(
Kh
,
Ri_grad
,
param
,
grid
)
end
subroutine
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
!< @brief advance turbulence closure
!< @brief advance turbulence closure
...
...
This diff is collapsed.
Click to expand it.
obl_pph_dyn.f90
+
22
−
0
View file @
48469f17
...
@@ -17,6 +17,7 @@ module obl_pph_dyn
...
@@ -17,6 +17,7 @@ module obl_pph_dyn
! public interface
! public interface
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
public
::
init_turbulence_closure
public
::
advance_turbulence_closure
public
::
advance_turbulence_closure
public
::
define_stability_functions
public
::
define_stability_functions
...
@@ -60,6 +61,27 @@ module obl_pph_dyn
...
@@ -60,6 +61,27 @@ module obl_pph_dyn
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
call
get_Ri_gradient
(
Ri_grad
,
N2
,
S2
,
param
%
c_S2_min
,
grid
)
end
subroutine
end
subroutine
! --------------------------------------------------------------------------------
subroutine
init_turbulence_closure
(
param
,
bc
,
grid
)
!< @brief advance turbulence closure
! ----------------------------------------------------------------------------
use
obl_state
type
(
pphDynParamType
),
intent
(
in
)
::
param
type
(
oblBcType
),
intent
(
in
)
::
bc
type
(
gridDataType
),
intent
(
in
)
::
grid
real
::
mld
! --------------------------------------------------------------------------------
call
get_mld
(
mld
,
N2
,
grid
%
dz
,
grid
%
cz
)
call
get_eddy_viscosity
(
Km
,
Ri_grad
,
&
bc
%
U_dynH
,
mld
,
param
,
grid
)
call
get_eddy_diffusivity
(
Kh
,
Ri_grad
,
&
bc
%
U_dynH
,
mld
,
param
,
grid
)
end
subroutine
! --------------------------------------------------------------------------------
! --------------------------------------------------------------------------------
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
subroutine
advance_turbulence_closure
(
param
,
bc
,
grid
,
dt
)
!< @brief advance turbulence closure
!< @brief advance turbulence closure
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment