Table Of Contents

Previous topic

scikits.hydroclimpy.lib.evaporation.PotentialEvapoTranspiration.Droogers

This Page

The PETEvaluation class

For convenience, the evaporation module defines a class for the comparison of different PET models for a given site.

class PETEvaluation(tmin, tmax, latitude, rain=None, Kt=0.17000000000000001, models=None, reference=None)

Bases: object

A holdall class for the comparison of PET estimates.

The PET models listed in the models are all evaluated from the series of input temperatures tmin and tmax, for the given latitude.

Parameters:

tmin : TimeSeries

Series of minimum air temperatures [\textrm{\textcelsius}].

tmax : TimeSeries

Series of maximum air temperatures [\textrm{\textcelsius}].

latitude : float

Latitude of the site (in degrees).

rain : TimeSeries, optional

Series of precipitation [mm].

%(Kt)s :

%(models)s :

%(reference)s :

Methods

RMSE
RMSE_per_period
kendalltau
monthly_average
spearmanr

Attributes

PETEvaluation.estimates
A structured TimeSeries object, where each field stores the PET estimate for the given model. The models are listed in models
PETEvaluation.models
A list of strings corresponding to the different PET models to analyze. By default, the list is ['Droogers', 'Hamon', 'Hansen', 'Hargreaves', 'Kharrufa', 'Makkink', 'PenmanMonteith', 'PenmanMonteithASCE', 'PriestleyTaylor', 'Thornthwaite', 'Turc'].
PETEvaluation.reference
Name of the PET model to use as reference. By default, the model is 'PenmanMonteith'.
PETEvaluation.ndtype
A dtype object, equivalent to np.dtype([(m, float) for m in self.models]).

Methods

PETEvaluation.monthly_average()
Returns the monthly averages for each model
PETEvaluation.RMSE(reference=None, models=None)

Returns the Root Mean Square Error for the PET estimates.

Parameters:

reference : string, optional

Name of the PET model used as reference. If None, use the model defined in reference.

models : {string, sequence}, optional

A list of strings corresponding to the models to investigate. Each entry should be part of the models list. If one or several antries do not satisfy this requirement, they are simply discarded. If None, the list defaults to the models attribute.

Returns:

RMSE : MaskedArray

A structured MaskedArray, where each field corresponds to the RMSE between a model and the reference

PETEvaluation.RMSE_per_period(freq=None, reference=None, models=None)

Returns the Root Mean Square Error for the PET estimates, per period.

Parameters:

reference : string, optional

Name of the PET model used as reference. If None, use the model defined in reference.

models : {string, sequence}, optional

A list of strings corresponding to the models to investigate. Each entry should be part of the models list. If one or several antries do not satisfy this requirement, they are simply discarded. If None, the list defaults to the models attribute.

freq : {string, int}, optional

A valid frequency specifier. If None, the parameter is set to the freq attribute of the PET estimates.

Returns:

result : MaskedArray

A (n,) structured MaskedArray object, with n the number of periods per year (n=12 for monthly, n=4 for quarterly...), and where each field correspond to the RMSE between the given model and the reference.

PETEvaluation.kendalltau(freq=None, reference=None, models=None)

Computes the Kendall tau between each model and the reference, for each period.

Parameters:

reference : string, optional

Name of the PET model used as reference. If None, use the model defined in reference.

models : {string, sequence}, optional

A list of strings corresponding to the models to investigate. Each entry should be part of the models list. If one or several antries do not satisfy this requirement, they are simply discarded. If None, the list defaults to the models attribute.

freq : {string, int}, optional

A valid frequency specifier. If None, the parameter is set to the freq attribute of the PET estimates.

Returns:

result : dictionary

A dictionary (model <> array of results). For each key, the corresponding element is a (n+1,) array of two fields, (tau, p-value), of the Kendall tau calculated between the given model (key) and the reference and its corresponding p value. The first n entries correspond to the period (n=12 for monthly results, n=4 for quaterly results); the last entry corresponds to the Spearman rho calculated over the whole range of dates.

PETEvaluation.spearmanr(freq=None, reference=None, models=None)

Computes the Spearman rho per period.

Parameters:

reference : string, optional

Name of the PET model used as reference. If None, use the model defined in reference.

models : {string, sequence}, optional

A list of strings corresponding to the models to investigate. Each entry should be part of the models list. If one or several antries do not satisfy this requirement, they are simply discarded. If None, the list defaults to the models attribute.

freq : {string, int}, optional

A valid frequency specifier. If None, the parameter is set to the freq attribute of the PET estimates.

Returns:

result : dictionary

A dictionary (model <> array of results). For each key, the corresponding element is a (n+1,) array of two fields, (rho, p-value), of the Spearman rho calculated between the given model (key) and the reference and its corresponding p value. The first n entries correspond to the period (n=12 for monthly results, n=4 for quaterly results); the last entry corresponds to the Spearman rho calculated over the whole range of dates.