Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Matlab function to calculate Palmer Drought Severity Index (PDSI) using monthly temperature and precipitation data. Can determine values for multiple sites simultaneously.

License

NotificationsYou must be signed in to change notification settings

JonKing93/pdsi

Repository files navigation

A Matlab function to calculate Palmer Drought Severity Index (PDSI) usingmonthly temperature and precipitation data. Can determine values formultiple sites simultaneously.

Setup

Matlab 2020b or higher is recommended, however this function should work onversions as low as 2016b.

To use, download this repository and add it to your MATLAB path.

Syntax

Please see the demo for detailed instructions on using this function. Basicsyntax is:

[X, Xm, Z, PE] = pdsi(T, P, years, lats, awcs, awcu, cafecYears, timeDim, progressbar)

---- Inputs -----

T: A numeric array holding monthly temperature data at various data sites.Data should begin in a January, and end in a December. Should be inunits of Celsius.

P: Monthly precipitation data. Should correspond same data sites and timesteps as the temperature data. Should be in units of mm/month.

years: A two element vector indicating the first and last year of thetemperature data.

lats: The latitudes of the data sites in degrees. A numeric array. Must bethe same size as the temperature data, except for the monthly timedimension, which should have a length of 1.

awcs: Available water capacity of the surface layer for each site(in mm). A numeric array the same size as lats. A common defaultvalue is 25.4 mm.

awcu: Available water capacity of the underlying layer for each site(in mm). A numeric array the same size as lats. A common defaultvalue is 127 mm.

cafecYears: A two element vector indicating the first and last years of theperiod to use for CAFEC normalizations.

timeDim: A positive integer indicating which dimension of the temperatureand precipitation data is the monthly time step. If not provided, pdsiassumes time is along the first dimension.

progressbar: An optional input that can be used to display a progress barfor long computations. A scalar logical. Set it to true to display progress.

----- Outputs -----

X: Palmer Drought Severity Index at each site in each month.

Xm: Modified PDSI at each site in each month

Z: Z indices at each site in each month.

PE: Computed potential evapotranspiration at each site in each month (in mm).

Tips for slow computations

It is usually fastest to run pdsi on all sites at once. However, the pdsifunction scales poorly for very large datasets that require MATLAB to swapdata to disk.

If you are experiencing slow run times, try running pdsi on chunks ofdata sites. Running on 1000 to 10000 sites at a time could be a goodstarting point.

Credits

This PDSI function is based on a script written by Dave Meko. It wasupdated by Jonathan King in 2020 to include the Southern Hemisphere, andto efficiently process multiple sites.

About

A Matlab function to calculate Palmer Drought Severity Index (PDSI) using monthly temperature and precipitation data. Can determine values for multiple sites simultaneously.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp