Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thopri
PyNEMO
Commits
18ee6b9b
Commit
18ee6b9b
authored
5 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
implemented multiple rim width fix
parent
84b3a171
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
inputs/namelist_remote.bdy
inputs/namelist_remote.bdy
+2
-2
pynemo/tide/nemo_bdy_tide3.py
pynemo/tide/nemo_bdy_tide3.py
+18
-12
No files found.
inputs/namelist_remote.bdy
View file @
18ee6b9b
...
...
@@ -62,13 +62,13 @@
! baroclinic velocities
ln_tra = .true. ! boundary conditions for T and S
ln_ice = .false. ! ice boundary condition
nn_rimwidth =
1
! width of the relaxation zone
nn_rimwidth =
9
! width of the relaxation zone
!------------------------------------------------------------------------------
! unstructured open boundaries tidal parameters
!------------------------------------------------------------------------------
ln_tide = .true. ! =T : produce bdy tidal conditions
sn_tide_model = '
tpxo
' ! Name of tidal model (fes|tpxo)
sn_tide_model = '
fes
' ! Name of tidal model (fes|tpxo)
clname(1) = 'M2' ! constituent name
clname(2) = 'S2'
ln_trans = .true. ! interpolate transport rather than
...
...
This diff is collapsed.
Click to expand it.
pynemo/tide/nemo_bdy_tide3.py
View file @
18ee6b9b
...
...
@@ -28,8 +28,8 @@ def nemo_bdy_tide_rot(setup, DstCoord, Grid_T, Grid_U, Grid_V, comp,tide_model):
dst_lat
=
DC
.
bdy_lonlat
[
g_type
][
'lat'
][
Grid_T
.
bdy_r
==
0
]
#nbdyz = len(Grid_T.bdy_i)
nbdyu
=
len
(
Grid_U
.
bdy_
i
)
nbdyv
=
len
(
Grid_V
.
bdy_
i
)
nbdyu
=
len
(
np
.
where
(
Grid_U
.
bdy_
r
==
0
)[
0
]
)
nbdyv
=
len
(
np
.
where
(
Grid_V
.
bdy_
r
==
0
)[
0
]
)
# TODO: change from if statement defining HC extract to string passed that defines HC extract script
# e.g. pass 'tpxo' for tpxo_extract_HC.py or 'fes' fro fes_extract_HC.py. This will make easier to add new
...
...
@@ -257,11 +257,14 @@ def nemo_bdy_tide_rot(setup, DstCoord, Grid_T, Grid_U, Grid_V, comp,tide_model):
dst_gsin
=
grid_angles
.
sinval
#retain only boundary points rotation information
tmp_gcos
=
np
.
zeros
(
Grid_U
.
bdy_i
.
shape
[
0
])
tmp_gsin
=
np
.
zeros
(
Grid_U
.
bdy_i
.
shape
[
0
])
for
index
in
range
(
Grid_U
.
bdy_i
.
shape
[
0
]):
tmp_gcos
[
index
]
=
dst_gcos
[
Grid_U
.
bdy_i
[
index
,
1
],
Grid_U
.
bdy_i
[
index
,
0
]]
tmp_gsin
[
index
]
=
dst_gsin
[
Grid_U
.
bdy_i
[
index
,
1
],
Grid_U
.
bdy_i
[
index
,
0
]]
tmp_gcos
=
np
.
zeros
(
len
(
np
.
where
(
Grid_U
.
bdy_r
==
0
)[
0
]))
tmp_gsin
=
np
.
zeros
(
len
(
np
.
where
(
Grid_U
.
bdy_r
==
0
)[
0
]))
bdy_r_in_i
=
Grid_U
.
bdy_i
[
Grid_U
.
bdy_r
==
0
]
for
index
in
range
(
len
(
np
.
where
(
Grid_U
.
bdy_r
==
0
)[
0
])):
tmp_gcos
[
index
]
=
dst_gcos
[
bdy_r_in_i
[
index
,
1
],
bdy_r_in_i
[
index
,
0
]]
tmp_gsin
[
index
]
=
dst_gsin
[
bdy_r_in_i
[
index
,
1
],
bdy_r_in_i
[
index
,
0
]]
dst_gcos
=
tmp_gcos
dst_gsin
=
tmp_gsin
...
...
@@ -276,11 +279,14 @@ def nemo_bdy_tide_rot(setup, DstCoord, Grid_T, Grid_U, Grid_V, comp,tide_model):
dst_gsin
=
grid_angles
.
sinval
#retain only boundary points rotation information
tmp_gcos
=
np
.
zeros
(
Grid_V
.
bdy_i
.
shape
[
0
])
tmp_gsin
=
np
.
zeros
(
Grid_V
.
bdy_i
.
shape
[
0
])
for
index
in
range
(
Grid_V
.
bdy_i
.
shape
[
0
]):
tmp_gcos
[
index
]
=
dst_gcos
[
Grid_V
.
bdy_i
[
index
,
1
],
Grid_V
.
bdy_i
[
index
,
0
]]
tmp_gsin
[
index
]
=
dst_gsin
[
Grid_V
.
bdy_i
[
index
,
1
],
Grid_V
.
bdy_i
[
index
,
0
]]
tmp_gcos
=
np
.
zeros
(
len
(
np
.
where
(
Grid_V
.
bdy_r
==
0
)[
0
]))
tmp_gsin
=
np
.
zeros
(
len
(
np
.
where
(
Grid_V
.
bdy_r
==
0
)[
0
]))
bdy_r_in_i
=
Grid_V
.
bdy_i
[
Grid_V
.
bdy_r
==
0
]
for
index
in
range
(
len
(
np
.
where
(
Grid_V
.
bdy_r
==
0
)[
0
])):
tmp_gcos
[
index
]
=
dst_gcos
[
bdy_r_in_i
[
index
,
1
],
bdy_r_in_i
[
index
,
0
]]
tmp_gsin
[
index
]
=
dst_gsin
[
bdy_r_in_i
[
index
,
1
],
bdy_r_in_i
[
index
,
0
]]
dst_gcos
=
tmp_gcos
dst_gsin
=
tmp_gsin
...
...
This diff is collapsed.
Click to expand it.
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