diff --git a/modules/util/acspo_validate.py b/modules/util/acspo_validate.py index 10a11ce6d6b59b61a80e58ac630d5753acf67ba1..1e119ded5e28c36a5fdc6599e37762f540ab3e96 100644 --- a/modules/util/acspo_validate.py +++ b/modules/util/acspo_validate.py @@ -33,7 +33,24 @@ def acspo_validate(oper_file, cspp_file): idxs_lat = np.isin(cntr_lat_oper, cntr_lat_cspp, assume_unique=True) idxs_lon = np.isin(cntr_lon_oper, cntr_lon_cspp, assume_unique=True) - print(np.sum(idxs_lon), np.sum(idxs_lat)) + + start_idx_oper = -1 + stop_idx_oper = -1 + start_idx_cspp = -1 + stop_idx_cspp = -1 + + for k in range(len(cntr_lat_oper)): + c_a = np.isclose(cntr_lat_oper[k], cntr_lat_cspp) + if np.size(np.nonzero(c_a)[0]) == 1: + if start_idx_oper == -1: + start_idx_oper = k + start_idx_cspp = np.nonzero(c_a)[0][0] + else: + stop_idx_oper = k + stop_idx_cspp = np.nonzero(c_a)[0][0] + + print(start_idx_oper, stop_idx_oper) + print(start_idx_cspp, stop_idx_cspp)