Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Knut Klingbeil
getm
Commits
b0b53e97
Commit
b0b53e97
authored
Jan 18, 2019
by
Knut
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bdy_2d' into bdy_3d
parents
db7c11b6
45df881f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
16 deletions
+52
-16
src/2d/bdy_2d.F90
src/2d/bdy_2d.F90
+52
-16
No files found.
src/2d/bdy_2d.F90
View file @
b0b53e97
...
...
@@ -364,16 +364,18 @@
select
case
(
bdy_2d_type
(
l
))
case
(
ZERO_GRADIENT
,
CLAMPED_VEL
,
FLATHER_VEL
)
do
j
=
wfj
(
n
),
wlj
(
n
)
z
(
i
,
j
)
=
z
(
i
+1
,
j
)
if
(
az
(
i
+1
,
j
)
.ne.
0
)
z
(
i
,
j
)
=
z
(
i
+1
,
j
)
end
do
case
(
SOMMERFELD
)
do
j
=
wfj
(
n
),
wlj
(
n
)
if
(
az
(
i
+1
,
j
)
.ne.
0
)
then
cfl
=
sqrt
(
g
*
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
+1
,
j
)))
*
dtm
/
DXU
z
(
i
,
j
)
=
(
&
(
_
ONE_
-
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
z
(
i
,
j
)
&
+
(
_
ONE_
+
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
zo
(
i
+1
,
j
)
&
-
(
_
ONE_
-
_
TWO_
*
cfl
*
theta
)
*
z
(
i
+1
,
j
)
&
)/(
_
ONE_
+
_
TWO_
*
cfl
*
theta
)
end
if
end
do
case
(
CLAMPED_ELEV
,
CLAMPED
)
do
j
=
wfj
(
n
),
wlj
(
n
)
...
...
@@ -383,13 +385,16 @@
end
do
case
(
FLATHER_ELEV
)
do
j
=
wfj
(
n
),
wlj
(
n
)
if
(
az
(
i
+1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
+1
,
j
))
! Note (KK): note approximation of sse at vel-time stage
a
=
ramp
*
bdy_data
(
kl
)
&
-
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
U
(
i
,
j
)
-
ramp
*
bdy_data_u
(
kl
)
*
depth
)
z
(
i
,
j
)
=
max
(
a
,
-
H
(
i
,
j
)
+
min_depth
)
a
=
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
U
(
i
,
j
)
-
ramp
*
bdy_data_u
(
kl
)
*
depth
)
else
a
=
_
ZERO_
end
if
z
(
i
,
j
)
=
max
(
ramp
*
bdy_data
(
kl
)
-
a
,
-
H
(
i
,
j
)
+
min_depth
)
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -403,16 +408,18 @@
select
case
(
bdy_2d_type
(
l
))
case
(
ZERO_GRADIENT
,
CLAMPED_VEL
,
FLATHER_VEL
)
do
i
=
nfi
(
n
),
nli
(
n
)
z
(
i
,
j
)
=
z
(
i
,
j
-1
)
if
(
az
(
i
,
j
-1
)
.ne.
0
)
z
(
i
,
j
)
=
z
(
i
,
j
-1
)
end
do
case
(
SOMMERFELD
)
do
i
=
nfi
(
n
),
nli
(
n
)
if
(
az
(
i
,
j
-1
)
.ne.
0
)
then
cfl
=
sqrt
(
g
*
_
HALF_
*
(
D
(
i
,
j
-1
)
+
D
(
i
,
j
)))
*
dtm
/
DYVJM1
z
(
i
,
j
)
=
(
&
(
_
ONE_
-
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
z
(
i
,
j
)
&
+
(
_
ONE_
+
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
zo
(
i
,
j
-1
)
&
-
(
_
ONE_
-
_
TWO_
*
cfl
*
theta
)
*
z
(
i
,
j
-1
)
&
)/(
_
ONE_
+
_
TWO_
*
cfl
*
theta
)
end
if
end
do
case
(
CLAMPED_ELEV
,
CLAMPED
)
do
i
=
nfi
(
n
),
nli
(
n
)
...
...
@@ -422,13 +429,16 @@
end
do
case
(
FLATHER_ELEV
)
do
i
=
nfi
(
n
),
nli
(
n
)
if
(
az
(
i
,
j
-1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
-1
)
+
D
(
i
,
j
))
! Note (KK): note approximation of sse at vel-time stage
a
=
ramp
*
bdy_data
(
kl
)
&
+
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
V
(
i
,
j
-1
)
-
ramp
*
bdy_data_v
(
kl
)
*
depth
)
z
(
i
,
j
)
=
max
(
a
,
-
H
(
i
,
j
)
+
min_depth
)
a
=
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
V
(
i
,
j
-1
)
-
ramp
*
bdy_data_v
(
kl
)
*
depth
)
else
a
=
_
ZERO_
end
if
z
(
i
,
j
)
=
max
(
ramp
*
bdy_data
(
kl
)
+
a
,
-
H
(
i
,
j
)
+
min_depth
)
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -442,16 +452,18 @@
select
case
(
bdy_2d_type
(
l
))
case
(
ZERO_GRADIENT
,
CLAMPED_VEL
,
FLATHER_VEL
)
do
j
=
efj
(
n
),
elj
(
n
)
z
(
i
,
j
)
=
z
(
i
-1
,
j
)
if
(
az
(
i
-1
,
j
)
.ne.
0
)
z
(
i
,
j
)
=
z
(
i
-1
,
j
)
end
do
case
(
SOMMERFELD
)
do
j
=
efj
(
n
),
elj
(
n
)
if
(
az
(
i
-1
,
j
)
.ne.
0
)
then
cfl
=
sqrt
(
g
*
_
HALF_
*
(
D
(
i
-1
,
j
)
+
D
(
i
,
j
)))
*
dtm
/
DXUIM1
z
(
i
,
j
)
=
(
&
(
_
ONE_
-
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
z
(
i
,
j
)
&
+
(
_
ONE_
+
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
zo
(
i
-1
,
j
)
&
-
(
_
ONE_
-
_
TWO_
*
cfl
*
theta
)
*
z
(
i
-1
,
j
)
&
)/(
_
ONE_
+
_
TWO_
*
cfl
*
theta
)
end
if
end
do
case
(
CLAMPED_ELEV
,
CLAMPED
)
do
j
=
efj
(
n
),
elj
(
n
)
...
...
@@ -461,13 +473,16 @@
end
do
case
(
FLATHER_ELEV
)
do
j
=
efj
(
n
),
elj
(
n
)
if
(
az
(
i
-1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
-1
,
j
)
+
D
(
i
,
j
))
! Note (KK): note approximation of sse at vel-time stage
a
=
ramp
*
bdy_data
(
kl
)
&
+
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
U
(
i
-1
,
j
)
-
ramp
*
bdy_data_u
(
kl
)
*
depth
)
z
(
i
,
j
)
=
max
(
a
,
-
H
(
i
,
j
)
+
min_depth
)
a
=
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
U
(
i
-1
,
j
)
-
ramp
*
bdy_data_u
(
kl
)
*
depth
)
else
a
=
_
ZERO_
end
if
z
(
i
,
j
)
=
max
(
ramp
*
bdy_data
(
kl
)
+
a
,
-
H
(
i
,
j
)
+
min_depth
)
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -481,16 +496,18 @@
select
case
(
bdy_2d_type
(
l
))
case
(
ZERO_GRADIENT
,
CLAMPED_VEL
,
FLATHER_VEL
)
do
i
=
sfi
(
n
),
sli
(
n
)
z
(
i
,
j
)
=
z
(
i
,
j
+1
)
if
(
az
(
i
,
j
+1
)
.ne.
0
)
z
(
i
,
j
)
=
z
(
i
,
j
+1
)
end
do
case
(
SOMMERFELD
)
do
i
=
sfi
(
n
),
sli
(
n
)
if
(
az
(
i
,
j
+1
)
.ne.
0
)
then
cfl
=
sqrt
(
g
*
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
,
j
+1
)))
*
dtm
/
DYV
z
(
i
,
j
)
=
(
&
(
_
ONE_
-
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
z
(
i
,
j
)
&
+
(
_
ONE_
+
_
TWO_
*
cfl
*
(
_
ONE_
-
theta
))
*
zo
(
i
,
j
+1
)
&
-
(
_
ONE_
-
_
TWO_
*
cfl
*
theta
)
*
z
(
i
,
j
+1
)
&
)/(
_
ONE_
+
_
TWO_
*
cfl
*
theta
)
end
if
end
do
case
(
CLAMPED_ELEV
,
CLAMPED
)
do
i
=
sfi
(
n
),
sli
(
n
)
...
...
@@ -500,13 +517,16 @@
end
do
case
(
FLATHER_ELEV
)
do
i
=
sfi
(
n
),
sli
(
n
)
if
(
az
(
i
,
j
+1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
,
j
+1
))
! Note (KK): note approximation of sse at vel-time stage
a
=
ramp
*
bdy_data
(
kl
)
&
-
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
V
(
i
,
j
)
-
ramp
*
bdy_data_v
(
kl
)
*
depth
)
z
(
i
,
j
)
=
max
(
a
,
-
H
(
i
,
j
)
+
min_depth
)
a
=
_
TWO_
/
sqrt
(
g
*
depth
)
*
(
V
(
i
,
j
)
-
ramp
*
bdy_data_v
(
kl
)
*
depth
)
else
a
=
_
ZERO_
end
if
z
(
i
,
j
)
=
max
(
ramp
*
bdy_data
(
kl
)
-
a
,
-
H
(
i
,
j
)
+
min_depth
)
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -601,21 +621,25 @@
select
case
(
bdy_2d_type
(
l
))
case
(
FLATHER_VEL
)
do
j
=
wfj
(
n
),
wlj
(
n
)
if
(
az
(
i
+1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
+1
,
j
))
! Note (KK): note approximation of sse at vel-time stage
U
(
i
,
j
)
=
ramp
*
bdy_data_u
(
kl
)
*
depth
&
-
_
HALF_
*
sqrt
(
g
*
depth
)
*
(
z
(
i
,
j
)
-
ramp
*
bdy_data
(
kl
))
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
case
(
CLAMPED_VEL
,
CLAMPED
)
do
j
=
wfj
(
n
),
wlj
(
n
)
if
(
az
(
i
+1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
+1
,
j
))
U
(
i
,
j
)
=
ramp
*
bdy_data_u
(
kl
)
*
depth
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -630,21 +654,25 @@
select
case
(
bdy_2d_type
(
l
))
case
(
FLATHER_VEL
)
do
j
=
efj
(
n
),
elj
(
n
)
if
(
az
(
i
-1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
-1
,
j
)
+
D
(
i
,
j
))
! Note (KK): note approximation of sse at vel-time stage
U
(
i
-1
,
j
)
=
ramp
*
bdy_data_u
(
kl
)
*
depth
&
+
_
HALF_
*
sqrt
(
g
*
depth
)
*
(
z
(
i
,
j
)
-
ramp
*
bdy_data
(
kl
))
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
case
(
CLAMPED_VEL
,
CLAMPED
)
do
j
=
efj
(
n
),
elj
(
n
)
if
(
az
(
i
-1
,
j
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
-1
,
j
)
+
D
(
i
,
j
))
U
(
i
-1
,
j
)
=
ramp
*
bdy_data_u
(
kl
)
*
depth
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -662,21 +690,25 @@
select
case
(
bdy_2d_type
(
l
))
case
(
FLATHER_VEL
)
do
i
=
nfi
(
n
),
nli
(
n
)
if
(
az
(
i
,
j
-1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
-1
)
+
D
(
i
,
j
))
! Note (KK): note approximation of sse at vel-time stage
V
(
i
,
j
-1
)
=
ramp
*
bdy_data_v
(
kl
)
*
depth
&
+
_
HALF_
*
sqrt
(
g
*
depth
)
*
(
z
(
i
,
j
)
-
ramp
*
bdy_data
(
kl
))
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
case
(
CLAMPED_VEL
,
CLAMPED
)
do
i
=
nfi
(
n
),
nli
(
n
)
if
(
az
(
i
,
j
-1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
-1
)
+
D
(
i
,
j
))
V
(
i
,
j
-1
)
=
ramp
*
bdy_data_v
(
kl
)
*
depth
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
@@ -691,21 +723,25 @@
select
case
(
bdy_2d_type
(
l
))
case
(
FLATHER_VEL
)
do
i
=
sfi
(
n
),
sli
(
n
)
if
(
az
(
i
,
j
+1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
,
j
+1
))
! Note (KK): note approximation of sse at vel-time stage
V
(
i
,
j
)
=
ramp
*
bdy_data_v
(
kl
)
*
depth
&
-
_
HALF_
*
sqrt
(
g
*
depth
)
*
(
z
(
i
,
j
)
-
ramp
*
bdy_data
(
kl
))
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
case
(
CLAMPED_VEL
,
CLAMPED
)
do
i
=
sfi
(
n
),
sli
(
n
)
if
(
az
(
i
,
j
+1
)
.ne.
0
)
then
! Note (KK): approximate interface depths at vel-time stage
! by spatial mean at last sse-time stage
depth
=
_
HALF_
*
(
D
(
i
,
j
)
+
D
(
i
,
j
+1
))
V
(
i
,
j
)
=
ramp
*
bdy_data_v
(
kl
)
*
depth
end
if
k
=
k
+1
kl
=
kl
+
1
end
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment