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
aa27ec95
Commit
aa27ec95
authored
7 months ago
by
Evgeny Mortikov
Browse files
Options
Downloads
Patches
Plain Diff
scm dynamics implementation minor update
parent
5ddc1309
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
obl_scm.f90
+65
-52
65 additions, 52 deletions
obl_scm.f90
with
65 additions
and
52 deletions
obl_scm.f90
+
65
−
52
View file @
aa27ec95
...
...
@@ -130,49 +130,61 @@ module obl_scm
end
subroutine
advance_dynamics_eq_scm
subroutine
set_temperature_eq_rhs
(
Theta_rhs
,
n
z
)
! --------------------------------------------------------------------------------
subroutine
set_temperature_eq_rhs
(
Theta_rhs
,
c
z
)
!< @brief set RHS for Theta equation
integer
,
intent
(
in
)
::
nz
!< number of z-steps
real
,
intent
(
out
)
::
Theta_rhs
(
nz
)
!< RHS
integer
::
k
!< counter
! --------------------------------------------------------------------------------
integer
,
intent
(
in
)
::
cz
!< grid size
real
,
intent
(
out
)
::
Theta_rhs
(
cz
)
!< RHS
integer
::
k
! --------------------------------------------------------------------------------
do
k
=
1
,
n
z
do
k
=
1
,
c
z
Theta_rhs
(
k
)
=
0
end
do
end
subroutine
subroutine
set_salinity_eq_rhs
(
Salin_rhs
,
nz
)
! --------------------------------------------------------------------------------
subroutine
set_salinity_eq_rhs
(
Salin_rhs
,
cz
)
!< @brief set RHS for Salinity equation
integer
,
intent
(
in
)
::
nz
!< number of z-steps
real
,
intent
(
out
)
::
Salin_rhs
(
nz
)
!< RHS
integer
::
k
!< counter
! --------------------------------------------------------------------------------
integer
,
intent
(
in
)
::
cz
!< grid size
real
,
intent
(
out
)
::
Salin_rhs
(
cz
)
!< RHS
integer
::
k
! --------------------------------------------------------------------------------
do
k
=
1
,
n
z
do
k
=
1
,
c
z
Salin_rhs
(
k
)
=
0
end
do
end
subroutine
subroutine
set_dynamics_eq_rhs
(
U_rhs
,
V_rhs
,
U
,
V
,
f
,
nz
)
!< @brief set RHS for U equation
integer
,
intent
(
in
)
::
nz
!< number of z-steps
real
,
intent
(
in
)
::
U
(
nz
)
!< V, [m/s]
real
,
intent
(
in
)
::
V
(
nz
)
!< V, [m/s]
real
,
intent
(
in
)
::
f
real
,
intent
(
out
)
::
U_rhs
(
nz
)
!< RHS
real
,
intent
(
out
)
::
V_rhs
(
nz
)
!< RHS
integer
::
k
!< counter
! --------------------------------------------------------------------------------
subroutine
set_dynamics_eq_rhs
(
U_rhs
,
V_rhs
,
U
,
V
,
f
,
cz
)
!< @brief set RHS for U, V equations
! --------------------------------------------------------------------------------
integer
,
intent
(
in
)
::
cz
!< grid size
real
,
intent
(
out
)
::
U_rhs
(
cz
),
V_rhs
(
cz
)
!< RHS
real
,
intent
(
in
)
::
U
(
cz
)
!< U, [m/s]
real
,
intent
(
in
)
::
V
(
cz
)
!< V, [m/s]
real
,
intent
(
in
)
::
f
!< coriolis frequency [1/s]
do
k
=
1
,
nz
integer
::
k
! --------------------------------------------------------------------------------
do
k
=
1
,
cz
U_rhs
(
k
)
=
-
f
*
(
V
(
k
)
-
Vg
)
V_rhs
(
k
)
=
-
f
*
(
U
(
k
)
-
Vg
)
end
do
end
subroutine
! --------------------------------------------------------------------------------
subroutine
solve_scalar_eq
(
Field
,
Kvisc
,
nz
,
dz
,
dt
,
flux_surf
,
flux_bot
,
f_right
)
!< @brief solver for equation for scalar fields (temperature and salinity)
! --------------------------------------------------------------------------------
integer
,
intent
(
in
)
::
nz
!< number of steps in z (depth), [m]
real
,
intent
(
in
)
::
dt
!< time step [s]
...
...
@@ -239,6 +251,7 @@ module obl_scm
subroutine
solve_vector_eq
(
Field
,
Kvisc
,
nz
,
dz
,
dt
,
flux_surf
,
flux_bot
,
f_right
)
!< @brief solver for equation for vectors (components of current velocity)
! --------------------------------------------------------------------------------
integer
,
intent
(
in
)
::
nz
!< number of steps in z (depth), [m]
real
,
intent
(
in
)
::
dt
!< time step [s]
...
...
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