skill_grid.SkillGrid
self, data) skill_grid.SkillGrid(
Spatially gridded skill data.
Gridded skill object for analysis and visualization of spatially gridded skill data. The object wraps the xr.DataSet class which can be accessed from the attribute data.
The object contains one or more “arrays” of skill metrics, each corresponding to a single metric (e.g. bias, rmse, r2). The arrays are indexed by the metric name, e.g. ss["bias"]
or ss.bias
.
Examples
>>> gs = cc.gridded_skill()
>>> gs.metrics
'n', 'bias', 'rmse', 'urmse', 'mae', 'cc', 'si', 'r2'] [
>>> gs.mod_names
'SW_1', 'SW_2'] [
>>> gs.sel(model='SW_1').rmse.plot()
Attributes
Name | Description |
---|---|
coords | Coordinates (same as xr.DataSet.coords) |
metrics | List of metrics (=data vars) |
mod_names | List of model names |
obs_names | List of observation names |
x | x-coordinate values |
y | y-coordinate values |
Methods
Name | Description |
---|---|
sel | Select a model from the SkillGrid |
to_dataframe | Convert gridded skill data to pandas DataFrame |
sel
skill_grid.SkillGrid.sel(model)
Select a model from the SkillGrid
Parameters
Name | Type | Description | Default |
---|---|---|---|
model | str | Name of model to select | required |
Returns
Name | Type | Description |
---|---|---|
SkillGrid | SkillGrid with only the selected model |
to_dataframe
skill_grid.SkillGrid.to_dataframe()
Convert gridded skill data to pandas DataFrame
Returns
Name | Type | Description |
---|---|---|
pd.DataFrame | data as a pandas DataFrame |