From b5960b7176ce5ace71a1ebe53c26b7d6966cb7b8 Mon Sep 17 00:00:00 2001 From: sbiri <sbiri@noc.ac.uk> Date: Fri, 17 Jul 2020 10:15:10 +0100 Subject: [PATCH] line 115, added break if basic inputs are not the appropriate type --- AirSeaFluxCode.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AirSeaFluxCode.py b/AirSeaFluxCode.py index fce5b2a..31cc9e1 100644 --- a/AirSeaFluxCode.py +++ b/AirSeaFluxCode.py @@ -112,6 +112,9 @@ def AirSeaFluxCode(spd, T, SST, lat=None, hum=None, P=None, """ logging.basicConfig(filename='flux_calc.log', format='%(asctime)s %(message)s',level=logging.INFO) + if ((type(spd) != np.ndarray) or (type(T) != np.ndarray) or + (type(SST) != np.ndarray)): + sys.exit("input type of spd, T and SST should be numpy.ndarray") ref_ht, tlapse = 10, 0.0098 # reference height, lapse rate h_in = get_heights(hin, len(spd)) # heights of input measurements/fields h_out = get_heights(hout, 1) # desired height of output variables -- GitLab