6.4. copro.data.fill_X_sample¶
- copro.data.fill_X_sample(X, config, root_dir, polygon_gdf, proj_year)[source]¶
Fills the X-dictionary with the data sample data besides any conflict-related data for each polygon and each year. Used during the projection runs as the sample and conflict data need to be treated separately there.
- Parameters
X (dict) – dictionary containing keys to be sampled.
config (ConfigParser-object) – object containing the parsed configuration-settings of the model.
root_dir (str) – path to location of cfg-file of reference run.
polygon_gdf (geo-dataframe) – geo-dataframe containing the selected polygons.
proj_year (int) – year for which projection is made.
- Raises
Warning – raised if the datetime-format of the netCDF-file does not match conventions and/or supported formats.
- Returns
dictionary containing sample values.
- Return type
dict