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
c85081f8
Commit
c85081f8
authored
7 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
boundary conditions module update
parent
e9e7e362
No related branches found
No related tags found
Loading
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
obl_bc.f90
+31
-19
31 additions, 19 deletions
obl_bc.f90
obl_main.f90
+3
-0
3 additions, 0 deletions
obl_main.f90
obl_scm.f90
+3
-0
3 additions, 0 deletions
obl_scm.f90
with
37 additions
and
19 deletions
obl_bc.f90
+
31
−
19
View file @
c85081f8
module
obl_bc
!< @brief boundary conditions module
! --------------------------------------------------------------------------------
! modules used
use
obl_common_phys
use
obl_state_eq
use
obl_math
! --------------------------------------------------------------------------------
! directives list
implicit
none
private
real
,
parameter
::
CD
=
0.001
! public interface
! --------------------------------------------------------------------------------
public
::
get_dyn_velocity
public
::
set_bottom_friction
! --------------------------------------------------------------------------------
!> @brief boundary conditions datatype
type
,
public
::
oblBcType
...
...
@@ -35,28 +39,36 @@ module obl_bc
contains
subroutine
get_dyn_velocity
(
dyn_velocity
,
flux_u
,
flux_v
)
! ----------------------------------------------------------------------------
subroutine
get_dyn_velocity
(
U_dyn
,
u_momentum_flux
,
v_momentum_flux
)
!< @brief get dynamic velocity
real
,
intent
(
out
)
::
dyn_velocity
real
,
intent
(
in
)
::
flux_u
,
flux_v
! ----------------------------------------------------------------------------
dyn_velocity
=
(
flux_u
**
(
2.0
)
+
flux_v
**
(
2.0
))
**
(
1.0
/
4.0
)
real
,
intent
(
out
)
::
U_dyn
real
,
intent
(
in
)
::
u_momentum_flux
,
v_momentum_flux
! ----------------------------------------------------------------------------
U_dyn
=
(
u_momentum_flux
**
(
2.0
)
+
v_momentum_flux
**
(
2.0
))
**
(
1.0
/
4.0
)
end
subroutine
subroutine
set_bottom_friction
(
flux_u_bot
,
flux_v_bot
,
U
,
V
,
nz
)
!< @brief set bottom u-momentum flux
real
,
intent
(
out
)
::
flux_u_bot
,
flux_v_bot
!< u_dyn0**2, v_dyn0**2,[(m/s)**2] (?)
! ----------------------------------------------------------------------------
subroutine
set_bottom_friction
(
u_momentum_flux0
,
v_momentum_flux0
,
U
,
V
,
Cd
,
cz
)
!< @brief set bottom momentum flux (kinematic)
! ----------------------------------------------------------------------------
real
,
intent
(
out
)
::
u_momentum_flux0
,
v_momentum_flux0
!< tau / rho, [(m/s)**2]
integer
,
intent
(
in
)
::
cz
!< grid size
real
,
intent
(
in
),
dimension
(
cz
)
::
U
,
V
integer
,
intent
(
in
)
::
nz
!< number of timesteps
real
,
intent
(
in
),
dimension
(
nz
)
::
U
,
V
real
,
intent
(
in
)
::
Cd
!< drag coefficient
real
U_bot
,
V_bot
real
U0
,
V0
! ----------------------------------------------------------------------------
U
_bot
=
U
(
1
)
V
_bot
=
V
(
1
)
U
0
=
U
(
1
)
V
0
=
V
(
1
)
flux_u_bot
=
C
D
*
sqrt
(
U
_bot
**
2
+
V
_bot
**
2
)
*
U
_bot
flux_v_bot
=
C
D
*
sqrt
(
U
_bot
**
2
+
V
_bot
**
2
)
*
V
_bot
u_momentum_flux0
=
C
d
*
sqrt
(
U
0
**
2
+
V
0
**
2
)
*
U
0
v_momentum_flux0
=
C
d
*
sqrt
(
U
0
**
2
+
V
0
**
2
)
*
V
0
end
subroutine
...
...
This diff is collapsed.
Click to expand it.
obl_main.f90
+
3
−
0
View file @
c85081f8
...
...
@@ -11,6 +11,7 @@ program obl_main
! modules used
use
obl_grid
use
obl_state
use
obl_state_eq
use
obl_common_phys
use
obl_tforcing
use
obl_tslice
...
...
@@ -80,6 +81,8 @@ program obl_main
integer
,
parameter
::
obl_setup
=
1
! 1 - Kato-Phillips, 2 - Papa station
real
,
parameter
::
Cd0
=
0.001
! bottom drag coefficient
real
::
mld
!< mixed layer depth, [m]
real
::
lab_mld
!< theoretical mixed layer depth, [m]
...
...
This diff is collapsed.
Click to expand it.
obl_scm.f90
+
3
−
0
View file @
c85081f8
...
...
@@ -145,6 +145,8 @@ module obl_scm
subroutine
advance_state_eq_scm
(
bc
,
grid
,
dt
)
!> @brief single-column model time advancement
! ----------------------------------------------------------------------------
use
obl_state_eq
type
(
oblBcType
),
intent
(
in
)
::
bc
type
(
gridDataType
),
intent
(
in
)
::
grid
...
...
@@ -178,6 +180,7 @@ module obl_scm
!< @brief set RHS for Theta equation
! --------------------------------------------------------------------------------
use
obl_common_phys
use
obl_state_eq
integer
,
intent
(
in
)
::
cz
!< grid size
...
...
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