Gridded Skill
modelskill.skill_grid.SkillGrid
Bases: SkillGridMixin
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:
Source code in modelskill/skill_grid.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
|
sel
Select a model from the SkillGrid
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
str
|
Name of model to select |
required |
Returns:
Type | Description |
---|---|
SkillGrid
|
SkillGrid with only the selected model |
Source code in modelskill/skill_grid.py
to_dataframe
Convert gridded skill data to pandas DataFrame
Returns:
Type | Description |
---|---|
DataFrame
|
data as a pandas DataFrame |
modelskill.skill_grid.SkillGridArray
Bases: SkillGridMixin
A SkillGridArray is a single metric-SkillGrid, corresponding to a "column" in a SkillGrid
Typically created by indexing a SkillGrid object, e.g. ss["bias"]
.
Examples:
Source code in modelskill/skill_grid.py
plot
wrapper for xArray DataArray plot function
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
str
|
Name of model to plot, by default all models |
None
|
**kwargs |
Any
|
keyword arguments passed to xr.DataArray plot() e.g. figsize |
{}
|
Examples:
>>> gs = cc.gridded_skill()
>>> gs["bias"].plot()
>>> gs.rmse.plot(model='SW_1')
>>> gs.r2.plot(cmap='YlOrRd', figsize=(10,10))