NAME

Drought::PET::Thornthwaite - Calculate potential evapotranspiration (PET) using the Thornthwaite method

VERSION

Version 0.50

SYNOPSIS

use Drought::PET::Thornthwaite qw(pet_thornthwaite tei_thornthwaite);

DESCRIPTION

Evapotranspiration is the amount of water removed from the soil due to both evaporation and vegetative consumption. Factors such as sun angle, temperature, soil type, the amount of available water, and the types of vegetation all affect the amount of evapotranspiration that occurs in a given location. The potential evapotranspiration (PET) is defined as the amount of evapotranspiration that would occur under a defined set of conditions if the amount of available water in the soil was limitless and accessible. The PET is a component of various drought and water balance models. Numerous techniques have been developed to calculate and estimate potential evapotranspiration.

The Drought::PET::Thornthwaite package provides functions that can calculate the PET based on the Thornthwaite Equation (Thornthwaite 1948). This equation estimates PET based on the day of year, the latitude of the target location, the temperature observed during the period for which PET is calculated, and a monthly temperature-based climatological index specific to the target region. This index is typically called the Thornthwaite heat index, or the temperature efficiency index. The documentation for this package refers to this index as the temperature efficiency index (TEI).

EXPORT

The following functions provided by the Drought::PET::Thornthwaite package are exportable.

pet_thornthwaite

my $pet = pet_thornthwaite($yday,$ndays,$lat,$temp,$tei,$missing_val);

Calculate the potential evapotranspiration in millimeters using the Thornthwaite Equation. Temperatures at or below zero return a zero PET. For temperatures at or above 26.5 degrees, an adjusted equation described in Huang et al. 1996 is used to estimate the PET, since the original Thornthwaite Equation becomes increasingly inaccurate at higher temperatures.

This function requires five arguments:

  • $yday: The day of the year (1 - 366). If the PET is calculated for a period of more than one day, supply the midpoint date

  • $ndays: The number of days in the period over which the PET is calculated, e.g., 7 for a weekly PET. Must be 1 or greater

  • $lat: The latitude of the location for which the PET is calculated in degrees (must be 0 to 90)

  • $temp: The average temperature observed during the period in degrees Celsius

  • $tei: The climatological "temperature efficiency index" defined in Thornthwaite (1948)

    An optional sixth argument can be supplied, which would be considered the missing data value. The default missing value is NaN. If the YDAY, NDAYS, or LAT arguments are non-numeric or invalid, the pet_thornthwaite function will croak. If the TEMP or TEI arguments are undefined, missing, or invalid, the function will return the missing value.

    This function currently only works for Northern Hemisphere locations.

tei_thornthwaite

my $tei = tei_thornthwaite($jan,$feb,$mar,$apr,$may,$jun,$jul,$aug,$sep,$oct,$nov,$dec);

Calculates and returns the temperature efficiency index (TEI, sometimes called the Thornthwaite heat index) based on a monthly average temperature climatology for a given location. Since the equation involves a summation of adjusted monthly temperatures, 12 arguments are required, consisting of the average temperature for each calendar month of the year. An optional 13th argument can also be supplied to define a numeric value interpreted as missing data. If not supplied, the default missing value is NaN.

The missing value will be returned if any of the temperature values are missing, undef, or invalid (e.g., non-numeric).

INSTALLATION

The best way to install this module is with a CPAN client, which will resolve and install the dependencies:

cpan Drought::PET::Thornthwaite
cpanm Drought::PET::Thornthwaite

You can also install the module directly from the distribution directory after downloading it and extracting the files, which will also install the dependencies:

cpan .
cpanm .

If you want to install the module manually do the following in the distribution directory:

perl Makefile.PL
make
make test
make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the perldoc command.

perldoc Drought::PET::Thornthwaite

You can also look for information at:

BUGS

Please report any bugs or feature requests to bug-drought-pet-thornthwaite at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Drought-PET-Thornthwaite. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR

Adam Allgood

REFERENCES

  • Huang, J, H. M. Van Den Dool, and K. P. Georgarakos, 1996: Analysis of Model-Calculated Soil Moisture over the United States (1931-1993) and Applications to Long-Range Temperature Forecasts. Journal of Climate, 9 1350-1362.

  • Thornthwaite, C. W., 1948: An approach toward a rational classification of climate. Geographical Review, 38 55-94.

LICENSE AND COPYRIGHT

This software is copyright (c) 2024 by Adam Allgood.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.