Description Usage Arguments Details Value References Examples
Calculates monthly scPDSI series from temperature and precipitation data. Uses binaries compiled from official University of Nebraska C++ Code.
1 |
awc |
Available soil water capacity (in mm) |
lat |
Latitude of the site (in decimal degrees) |
climate |
|
start |
Start year for PDSI calculation |
end |
End year for PDSI calculation |
mode |
one of c("both", "pdsi", "scpdsi") |
verbose |
should stderr/stdout be shown? |
This function transforms the input climate data into the necessary files for the PDSI binary executable and saves them to a temp directory. The binary is called and the resulting files of interest for PDSI and scPDSI are read in again and returned.
For details on the algorithm, see the comments in the C++ source file. For
reference, the original source code (scpdsi-orig.cpp) is put in the
toplevel installation directory of the package, you may find it using
system.file(package = "pdsi")
. For building the Linux binaries, a
modified version of the original source code (scpdsi.cpp, string constants
cast to (char *)
for compatibility with modern g++, Windows-specific
code commented out) is also distributed with the package in the same
directory. To build the binary on Linux, use
pdsi::build_linux_binary()
.
For mode "both", a list
of two data.frames
,
one holding the standard PDSI, one holding the scPDSI. For modes
"pdsi" or "scpdsi" only the respective data.frame
.
Methodology based on Research Paper No. 45; Meteorological Drought; by Wayne C. Palmer for the U.S. Weather Bureau, February 1965.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.