{"name": "WetSpass-M Modern", "package_name": "wetspass_modern", "version": "2.1.0", "experimental": false, "qgis_min": "3.28.0", "qgis_max": "4.99.0", "downloads": 45, "uploaded_by": "Lafto", "upload_datetime": "2026-10-09T13:15:52.250380", "changelog": "2.1.0 \u2014 Boundary cropping, climate cap, focused-recharge fixes\n2026-10-XX\nNEW - Crop outputs to boundary tool\n- Replaces the failing QGIS gdal:rasterize \"Mask rasters\" workflow,\nwhich frequently errors with \"Duplicate argument -ot\" or silent\nCRS-mismatch failures.\n- File-selection dialog lists every .tif in the output folder,\ngrouped by variable and period, with a live filter box, Select\nall / none / invert quick buttons, an \"Only annual\" selector,\nand an \"Only Recharge\" selector. A running counter shows how\nmany files are selected.\n- Auto-reprojects the boundary vector to each raster's CRS\n(cached per unique CRS, so reprojection happens once per CRS\nrather than once per file).\n- Uses all_touched=True so edge pixels are retained. Critical for\nhydrological water-balance closure.\n- Writes cropped copies to output_dir/cropped_to_boundary/. The\noriginal rasters are never modified.\n- Runs on a background QThread so the GUI stays responsive.\nProgress is reported in the tab's progress bar and log.\nNEW - Physical cap on total recharge, derived from mean annual P\n- \"Recompute from inputs\" reads rain1.tif ... rain12.tif from the\nworking directory and computes mean annual precipitation.\n- Classifies P into one of five climate zones using the standard\nreference table (Arid, Semi-arid, Humid temperate, Wet tropical,\nExtreme cloud forest / karst) with recharge fractions of\n1-5 %, 5-15 %, 20-35 %, 30-50 %, and 40-60 % respectively.\n- Recommended cap = upper bound of the plausible recharge fraction\nfor the matched zone (frac_max x mean_P). This never clips\nlegitimate recharge.\n- Optional override with a user-entered custom value.\n- \"Preview cap effect\" button runs a read-only scan over the\ncombine inputs and reports, without writing any file, the\nnumber of valid cells, before/after min-mean-max, the number of\ncells that would be clipped, the mean drop across all cells,\nand a binned distribution of clipped values (1-1.5x, 1.5-2x,\n2-5x, 5-10x, 10-50x, 50-100x, 100x+ the cap).\nNEW - User-selectable combine method for diffusive + focused\n- Addition (default): R_total = R_diffusive + R_focused.\nCorrect when the two mechanisms are physically independent\npathways, which is the standard WetSpass-M assumption.\n- Replace-by-max (conservative):\nR_total = max(R_diffusive, R_focused). Avoids any risk of\ndouble-counting, at the cost of a systematic underestimate at\nevery stream cell.\n- Focused-over-diffusive: R_focused on stream cells, R_diffusive\nelsewhere. For users who believe the diffusive model already\nincludes some streambed loss.\nNEW - Optional capped focused raster output\n- When the cap is enabled and the \"Also write capped focused\nraster\" box is ticked, a separate file\nRecharge_focused_annual_capped.tif is written alongside the\ntotal. The original focused raster is never overwritten.\nNEW - Climate regime auto-selected from rainfall\n- P < 300 mm/yr        -> Arid\n- 300 <= P < 700       -> Semi-arid\n- 700 <= P < 1200      -> Mixed / transitional\n- P >= 1200            -> Humid\n- The gwdepth-based classifier is retained as a secondary\ncross-check. The button is relabelled \"Auto-detect from\ngwdepth (secondary)\".\nFIX - Focused recharge broadcast error\n- \"operands could not be broadcast together with shapes...\" when\nthe soil-derived Ks raster had a different shape from the D8\nhydrology grid. The soil raster is now resampled to the D8\ngrid before Ks lookup.\nFIX - Focused recharge mass balance\n- Infiltration at a streambed cell can no longer exceed the water\nphysically available at that cell. This removes the 12,000+\nmm/yr outliers that previously contaminated\nRecharge_Total_annual.tif.\nFIX - Focused recharge depth cap\n- The annual focused raster now respects max_daily_depth_mm x\nflow_days per month before summing.\nFIX - Channel-width rasterization\n- Removed the duplicate -ot flag from the gdal:rasterize call\nused to build the channel-width raster. This eliminates the\n\"ERROR 1: Duplicate argument -ot\" error that blocked\nwidth-raster generation on some QGIS builds.\nDOC - User guide updated to 2.1.0\n- New chapter \"Crop outputs to boundary\".\n- Rewritten Focused Recharge chapter covering the combine\nmethods, the climate-based cap, and the preview tool.\n- New troubleshooting entries for the crop tool and the\nclimate-cap workflow.\n- Updated file listing to include core/cropper.py.\n\n2.0.5 \u2014 Resume, pause, and convergence improvements\n2026-10-06\n- Fixed a bug where a disk error (external drive disconnect, power\nloss, or unexpected shutdown) overwrote the good checkpoint with\na stale one that said \"resume from month 1\", forcing a full\nrestart on Resume. The workflow now preserves the checkpoint\nwritten after the last completed month, so Resume picks up at\nthe exact month and block where it stopped.\n- Added read-side retries. A transient input-drive disconnect\nduring a read is now retried up to three times before the run\npauses cleanly, instead of crashing with a hard I/O error.\n- Added a \"Skip to final cycle\" button on the Progress tab.\nOnce the soil-water bucket has essentially converged, you can\npress it to abandon the remaining spin-up cycles and jump\nstraight to the final output cycle. The current cycle finishes\ncleanly, then the workflow proceeds to the final pass.\n- Added a 5 percent tolerance margin to the convergence test, so\nresiduals sitting on the numerical noise floor are recognised\nas converged. This prevents the workflow from running an extra\nspin-up cycle when the bucket is already at equilibrium.\n- Fixed the Cancel button being inactive during a run. Cancel and\nPause are now enabled as soon as the worker starts.\n- Pause now checks the pause flag between individual block writes\nas well as at the start of each block, so the run stops within\none write instead of waiting for a whole block to complete.\n- Added a \"Resuming from checkpoint\" line to the Progress log so\nthe resume position is visible.\n- Fixed duplicate \"[Check Inputs]\" log lines. Auto-checks\ntriggered by switching to the Check Inputs tab or changing the\nworking directory no longer write to the run log; only an\nexplicit Check Inputs click does.\n- Pass 1 (static lookups) no longer rebuilds on every resume\nwhen the user supplies their own slope raster on the Inputs\ntab. The workflow now correctly recognises the supplied slope\nraster and skips the redundant Pass 1 rebuild.\n- Simulated.tbl is now appended to, rather than truncated, when\na run is resumed. Months written before the pause are preserved\nin the final file.\n- The status bar no longer duplicates the full log line; it shows\na short summary of the most recent message.\n- QGIS 4 readiness: qgisMaximumVersion raised to 4.99, so the\nplugin is listed on the QGIS 4 Ready Plugins page.\n- Full Qt6 compatibility: all Qt enums are fully scoped. Loads\ncleanly in Qt5 and Qt6 without deprecation warnings.\n- Replaced all remaining try/except/pass and try/except/continue\nblocks with contextlib.suppress or a small helper function\nacross wetspass_plugin.py, ui/main_dialog.py,\nui/water_balance_tab.py, ui/worker.py, core/raster_io.py,\ncore/stream_io.py, and core/workflow.py. Fixes Flake8 B110\nand B112.\n- Renamed the ambiguous loop variable 'l' to 'line' in\nui/water_balance_tab.py. Fixes Flake8 E741.\n- Replaced subprocess.Popen with QDesktopServices.openUrl for the\n\"Show in folder\" button. Fixes Bandit B603/B607 without needing\nsuppression comments.\n- Fixed metadata.txt continuation-line indentation and escaped\nliteral percent signs so the repository parser accepts the file.\n- No functional or numerical changes to the model physics. Model\nresults are identical to 2.0.2 for the same inputs and starting\nstate.", "external_deps": null, "download_url": "https://plugins.qgis.org/plugins/wetspass_modern/version/2.1.0/download/"}