Skip to content

Commit

Permalink
Merge pull request #14 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
remove year in shapeifle
  • Loading branch information
santiago123x authored Jun 25, 2024
2 parents 72ec8be + 582ade1 commit 13c6700
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/postprocessing/export_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def export_raster(dataset, file_name, specific_variable, output_path, inputs_pat
output_path_folder = os.path.join(output_path, file_name)
shape_path = os.path.join(inputs_path, "shapefile")
data_path = os.path.join(inputs_path, "data")
shp_path = os.path.join(shape_path, "limite_nacional_2011", "limite_nacional_2011.shp")
shp_path = os.path.join(shape_path, "limite_nacional", "limite_nacional.shp")

if not os.path.exists(output_path):
os.makedirs(output_path)
Expand Down Expand Up @@ -99,7 +99,7 @@ def export_raster(dataset, file_name, specific_variable, output_path, inputs_pat

print(f"Raster for: {specific_variable} day: {date} cut successfully as '{new_raster_filename}'")

generate_image(new_raster_filename, search_csv(os.path.join(data_path,"ranges"), specific_variable), data_path, os.path.join(shape_path, "limites_municipales_2001", "limite_municipal_2001.shp"))
generate_image(new_raster_filename, search_csv(os.path.join(data_path,"ranges"), specific_variable), data_path, os.path.join(shape_path, "limites_municipales", "limite_municipal.shp"))

return var_output

Expand Down
6 changes: 3 additions & 3 deletions src/postprocessing/extract_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def calcWS10m(U10, V10, inputs_path):

print(f"Raster {file_name} created successfully")

generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "WS10m"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales_2001", "limite_municipal_2001.shp"))
generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "WS10m"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales", "limite_municipal.shp"))

return U10.replace("U10","WS10m")

Expand Down Expand Up @@ -139,7 +139,7 @@ def calcWS2m(WS10m, inputs_path):

print(f"Raster {file_name} created successfully")

generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "WS2m"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales_2001", "limite_municipal_2001.shp"))
generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "WS2m"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales", "limite_municipal.shp"))

return WS10m.replace("WS10m","WS2m")

Expand Down Expand Up @@ -206,7 +206,7 @@ def calcRH(T2, P, PB, Q, inputs_path):

print(f"Raster {file_name} created successfully")

generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "RH"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales_2001", "limite_municipal_2001.shp"))
generate_image(file_name, search_csv(os.path.join(inputs_path, "data", "ranges"), "RH"), os.path.join(inputs_path, "data"), os.path.join(inputs_path, "shapefile", "limites_municipales", "limite_municipal.shp"))

return T2.replace("T2","RH")

Expand Down

0 comments on commit 13c6700

Please sign in to comment.