FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f33fae1a authored by L. Bower's avatar L. Bower
Browse files

removing the need for a spatial points file in met_extractor assets to check...

removing the need for a spatial points file in met_extractor assets to check the output dimensions, now compared to the input nc that created the results
parent 05152043
No related branches found
No related tags found
No related merge requests found
......@@ -270,25 +270,16 @@ class ProcessorEnvironment(ProcessorBase):
strain_outPath = os.path.join(region_outPath, strain)
strain_outFile = strain_outPath + '/RIE_value.nc'
"""
read in the input_spatial_points.csv file and get the number of spatial points - this is used for
sense-checking the dimensions of the output
"""
# todo we could swap the spatial points file for a file specifying the expected dimensions - much smaller
region_spatial_points_file = assetsPath + '/met_extractor/' + 'input_spatial_points_' + region + '.csv'
spatial_points = pd.read_csv(region_spatial_points_file)
spatial_dim = spatial_points.shape[0]
if not os.path.exists(strain_outPath):
os.makedirs(strain_outPath)
shutil.copy(resultFile, strain_outFile)
# todo - Add a flag to this part of the code to enable/disable csv writing as an option
# resultCSVFile = envSuitPath + 'RIE.csv'
# if os.path.isfile(resultCSVFile):
# strain_outFile = strain_outPath + '/RIE_value.csv'
# shutil.copy(resultCSVFile,strain_outFile)
# If we have set the flag to write the outputs as csvs, copy them to the processed dir
result_csv_file = envSuitPath + 'RIE.csv'
if os.path.isfile(result_csv_file):
strain_outFile = strain_outPath + '/RIE_value.csv'
shutil.copy(result_csv_file, strain_outFile)
logger.info(f"{strain} result successfully created and moved to {strain_outPath}/")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment