hydrodata.model_evaluation.model_evaluation module
Main method for model evaluation.
- hydrodata.model_evaluation.model_evaluation.evaluate(observation_type, simulations_np, metrics, aggregation_levels, aggregation_method, date_start, date_end, conus_version, network_names=None, grid_bounds=None)
Model evaluation for a particular observation type.
- Parameters:
observation_type (str) – Type of observation involved in comparison. Options include ‘streamflow’, ‘wtd’, ‘swe’.
simulations_np (ndarray) – Array of size (t, y, x), where y and x are the same size as CONUS1 or CONUS2 grid, depending on which x, y values are included in the observations DataFrame. The t dimension should match the number of time values included in the observations DataFrame series. The spatial extent should be the same size as specified by the grid_bounds parameter if it is not the size of the full CONUS1 or CONUS2 grid.
metrics (list) – List of string names of metrics to use for evaluation. Must be present in METRICS_DICT dictionary in the model_evaluation.py module.
aggregation_levels (list) – List of aggregation levels to calculate evaluations for each metric in metrics. Options currently include: ‘day’, ‘week’, ‘month’, ‘calendar year’.
aggregation_method (str) – Type of aggregation to conduct. Options include ‘mean’, ‘min’, ‘max’, etc.
date_start (str) – ‘YYYY-MM-DD’ date indicating beginning of time range.
date_end (str) – ‘YYYY-MM-DD’ date indicating end of time range.
conus_version (str) – Reference for whether simulations are on CONUS1 or CONUS2 grid. Options include ‘conus1’ and ‘conus2’.
network_names (list; default None) – List of names of site networks. Can be a list with a single network name. Each network must have matching .csv file with a list of site ID values that comprise the network. This .csv file must be located in either STREAMFLOW_NETWORK_DIR or GROUNDWATER_NETWORK_DIR (as applicable) named as ‘network_name’.csv.
grid_bounds (list; default None) – List of CONUS x, y grid bounds for a subset domain as [xmin, ymin, xmax, ymax]. This set of bounds matches the size of the simulations_np input. These values align with the CONUS domain parameter conus_version in terms of whether CONUS1 or CONUS2 x, y values are given. Leave as None if simulation files are the full size of conus_version domain.
- Returns:
Pandas DataFrame containing the evaluation results. If no observations fulfill the requested parameters, None object will be returned.
- Return type:
DataFrame or None
- hydrodata.model_evaluation.model_evaluation.evaluate_model(config_path)
Main method for model evaluation.
- Parameters:
config_path (str) – Path to location of evaluation configuration YAML file.
- Returns:
Saves a .csv file to output directory defined for each observation type requested.
- Return type:
None