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
fc0bb079
Commit
fc0bb079
authored
5 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
fix that generates list of FES harmonics automatically
parent
71d5242a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
5 deletions
+46
-5
docs/source/tides.rst
docs/source/tides.rst
+38
-0
inputs/namelist_remote.bdy
inputs/namelist_remote.bdy
+1
-1
pynemo/tide/fes_extract_HC.py
pynemo/tide/fes_extract_HC.py
+6
-4
pynemo/tide/nemo_bdy_tide3.py
pynemo/tide/nemo_bdy_tide3.py
+1
-0
No files found.
docs/source/tides.rst
0 → 100644
View file @
fc0bb079
Tidal Boundary Conditions Generation
====================================
By providing a global tidal model dataset (TPXO and FES are currently supported) PyNEMO can generate boundary conditions for the
NEMO configuration supplied using the namelist file.
To use the namelist needs to be configured with the required options. These are listed below::
ln_tide = .true. ! =T : produce bdy tidal conditions
sn_tide_model = 'fes' ! Name of tidal model (fes|tpxo)
clname(1) = 'M2' ! constituent name
clname(2) = 'S2'
clname(3) = 'O1'
clname(4) = 'K1'
clname(5) = 'N2'
ln_trans = .false. ! interpolate transport rather than velocities
! TPXO file locations
sn_tide_grid = './grid_tpxo7.2.nc'
sn_tide_h = './h_tpxo7.2.nc'
sn_tide_u = './u_tpxo7.2.nc'
! location of FES data
sn_tide_fes = './FES/'
these options define the location of the tidal model datasets, note this differs depending on model as TPXO has all harmonic
constants in one netcdf file whereas FES has three separate netcdf files for each constant. Extra harmonics can be appended
to the clname(n) list FES supports 34 constants and TPXO7.2 has 13 to choose from. Other versions of TPXO should work with PyNEMO
but have not been yet been tested.
So far the tidal model datasets have been downloaded and used locally but could also be stored on a TREDDS server although this has
not been tested to generate tidal boundaries
Future work
-----------
Create options of harmonic constants to request rather than manually specifying a list. These could be based on common requirements
and/or based on the optimal harmonics to use for a specified time frame.
This diff is collapsed.
Click to expand it.
inputs/namelist_remote.bdy
View file @
fc0bb079
...
...
@@ -75,7 +75,7 @@
clname(4) = 'K1'
clname(5) = 'N2'
ln_trans = .false. ! interpolate transport rather than
! velocities
! velocities
!------------------------------------------------------------------------------
! Time information
!------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
pynemo/tide/fes_extract_HC.py
View file @
fc0bb079
...
...
@@ -37,10 +37,12 @@ class HcExtract(object):
mu_name
=
'mask_u'
mv_name
=
'mask_v'
#constituents = ['2N2', 'EPS2', 'J1', 'K1', 'K2', 'L2', 'LA2', 'M2', 'M3', 'M4', 'M6', 'M8', 'MF', 'MKS2',
#'MM', 'MN4', 'MS4', 'MSF', 'MSQM', 'MTM', 'MU2', 'N2', 'N4', 'NU2', 'O1', 'P1', 'Q1', 'R2',
#'S1', 'S2', 'S4', 'SA', 'SSA', 'T2']
constituents
=
[
'M2'
,
'S2'
,
'O1'
,
'K1'
,
'N2'
]
# create list of HC using namelist file as reference
constituents
=
list
(
settings
[
'clname'
].
values
())
# clean strings in list and change to upper case if not already
for
i
in
range
(
len
(
constituents
)):
constituents
[
i
]
=
constituents
[
i
].
strip
(
"',/
\n
"
)
constituents
[
i
]
=
constituents
[
i
].
upper
()
self
.
cons
=
constituents
self
.
mask_dataset
=
{}
...
...
This diff is collapsed.
Click to expand it.
pynemo/tide/nemo_bdy_tide3.py
View file @
fc0bb079
...
...
@@ -2,6 +2,7 @@
Module to extract constituents for the input grid mapped onto output grid
@author: Mr. Srikanth Nagella
@author: thopri
'''
# pylint: disable=E1103
...
...
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