From 5b31762e8223a5a34a9536137c0ff38617c938ba Mon Sep 17 00:00:00 2001 From: lb584 <lb584@cam.ac.uk> Date: Mon, 31 Jul 2023 13:28:56 +0100 Subject: [PATCH] comments, print statements and some variable renaming adding a list of wildcards used when searching for nc file - useful if reporting that none are found --- coordinator/EnvSuitPipeline.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/coordinator/EnvSuitPipeline.py b/coordinator/EnvSuitPipeline.py index 45725c3..80d160f 100644 --- a/coordinator/EnvSuitPipeline.py +++ b/coordinator/EnvSuitPipeline.py @@ -175,8 +175,12 @@ def run_pipeline(pipeline_config, region, dateString, extracted = False, prevent input_spatial_points_file = workPath + 'input_spatial_points.csv' if prevent_overwrite: assert not os.path.exists(input_spatial_points_file) shutil.copy(region_spatial_points_file,input_spatial_points_file) + """ + read in the input_spatial_points.csv file and get the number of spatial points which are marked as landpoint=True + (we will be finltering the non-landpoint locations) + """ spatial_points = pd.read_csv(input_spatial_points_file) - spatial_dim = spatial_points.shape[0] + spatial_dim = spatial_points[spatial_points['landpoint']].shape[0] # Generate extraction (input) and output temporal points files timeresolution = 3 # hours @@ -283,7 +287,7 @@ def run_pipeline(pipeline_config, region, dateString, extracted = False, prevent result_dims = result.shape if ((result_dims[0] != spatial_dim) or (result_dims[1] != (temporal_dim + 4))): # + 4 required because there are extra columns in the result file - logger.error(f"Result dimension {result_dims} is not match with the expectation ({spatial_dim}, {temporal_dim + 4})") + logger.error(f"Result dimension {result_dims} does not match with the expected: ({spatial_dim}, {temporal_dim + 4})") raise IndexError if not os.path.exists(strain_outPath): -- GitLab