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
71d5242a
Commit
71d5242a
authored
5 years ago
by
thopri
Browse files
Options
Download
Email Patches
Plain Diff
fixed multiple HC crash bug
parent
654016de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
README.rst
README.rst
+2
-2
inputs/namelist_remote.bdy
inputs/namelist_remote.bdy
+3
-0
pynemo/tide/fes_extract_HC.py
pynemo/tide/fes_extract_HC.py
+3
-3
No files found.
README.rst
View file @
71d5242a
...
...
@@ -86,7 +86,7 @@ New runs are appended onto the end of the log file so it will periodically need
The above path for Java Home was valid for a Macbook Pro 2015 with macOS Catalina and Java SDK 13.0.2
however for different java versions, operating systems etc this may be different
The conda environment yaml file has been tested with
M
iniconda 3.7 and found to install the enironment correctly.
The conda environment yaml file has been tested with
m
iniconda 3.7 and found to install the en
v
ironment correctly.
Contribution guidelines
-----------------------
...
...
@@ -116,7 +116,7 @@ Unit Tests
To test operation of the PyNEMO module, running the PyTest script in the unit tests folder will perform a range of tests on different child grids,
e.g. checking the interpolation of the source data on to the child grid. To do this the following command is required::
$ pytest -
q
pynemo/pynemo_unit_test.py
$ pytest -
v
pynemo/pynemo_unit_test.py
The results of the test will show if all tests pass or the errors that result from failed tests.
...
...
This diff is collapsed.
Click to expand it.
inputs/namelist_remote.bdy
View file @
71d5242a
...
...
@@ -71,6 +71,9 @@
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
!------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
pynemo/tide/fes_extract_HC.py
View file @
71d5242a
...
...
@@ -40,7 +40,7 @@ class HcExtract(object):
#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'
]
constituents
=
[
'M2'
,
'S2'
,
'O1'
,
'K1'
,
'N2'
]
self
.
cons
=
constituents
self
.
mask_dataset
=
{}
...
...
@@ -192,8 +192,8 @@ class HcExtract(object):
def
interpolate_constituents
(
self
,
nc_dataset
,
real_var_name
,
img_var_name
,
lon_var_name
,
lat_var_name
,
lon
,
lat
,
height_data
=
None
,
maskname
=
None
):
""" Interpolates the tidal constituents along the given lat lon coordinates """
amp
=
np
.
zeros
((
len
(
nc_dataset
),
lon
.
shape
[
0
]))
gph
=
np
.
zeros
((
len
(
nc_dataset
),
lon
.
shape
[
0
]))
amp
=
np
.
zeros
((
len
(
nc_dataset
[
2
]
),
lon
.
shape
[
0
]))
gph
=
np
.
zeros
((
len
(
nc_dataset
[
2
]
),
lon
.
shape
[
0
]))
data
=
np
.
array
(
np
.
ravel
(
nc_dataset
[
2
]),
dtype
=
complex
)
data
.
imag
=
np
.
array
(
np
.
ravel
(
nc_dataset
[
3
]))
...
...
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