Commit 85dc3b9b authored by Marcais Jean's avatar Marcais Jean
Browse files

modify netcdf extraction in for loop

parent aa198a33
No related merge requests found
Showing with 13 additions and 2 deletions
+13 -2
......@@ -39,7 +39,14 @@ watershed_code = df_stations.loc[:,'Code']
# Get a sample of them for test
code_for_test = watershed_code.loc[1:10]
# extract safran gpd
from HydroClimaticFluxes import HydroClimaticFluxes
HCF = HydroClimaticFluxes(code=-1)
Ptot_gpd = HCF.extract_safran_variable(safran_foldername, 'Ptot')
ET0_gpd = HCF.extract_safran_variable(safran_foldername, 'ET0')
Tair_gpd = HCF.extract_safran_variable(safran_foldername, 'Tair')
Snow_gpd = HCF.extract_safran_variable(safran_foldername, 'Snow')
Rain_gpd = HCF.extract_safran_variable(safran_foldername, 'Rain')
# *************************** Extract watersheds' properties ************************************
......@@ -57,7 +64,11 @@ for i in code_for_test:
watershed_i.extract_watershed_contour_from_filename(shp_contour_filepath, 'Code')
watershed_i.extract_banquehydro_discharge_timeseries(banquehydro_foldername)
# watershed_i.extract_SAFRAN_forcings(safran_foldername, safran_grid_shpfilename)
watershed_i.extract_SAFRAN_forcings(safran_foldername)
watershed_i.hydro_climatic_fluxes.intersect_safran_gpd_and_contour(Ptot_gpd, watershed_i.contour,'Ptot')
watershed_i.hydro_climatic_fluxes.intersect_safran_gpd_and_contour(ET0_gpd, watershed_i.contour, 'ET0')
watershed_i.hydro_climatic_fluxes.intersect_safran_gpd_and_contour(Tair_gpd, watershed_i.contour, 'Tair')
watershed_i.hydro_climatic_fluxes.intersect_safran_gpd_and_contour(Snow_gpd, watershed_i.contour, 'Snow')
watershed_i.hydro_climatic_fluxes.intersect_safran_gpd_and_contour(Rain_gpd, watershed_i.contour, 'Rain')
watershed_i.extract_hydrological_signatures()
watershed_i.extract_geologic_properties_from_filename(BDLisa_shp)
watershed_i.geologic_properties.extract_average_age_geology(BRGM_geol_map, watershed_i.contour)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment