Open LKPatel1 opened 1 year ago
This is the error ###############
/tmp/ipykernel_3626/2106608888.py in <module>
----> 1 output_matilda = matilda_simulation(df, output=working_directory,
2 sim_start='01-01-2003', sim_end='31-12-2022',
3 freq="D", # Temporal resolution ("D", "M" or "Y")
4 lat=76, # Latitude
5 area_cat=20.5, # Catchment area
~/.local/lib/python3.10/site-packages/matilda/core.py in matilda_simulation(input_df, obs, glacier_profile, output, warn, set_up_start, set_up_end, sim_start, sim_end, freq, lat, soi, area_cat, area_glac, ele_dat, ele_glac, ele_cat, plots, plot_type, hydro_year, elev_rescaling, pfilter, drop_surplus, parameter_set, lr_temp, lr_prec, TT_snow, TT_diff, CFMAX_ice, CFMAX_rel, BETA, CET, FC, K0, K1, K2, LP, MAXBAS, PERC, UZL, PCORR, SFCF, CWH, AG, RFS)
2054 # Downscaling of data if necessary and the MATILDA simulation
2055 if glacier_profile is not None:
-> 2056 output_MATILDA = matilda_submodules(df_preproc, parameter, glacier_profile=glacier_profile,
2057 elev_rescaling=elev_rescaling, drop_surplus=drop_surplus)
2058 else:
~/.local/lib/python3.10/site-packages/matilda/core.py in matilda_submodules(df_preproc, parameter, obs, glacier_profile, elev_rescaling, drop_surplus)
1260 if glacier_profile is not None:
1261 lookup_table = create_lookup_table(glacier_profile, parameter)
-> 1262 output_DDM, glacier_change, input_df_catchment = updated_glacier_melt(df_preproc, lookup_table,
1263 glacier_profile, parameter,
1264 drop_surplus=drop_surplus)
~/.local/lib/python3.10/site-packages/matilda/core.py in updated_glacier_melt(data, lookup_table, glacier_profile, parameter, drop_surplus)
658
659 # determine hydrological years
--> 660 data["water_year"] = np.where((data.index.month) >= parameter.hydro_year, data.index.year + 1, data.index.year)
661
662 # initial glacier mass from the glacier profile in mm w.e. (relative to the whole catchment)
AttributeError: 'RangeIndex' object has no attribute 'month'
Please try again using the following date format. That should fix the error:
sim_start='2000-01-01', sim_end='2099-12-31'
Greetings, Im testing this code, and have treid maintaining the csv just as in the example folder. My time stamp is in: Day/Month/Year format. When I run
I get the following error