climate_toolbox.transformations package¶
Submodules¶
climate_toolbox.transformations.transformations module¶
-
climate_toolbox.transformations.transformations.
ordinal
(n)[source]¶ Converts numbers into ordinal strings
-
climate_toolbox.transformations.transformations.
snyder_edd
(tasmin, tasmax, threshold)[source]¶ Snyder exceedance degree days/cooling degree days
Similarly to Snyder HDDs, Snyder exceedance degree days for any given day are given by the integral between the sinosiod-interpolated temperature and the threshold.
The closed form solution is given by:
\[EDD_{P} = \sum_{d \in P} EDD_d\]where
\[\begin{split}EED_d = \begin{cases} ( (M - e)(\pi /2 - \theta) + w \cos(\theta) ) / \pi, & \text{if } tmin_d < e < tmax_d \\ 0 , & \text{if } tmax_d < e \\ M - e, & \text{otherwise} \end{cases}\end{split}\]and
\[\begin{split}\begin{array}{rll} M & = & (tmax_d + tmin_d)/2 \\ w & = & (tmax_d-tmin_d)/2 \\ \theta & = & \arcsin( (e-M)/w ) \\ \end{array}\end{split}\]
-
climate_toolbox.transformations.transformations.
snyder_gdd
(tasmin, tasmax, threshold_low, threshold_high)[source]¶ Snyder growing degree days
Growing degree days are the difference between EDD measures at two thresholds.
\[{GDD}_{T_{low}, T_{high}, y, i} = {EDD}_{T_{low}, y, i} - {EDD}_{T_{high}, y, i}\]Note that where \(tas_{d,i}>{T_{high}}\), GDD will be a constant value \(T_{high}-T_{low}\). Thus, this measure is only useful when another measure, e.g. \({EDD}_{T_{high}}\), sometimes referred to as killing degree days, is used as an additional predictor.
- Parameters
- Returns
gdd – Snyder growing degree days (degreedays)
- Return type
xarray.DataArray