compute_stat_step(dates,
sim,
obs,
obs_type,
measures,
stations=None,
period=None,
stations_out=None,
ratio=0.0,
cutoff=None)
Computes a set of statistical measures for one simulation or for a
set of simulations, and for all time step.
-
- Parameters:
dates -
The list (indexed by stations) of list of dates at which the
data is defined. Both observations and simulated data (of every
ensemble) are assumed to be designed at the same dates. 'dates'
may also be a list of datetime in case there is a single
station.
(type=list of list of datetime, or list of datetime)
sim -
The list (indexed by simulations) of lists (indexed by
stations) of simulated concentrations, or the list (indexed by
stations) of simulated concentrations.
(type=list of list of 1D-array, or list of 1D-array.)
obs -
The list (indexed by stations) of observed concentrations.
(type=list of 1D-array)
obs_type -
The type of the concentrations: "hourly" or
"peak".
(type=string)
stations -
The station(s) at which the concentrations are given. If it is
set to None, all stations will be included.
(type=list of Station, or Station)
period -
The period where to select the concentrations (bounds
included). A single date may be provided. If 'period' is set to
None, all input dates are included. If a list is provided, the
period is defined by the first and the last dates in the
list.
(type=2-tuple of datetime, or datetime, or list of
datetime)
stations_out -
The station(s) at which the concentrations are selected. If
'stations_out' is set to None, all input dates are included.
(type=list of Station, or Station, or string)
ratio -
Minimum ratio of the number of available observations (per
step) and the number of stations. A step at which the actual
ratio is below this minimum is discarded.
(type=float)
cutoff -
The value below (or equal) which data is discarded. This
filters 'obs' and corresponding 'sim' values. Nothing is filtered
if 'cutoff' is set to None.
(type=float, or None)
- Returns:
-
The statistical measures are a key of the output dictionary.
Each value is a (simulation x step)-array. The dates associated
with the steps with enough measurements are returned in a
list.
(type=(list of datetime, dict of array))
|