Calibration artifacts
Applies to SWATGenX engine extensions · Updated August 2026
cal_parms control file, patched TxtInOut inputs, channel_sd_day.nc, observed streamflow_data/, PSO outputs: what MMPSO calibration reads and writes.
Hosted SWATGenX calibration does not use the stock SWAT+ calibration.cal mechanism. Each evaluation patches parameter columns directly in the named TxtInOut input files, driven by a site-level cal_parms control file kept outside TxtInOut.
cal_parms_{MODEL}.cal — parameter control file
Located at {model_base}/cal_parms_{MODEL_NAME}.cal (site-specific; one header comment line, one column-header line, then one row per parameter).
| Field | Description | Type | Units |
|---|---|---|---|
| name | Parameter name (PSO decision variable) | string | — |
| file_name | SWAT+ input file under TxtInOut whose column is patched | string | — |
| min / max | Search bounds for the PSO | real | parameter units |
| operation | How the sampled value is applied: replace, multiply, add, percentage, or power | enum | — |
| abs_min / abs_max | Optional physical clamps after the operation ("-" if absent) | real | parameter units |
Patched TxtInOut files are rewritten with the header "{file_name}: written by SWATGenX on {timestamp}" followed by the column headers and data. Stock
calibration.cal, chg_typ/val/conds columns, and soil_lyr conditions are not part of this stack; a pre-existing calibration.cal is removed.Simulated flow — channel_sd_day.nc
- The evaluator reads
channel_sd_day.nc(NetCDF output; see Output filtering). Dimensions time × obj; data variables v1..vN. - Streamflow is variable v41 (flo_out, m³ s⁻¹; column 41 of the channel_sd catalog). The loader emits day, mon, yr, unit, gis_id, flo_out and prefers the yrc/mo/day_mo variables over CF time.
- Evaluation converts m³ s⁻¹ → cfs before comparing against USGS observations.
Observed flow — streamflow_data/
Included in the package when the model is gage-anchored.
| File | Description |
|---|---|
| stations_assignment_v3.csv | Station→channel assignment detail: site_no, USGS/NHD drainage areas, mapping method, swat_gis_id, assignment_class, calibration_eligible, DA-audit columns |
| stations.shp | Assigned stations as EPSG:4326 points with site_no, channel, mapping/DA attributes |
| {channel}_{site_no}.csv | Observed daily record: columns date, streamflow; gaps filled with -99 |
| streamflow_{site}.jpeg / streamflow_record_{site}.jpeg | Record plots when present |
| README.md | Markdown table of the assignment |
MMPSO output artifacts
Artifact root: {model_base}/ for the Default scenario, else {model_base}/calibration_artifacts/{scenario}/.
| Artifact | Format |
|---|---|
| best_solution_{MODEL}.txt | name, value lines + final best objective value |
| local_best_solution_{MODEL}.txt | CSV: best_score + one column per parameter, one row per particle |
| calibration_warm_start_checkpoint_{MODEL}.csv | Same CSV shape as local_best (resume support) |
| calibration_mmpso_memory_{MODEL}.npz | NumPy archive: keys, mem_pos [pool × n_subobj × n_vars], mem_score [pool × n_subobj] |
| calval_settings_snapshot.json | Run settings: cal/val year ranges, nyskip, pool size, iteration/stagnation limits, MMPSO grouping, random seed |
| figures_{MODEL}/GlobalBestImprovement.{csv,png} | Convergence series (iteration, global_best_score) + plot |
| figures_{MODEL}/ParticleBestTracks.csv | iteration, particle, role, local_best_score |
| figures_{MODEL}/SF/… | Hydrograph PNGs per station/stage/time-step |
| hydro_cache/{phase}/iter####_part{i}_{station}.npz | Per-evaluation daily/monthly obs + sim series, param_vector, score |
| CentralPerformance.txt | TSV log: station, time_step, stage, NSE, MPE, PBIAS, RMSE, KGE per write |
Morris sensitivity artifacts (when the sensitivity stage runs) land under {artifacts}/sensitivity/. Product overview: the Calibration methods page.
