Methods Module¶
methods ¶
Effective precipitation calculation methods.
This module provides various methods for calculating effective precipitation from total precipitation data. Effective precipitation represents the portion of total rainfall that is available for crop use after accounting for losses due to surface runoff, deep percolation, and evaporation.
Available Methods
-
ensemble: Ensemble of all methods except TAGEM-SuET (default). Returns the mean of CROPWAT, FAO/AGLW, Fixed Percentage (70%), Dependable Rainfall (75%), FarmWest, and USDA-SCS methods. Requires AWC and ETo data.
-
cropwat: CROPWAT method - The method used in FAO CROPWAT software.
-
fao_aglw: FAO Land and Water Division formula from FAO Irrigation Paper No. 33. A two-part linear approximation.
-
fixed_percentage: Simple fixed percentage method. Assumes a constant fraction (default 70%) of precipitation is effective.
-
dependable_rainfall: FAO Dependable Rainfall method. Estimates rainfall that can be depended upon at a given probability level (default 75%).
-
farmwest: FarmWest method (https://farmwest.com/climate/calculator-information/et/effective-precipitation/). Simple empirical formula assuming 5mm interception loss and 75% effectiveness.
-
usda_scs: USDA-SCS soil moisture depletion method. Accounts for soil water holding capacity (AWC) and evaporative demand (ETo). Requires additional GEE assets for AWC and ETo data.
-
suet: TAGEM-SuET (Turkish Irrigation Management and Plant Water Consumption System). Calculates effective precipitation based on the difference between P and ETo. Requires ETo data.
-
pcml: Physics-Constrained Machine Learning method (Hasan et al., 2025). Pre-computed Peff available as a GEE asset for the Western U.S. (17 states) from Jan 2000 to Sep 2024. Asset: projects/ee-peff-westus-unmasked/assets/effective_precip_monthly_unmasked Note: Only Western U.S. vectors overlapping the 17-state extent can be used with PCML.
Note
For methods requiring ETo (usda_scs, suet, ensemble), crop evapotranspiration (ETc) can be used instead of grass reference ET (ETo) for more accurate crop-specific estimates. ETc = ETo × Kc, where Kc is the crop coefficient.
Examples:
from pycropwat.methods import (
cropwat_effective_precip,
list_available_methods
)
import numpy as np
# Calculate effective precipitation
precip = np.array([50, 100, 200, 300])
eff_precip = cropwat_effective_precip(precip)
# List all available methods
methods = list_available_methods()
for name, description in methods.items():
print(f"{name}: {description}")
References
Smith, M. (1992). CROPWAT: A computer program for irrigation planning and management. FAO Irrigation and Drainage Paper No. 46.
FAO. (1986). Yield response to water. FAO Irrigation and Drainage Paper No. 33.
USDA SCS. (1993). Chapter 2 Irrigation Water Requirements. In Part 623 National Engineering Handbook.
Hasan, M. F., Smith, R. G., Majumdar, S., Huntington, J. L., Alves Meira Neto, A., & Minor, B. A. (2025). Satellite data and physics-constrained machine learning for estimating effective precipitation in the Western United States and application for monitoring groundwater irrigation. Agricultural Water Management, 319, 109821. https://doi.org/10.1016/j.agwat.2025.109821
PeffMethod
module-attribute
¶
PeffMethod = Literal['cropwat', 'fao_aglw', 'fixed_percentage', 'dependable_rainfall', 'farmwest', 'usda_scs', 'suet', 'pcml', 'ensemble']
cropwat_effective_precip ¶
Calculate effective precipitation using the CROPWAT method.
This is the method used in FAO CROPWAT software.
Formula
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Precipitation in mm. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
References
Smith, M. (1992). CROPWAT: A computer program for irrigation planning and management. FAO Irrigation and Drainage Paper No. 46.
Muratoglu, A., et al. (2023). Performance analyses of effective rainfall estimation methods. Water Research, 238, 120011.
Source code in pycropwat/methods.py
fao_aglw_effective_precip ¶
Calculate effective precipitation using the FAO/AGLW Dependable Rainfall formula.
This method is the FAO Dependable Rainfall method based on 80% probability exceedance, used by FAO's Land and Water Division (AGLW). Also known as the dependable rainfall method.
Formula
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Precipitation in mm. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
References
FAO. (1986). Yield response to water. FAO Irrigation and Drainage Paper No. 33.
Source code in pycropwat/methods.py
fixed_percentage_effective_precip ¶
Calculate effective precipitation using a fixed percentage method.
This simple method assumes a constant fraction of precipitation is effective. Common values range from 70-80%.
Formula
where \(f\) is the effectiveness fraction (default 0.7).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Precipitation in mm. |
required |
percentage
|
float
|
Fraction of precipitation that is effective (0-1). Default is 0.7 (70%). |
0.7
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
Source code in pycropwat/methods.py
dependable_rainfall_effective_precip ¶
Calculate effective precipitation using the FAO Dependable Rainfall method.
This method is based on the FAO/AGLW formula (80% probability exceedance) but allows adjustment for different probability levels. The formula estimates the amount of rainfall that can be depended upon at a given probability level.
Formula (at 80% probability exceedance)
For other probability levels, a scaling factor is applied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Monthly precipitation in mm. |
required |
probability
|
float
|
Probability level (0.5-0.9). Default is 0.75 (75%). Higher probability = lower Peff (plan for more irrigation). Lower probability = higher Peff (riskier, less irrigation needed). |
0.75
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
References
FAO. (1986). Yield response to water. FAO Irrigation and Drainage Paper No. 33.
Notes
The scaling factors are approximations based on typical rainfall distributions. For more accurate results, site-specific analysis of historical rainfall data is recommended.
Source code in pycropwat/methods.py
farmwest_effective_precip ¶
Calculate effective precipitation using the FarmWest method.
This is a simple empirical formula used by the FarmWest program for irrigation scheduling in the Pacific Northwest.
Formula
The method assumes the first 5 mm is lost to interception/evaporation, and 75% of the remaining precipitation is effective.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Precipitation in mm. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
References
FarmWest. Effective Precipitation. https://farmwest.com/climate/calculator-information/et/effective-precipitation/
Source code in pycropwat/methods.py
usda_scs_effective_precip ¶
usda_scs_effective_precip(pr: ndarray, eto: ndarray, awc: ndarray, rooting_depth: float = 1.0, mad_factor: float = 0.5) -> np.ndarray
Calculate effective precipitation using the USDA-SCS method with AWC.
This method accounts for soil water holding capacity and evaporative demand to estimate effective precipitation. It is based on the USDA Soil Conservation Service method that considers soil storage factors.
Formula
- Calculate soil storage depth: \(d = AWC \times MAD \times D_r\) (rooting depth in inches)
- Calculate storage factor: \(SF = 0.531747 + 0.295164 \cdot d - 0.057697 \cdot d^2 + 0.003804 \cdot d^3\)
- Calculate effective precipitation: \(P_{eff} = SF \times (P^{0.82416} \times 0.70917 - 0.11556) \times 10^{ET_o \times 0.02426}\)
- \(P_{eff}\) is clamped to be between 0 and \(\min(P, ET_o)\)
Note: Internal calculations are done in inches, output is converted to mm.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Total precipitation in mm. |
required |
eto
|
ndarray
|
Reference evapotranspiration in mm. |
required |
awc
|
ndarray
|
Available Water Capacity. For SSURGO data (U.S.), this is in inches (total for 0-152cm profile). For FAO HWSD data (global), this is in mm/m. |
required |
rooting_depth
|
float
|
Crop rooting depth in meters. Default is 1.0 m. |
1.0
|
mad_factor
|
float
|
Management Allowed Depletion factor (0-1). Controls what fraction of the soil water storage is considered available. Default is 0.5. |
0.5
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
References
USDA SCS. (1993). Chapter 2 Irrigation Water Requirements. In Part 623 National Engineering Handbook. USDA Soil Conservation Service. https://www.wcc.nrcs.usda.gov/ftpref/wntsc/waterMgt/irrigation/NEH15/ch2.pdf
Notes
- AWC data for U.S.: projects/openet/soil/ssurgo_AWC_WTA_0to152cm_composite
- AWC data for global: projects/sat-io/open-datasets/FAO/HWSD_V2_SMU (band: 'AWC')
- ETo data for U.S.: projects/openet/assets/reference_et/conus/gridmet/monthly/v1 (band: 'eto')
- ETo data for global: projects/climate-engine-pro/assets/ce-ag-era5-v2/daily (band: 'ReferenceET_PenmanMonteith_FAO56')
Source code in pycropwat/methods.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | |
suet_effective_precip ¶
Calculate effective precipitation using the TAGEM-SuET method.
TAGEM-SuET (Türkiye'de Sulanan Bitkilerin Bitki Su Tüketimleri) is the Turkish Irrigation Management and Plant Water Consumption System. This method calculates effective precipitation based on the difference between precipitation and reference evapotranspiration. When precipitation exceeds ETo, the excess becomes effective precipitation, with a non-linear reduction for large excesses.
For more accurate crop-specific estimates, use crop evapotranspiration (ETc) instead of grass reference ET (ETo) when available.
Formula
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Total precipitation in mm. |
required |
eto
|
ndarray
|
Reference evapotranspiration (ETo) in mm. For more accurate crop-specific estimates, use crop evapotranspiration (ETc) instead when available. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm. |
Source code in pycropwat/methods.py
pcml_effective_precip ¶
Physics-Constrained Machine Learning (PCML) effective precipitation.
This method uses pre-computed effective precipitation from a machine learning model trained with physics constraints. The PCML Peff data is available as a GEE Image asset for the Western United States (17 states).
Unlike other methods in this module, PCML does not compute Peff from precipitation. Instead, it retrieves pre-computed Peff values from the GEE asset. This function serves as a pass-through that validates and returns the input PCML Peff data.
GEE Asset
projects/ee-peff-westus-unmasked/assets/effective_precip_monthly_unmasked
Coverage
- Region: Western United States (17 states: AZ, CA, CO, ID, KS, MT, NE, NV, NM, ND, OK, OR, SD, TX, UT, WA, WY)
- Temporal: January 2000 - September 2024 (monthly)
- Resolution: ~2 km (native scale retrieved dynamically from GEE asset)
- Band Format:
bYYYY_Mwhere M is month without leading zero (e.g.,b2015_9for September 2015,b2016_10for October 2016)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
peff
|
ndarray
|
Pre-computed effective precipitation from PCML GEE asset in mm. This is retrieved from the GEE asset, not calculated. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Effective precipitation in mm (pass-through). |
References
Hasan, M. F., Smith, R. G., Majumdar, S., Huntington, J. L., Alves Meira Neto, A., & Minor, B. A. (2025). Satellite data and physics-constrained machine learning for estimating effective precipitation in the Western United States and application for monitoring groundwater irrigation. Agricultural Water Management, 319, 109821. https://doi.org/10.1016/j.agwat.2025.109821
Examples:
Using PCML via CLI (no asset/band/geometry required - uses defaults):
pycropwat process --method pcml \\
--start-year 2000 --end-year 2024 \\
--output ./WesternUS_PCML --workers 8
Or with a custom geometry to subset the region:
pycropwat process --method pcml \\
--geometry pacific_northwest.geojson \\
--start-year 2000 --end-year 2024 \\
--output ./PacificNW_PCML --workers 8
Notes
- PCML is trained on Western U.S. data and should only be used in that region.
- Geometry requirement: Only Western U.S. vectors that overlap with the extent of the 17 states (AZ, CA, CO, ID, KS, MT, NE, NV, NM, ND, OK, OR, SD, TX, UT, WA, WY) can be used.
- The asset contains monthly effective precipitation values, not raw precipitation.
- When using
--method pcml, the default PCML asset is automatically used. - Bands are automatically selected based on year/month (e.g., b2015_9 for Sep 2015).
- Only annual (water year, Oct-Sep) effective precipitation fractions are available for PCML (not monthly),
loaded directly from a separate GEE asset (band format:
bYYYY, e.g.,b2020).
Source code in pycropwat/methods.py
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | |
ensemble_effective_precip ¶
ensemble_effective_precip(pr: ndarray, eto: ndarray, awc: ndarray, rooting_depth: float = 1.0, fixed_percentage: float = 0.7, dependable_probability: float = 0.75) -> np.ndarray
Calculate effective precipitation using ensemble of all methods except TAGEM-SuET.
This method computes the mean of 6 effective precipitation methods: CROPWAT, FAO/AGLW, Fixed Percentage, Dependable Rainfall, FarmWest, and USDA-SCS. The TAGEM-SuET method is excluded as it tends to underperform in arid/semi-arid climates (Muratoglu et al., 2023).
Formula
where the six methods are: CROPWAT, FAO/AGLW, Fixed %, Dependable Rain, FarmWest, USDA-SCS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pr
|
ndarray
|
Total precipitation in mm. |
required |
eto
|
ndarray
|
Reference evapotranspiration (ETo) in mm. For more accurate crop-specific estimates, use crop evapotranspiration (ETc) instead when available. |
required |
awc
|
ndarray
|
Available Water Capacity in inches/inch (volumetric fraction). SSURGO asset provides this directly. |
required |
rooting_depth
|
float
|
Crop rooting depth in meters. Default is 1.0 m. |
1.0
|
fixed_percentage
|
float
|
Fraction for Fixed Percentage method (0-1). Default is 0.7. |
0.7
|
dependable_probability
|
float
|
Probability for Dependable Rainfall method (0.5-0.9). Default is 0.75. |
0.75
|
Returns:
| Type | Description |
|---|---|
ndarray
|
Ensemble mean effective precipitation in mm. |
References
Muratoglu, A., Bilgen, G. K., Angin, I., & Kodal, S. (2023). Performance analyses of effective rainfall estimation methods for accurate quantification of agricultural water footprint. Water Research, 238, 120011.
Source code in pycropwat/methods.py
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
get_method_function ¶
Get the effective precipitation function for a given method name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method
|
str
|
Method name: 'cropwat', 'fao_aglw', 'fixed_percentage', 'dependable_rainfall', 'farmwest', 'usda_scs', 'suet', or 'ensemble'. |
required |
Returns:
| Type | Description |
|---|---|
callable
|
The effective precipitation calculation function. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If method name is not recognized. |
Source code in pycropwat/methods.py
list_available_methods ¶
List all available effective precipitation methods with descriptions.
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary mapping method names to descriptions. |