MonthlyTemperature

Monthly temperature class describing temperature profile in a catchment.

class reemission.temperature.MonthlyTemperature(temp_profile: List[float])[source]

Bases: object

Wrapper for monthly temperature profile in a catchment.

temp_profile

12x1 list of mean monthly temperatures for a representative year, deg C.

Type:

List[float]

eff_temp_coeffs

Values of effective temperature coefficients per gas.

Type:

ClassVar[Dict[str, float]]

__post_init__() None[source]

Post-initialization to check if the temperature profile has 12 values.

property coldest: float

Finds coldest monthly temperature in the temperature profile.

Returns:

The coldest monthly temperature.

Return type:

float

eff_temp(gas: str) float[source]

Calculates effective annual temperature in deg C (Eqs. A.14 and A.15 in Praire2021).

Parameters:

gas (str) – Type of gas; currently available gasses are ‘co2’ and ‘ch4’.

Raises:

GasNotRecognizedException – If gas is not listed in recognized gas types.

Note

Used for estimating CO\(_2\) and CH\(_4\) diffusion.

Returns:

Effective annual temperature in deg C.

Return type:

float

eff_temp_coeffs: ClassVar[Dict] = {'ch4': 0.052, 'co2': 0.05}
mean_warmest(number_of_months: int = 4) float[source]

Returns the mean temperature of the warmest n months in a yearly 12x1 temperature profile.

By default, the function calculates the mean of the 4 warmest months.

Parameters:

number_of_months (int, optional) – Number of warmest months in the profile. Defaults to 4.

Returns:

Mean temperature of the warmest n months.

Return type:

float

number_months_above(threshold: float) int[source]

Returns the number of months for which the temperature is above the threshold temperature.

Parameters:

threshold (float) – Threshold temperature.

Returns:

Number of months with temperature above the threshold.

Return type:

int

temp_profile: List[float]