stfc / PSyclone

Domain-specific compiler and code transformation system for Finite Difference/Volume/Element Earth-system models in Fortran
BSD 3-Clause "New" or "Revised" License
104 stars 27 forks source link

[PSyData] Improvement to value verification #2690

Open hiker opened 1 month ago

hiker commented 1 month ago

The nan library tests for nan and inf, but it would be useful if a user could specify a range for variables in a certain kernel. E.g. 'in kernel ABC variable B should be between 0 and 1000).

Proposed solution: each variable in each kernel can be assign an environment variable, e.g. PSYVERIFY__MODULE_REGION__VAR=1-2, indicating that the variable VAR in the specified kernel must be between the two specified values (also supporting 1-, -2). These variables could be collected over time, improving verification.