Doc: Add comprehensive validation rules catalog for validator pipeline#851
Doc: Add comprehensive validation rules catalog for validator pipeline#851
Conversation
Co-authored-by: dayantur <71443948+dayantur@users.noreply.github.com>
|
🤖 I've automatically formatted the code in this PR using:
Please pull the latest changes before making further edits. |
…ithub.com/UMEP-dev/SUEWS into dayantur/feat/documenting-all-range-rules
Co-authored-by: dayantur <71443948+dayantur@users.noreply.github.com>
|
🤖 I've automatically formatted the code in this PR using:
Please pull the latest changes before making further edits. |
Co-authored-by: dayantur <71443948+dayantur@users.noreply.github.com>
|
🤖 I've automatically formatted the code in this PR using:
Please pull the latest changes before making further edits. |
…ithub.com/UMEP-dev/SUEWS into dayantur/feat/documenting-all-range-rules
… with "?" are unsure categorisations; nc stands for "not-categorised"
c2_rulebook.csv
Outdated
| A,cross_parameter,nlayer_dimension_match,nlayer specified,"validates vertical-layer array dimensions vs nlayer: veg_frac/veg_scale/building_frac/building_scale must have nlayer elements; height must have nlayer+1; roofs/walls must contain nlayer substructures. If too short, pads with nulls (or null-template substructures) and records dimension_errors; if too long, records error (does not trim).",phase_a.py:validate_nlayer_dimensions,nlayer; veg_frac; veg_scale; building_frac; building_scale; height,nlayer; veg_frac; veg_scale; building_frac; building_scale; height, | ||
| A,data_validation,forcing_data_validation,forcing_file specified,"validates forcing data file(s) referenced in YAML: checks existence, handles RefValue/list entries, loads files and runs quality checks (missing critical vars, NaNs, physical ranges, irregular time steps), adds filename context; returns (forcing_errors, forcing_file_paths); can be disabled via --forcing off",phase_a.py:validate_forcing_data,forcing_file,forcing_file, | ||
| B,conditional_required,physics_parameters_completeness,always triggered,validates that all critical physics parameters are present and non-null,phase_b.py:validate_physics_parameters,model.physics,model.physics, | ||
| B,cross_parameter,model_option_dependencies,always triggered,validates interdependency rules between physics options: rslmethod==2 requires stabilitymethod==3; stabilitymethod==1 requires rslmethod present; storageheatmethod==1 requires ohmincqf==0,phase_b.py:validate_model_option_dependencies,rslmethod; stabilitymethod; storageheatmethod; ohmincqf,rslmethod; stabilitymethod; storageheatmethod; ohmincqf, |
c2_rulebook.csv
Outdated
| B,cross_parameter,dls_calculation,startdls or enddls specified,"validates DOY values for startdls/enddls (consistency both set or both None), enforces DOY range and leap‑year rules (DOY 366 only allowed in leap years when model_year known), compares user values to location‐based calculated DLS and records INFO/WARNING messages; populate startdls/enddls when missing or different from the calculated ones",phase_b.py:validate_dls_doy / DLSCheck helpers,start_time; lat; lng,startdls; enddls, | ||
| C/Pydantic,conditional_required,parameter_completeness,always triggered,"validates all site parameters are complete; runs site-by-site checks and conditional validations (STEBBS, RSL, storage)",config.py:validate_parameter_completeness,model.physics; site.properties.,all site properties; all model physics options, | ||
| C/Pydantic,conditional_required,stebbs_completeness,stebbsmethod == 1,all STEBBS parameters must be present and non-null when stebbsmethod=1,config.py:_validate_stebbs,stebbsmethod,all STEBBS parameters, | ||
| C/Pydantic,conditional_required,rsl_faibldg_required,rslmethod == 2 & bldgs.sfr > 0,"when rslmethod=2 and buildings present (bldgs.sfr > 0), faibldg parameter must be set",config.py:_validate_rsl,rslmethod; bldgs.sfr,faibldg, |
There was a problem hiding this comment.
@sunt05 as a different example, rule in row 17, still need to be handled with a dedicated validator/function/rule in config.py
…rule info, fixed stebbs nullification description
… C1 and C2 updated tables
|
after a feedback from @MatthewPaskin and as discussed with @suegrimmond, each rule will be assigned with a number key, and then referenced both in the code/report and in the doc, so users will be able to: a - understand what has been checked in their YAML to the sake of clarity, I will add the keys here but I will implement this change in the doc in a separate PR, as that will require a bit of more work! |
Overview
Add comprehensive documentation tracking all validation rules in the SUEWS validator codebase.
CSV Files
Next