Commit 71d5242a authored by thopri's avatar thopri
Browse files

fixed multiple HC crash bug

parent 654016de
......@@ -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 Miniconda 3.7 and found to install the enironment correctly.
The conda environment yaml file has been tested with miniconda 3.7 and found to install the environment 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.
......
......@@ -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
!------------------------------------------------------------------------------
......
......@@ -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]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment