diff --git a/extract_HydroSig.py b/extract_HydroSig.py index 0a52924aa3f52d99b5b7f30bd097eae7ee177c5a..07cca94d7b86143f96394537adcc8d2acf79b7d7 100644 --- a/extract_HydroSig.py +++ b/extract_HydroSig.py @@ -40,7 +40,8 @@ shp_contour = gpd.read_file(shp_contour_filepath) watershed_code = df_stations.loc[:,'Code'] # Get a sample of them for test code_for_test = watershed_code.loc[1:2] -# code_for_test = ['A1080330'] +# code_for_test = ['A1072010', 'A1080330'] +# code_for_test = ['A1072010', 'A1080330', 'A3472010', 'I0102010', 'J3413030'] # # extract safran gpd # from HydroClimaticFluxes import HydroClimaticFluxes @@ -57,7 +58,7 @@ code_for_test = watershed_code.loc[1:2] studied_watersheds = pd.DataFrame() for i in code_for_test: #for i in watershed_code: - + print(i) # Get the station's name watershed_stations_i = df_stations[df_stations.loc[:, 'Code'] == i] watershed_name_i = watershed_stations_i.loc[:, 'Nom'].values[0] @@ -66,18 +67,18 @@ for i in code_for_test: watershed_i = Watershed(i, watershed_name_i) 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.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.hydro_climatic_fluxes.safran_timeseries['Ptot'] = watershed_i.hydro_climatic_fluxes.safran_timeseries['Snow'] + watershed_i.hydro_climatic_fluxes.safran_timeseries['Rain'] + # watershed_i.hydro_climatic_fluxes.safran_timeseries['Ptot'] = watershed_i.hydro_climatic_fluxes.safran_timeseries['Snow'] + watershed_i.hydro_climatic_fluxes.safran_timeseries['Rain'] + safran_timeseries_i = pd.read_csv(safran_foldername+i+'_safran_timeseries.csv') watershed_i.hydro_climatic_fluxes.safran_timeseries = safran_timeseries_i - #watershed_i.hydro_climatic_fluxes.safran_timeseries['Datetime'] = pd.Timestamp.asm8 - #print(pd.api.types.is_datetime64_ns_dtype(watershed_i.hydro_climatic_fluxes.safran_timeseries['Datetime'])) - #print(pd.api.types.is_datetime64_ns_dtype(watershed_i.hydro_climatic_fluxes.discharge_timeseries['Datetime'])) + 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)