Index: trunk/SDToolBox/extract_data.py =================================================================== diff -u -r204 -r205 --- trunk/SDToolBox/extract_data.py (.../extract_data.py) (revision 204) +++ trunk/SDToolBox/extract_data.py (.../extract_data.py) (revision 205) @@ -118,7 +118,6 @@ # positions where we are in the sea logging.info(f"Generating sea mask with mask: {sea_mask}") - # return sea_mask, LON[np.argsort(LON[:, 1])], LAT[np.argsort(LAT[:, 1])] return sea_mask, LON, LAT @staticmethod @@ -555,7 +554,9 @@ nn_idx = indexes[0], indexes[1] unique_values, unique_idx = np.unique(vals, axis=0, return_index=True) if index.shape[0] > 1: - input_data.sea_mask = sea_mask[np.ix_(indexes[0], indexes[1])] + input_data.sea_mask = sea_mask[ + np.ix_(np.sort(indexes[0]), np.sort(indexes[1])) + ] else: input_data.sea_mask = np.array(sea_mask[indexes[0], indexes[1]]) logging.info(f"Added sea mask to input_data: {input_data.sea_mask}")