Skip to content

i.evapo.pm: Add test file #5547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 22, 2025
Merged

Conversation

codersmiti
Copy link
Contributor

This PR introduces a regression test suite for the i.evapo.pm module in GRASS GIS. The tests verify that the module correctly computes potential evapotranspiration (ET) using the hourly Penman‐Monteith method. The test suite checks for proper handling of flag options and input parameter dependencies, ensuring robust and reliable ET estimation.

Key Updates in This PR

Functionality:

  • Validates that the module returns expected univariate statistics for standard inputs while correctly handling special cases. This includes testing that default ET outputs (which may include negative values) are correctly computed and that the -z flag clamps negative values to zero, as well as verifying that the -n flag produces lower ET outputs during night-time conditions.

  • Ensures that the ET output responds appropriately to changes in input parameters. Specifically, tests confirm that higher net radiation inputs yield higher ET values, while lower relative humidity (drier air) produces higher ET output.

  • Checks that the ET output scales approximately linearly with varying net radiation values, ensuring that the output for intermediate net radiation closely approximates the average outputs of lower and higher net radiation inputs.

Test Case Additions:

  • Basic Calculation Test: Validates standard operational outputs against expected statistics.
  • Negative Value Clamping Test: Tests that the -z flag correctly sets negative ET values to zero.
  • Night-Time Calculation Test: Compares day and night ET outputs to ensure proper flag functionality.
  • Net Radiation and Relative Humidity Tests: Validate that ET behavior aligns with physical dependencies.
  • Linearity Test: Assesses if ET output from intermediate net radiation approximates the average of outputs from lower and higher net radiation inputs.

@github-actions github-actions bot added Python Related code is in Python module imagery tests Related to Test Suite labels Apr 14, 2025
@petrasovaa petrasovaa merged commit f192d09 into OSGeo:main Apr 22, 2025
31 of 33 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Apr 22, 2025
@codersmiti codersmiti deleted the i_evapo_pm_tests branch April 24, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python tests Related to Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants