HydroSwift provides a flag-based CLI.
Run it as:
hyswift ...or, if the console script is not on your path:
python -m hydroswift ...The CLI is flag-based, not subcommand-based.
You compose a command from:
- a source selection (
-b/--basinfor WRIS, or--cwc/--station/--cwc-basinfor CWC) - one or more WRIS dataset flags if you are using WRIS
- optional output/date/plot/merge flags
Example:
hyswift -b Krishna -q -rf -tempWRIS is the default mode when you provide a basin and at least one WRIS dataset flag.
-b/--basin- one or more dataset flags such as
-q,-wl,-rf, etc.
You can pass either:
- a basin name, such as
Krishna - a WRIS basin number, such as
6
Examples:
hyswift -b 5 -q
hyswift -b Krishna -q -rf -temp
hyswift -b Godavari --discharge --rainfall --temperatureCurrent WRIS variable flags are:
-q,--discharge-wl,--water-level-atm,--atm-pressure-rf,--rainfall-temp,--temperature-rh,--humidity-solar,--solar-radiation-sed,--sediment-gwl,--groundwater-level
Examples:
hyswift -b Godavari -q
hyswift -b Krishna -q -rf -temp
hyswift -b Krishna --discharge --rainfallCWC downloads target water-level data.
You can enter CWC mode with any of the following:
hyswift --cwc
hyswift --cwc-station 040-CDJAPR 032-LGDHYD
hyswift --station 040-CDJAPR 032-LGDHYD
hyswift --cwc-basin Krishna Godavari--cwc--cwc-station CODE [CODE ...]--station CODE [CODE ...](alias of--cwc-station)--cwc-basin NAME [NAME ...]--cwc-refresh
Examples aligned with the notebook:
hyswift --cwc
hyswift --cwc-station 032-LGDHYD
hyswift --cwc-basin KrishnaBehavior notes:
- CWC mode does not support WRIS multi-variable downloads.
- If you pass both station codes and basin filters, HydroSwift uses the matching intersection.
Common download controls include:
--start-date YYYY-MM-DD--end-date YYYY-MM-DD--output-dir PATH--format csv|xlsx--overwrite--merge--plot--plot-svg--plot-moving-average-window N--quiet--metadata
Examples:
hyswift -b 6 -q --start-date 2020-01-01 --end-date 2022-01-01hyswift -b 5 -q --output-dir data --format csv --overwritehyswift -b 5 -q --plotUse existing downloaded files to generate GeoPackages.
hyswift --merge-only --input-dir outputYou can also specify the output folder
hyswift --merge-only --input-dir output --output-dir merged_outputUse existing downloaded files to generate plots.
hyswift --plot-only --input-dir outputWith quality options:
hyswift --plot-only --input-dir output --plot-svg --plot-moving-average-window 30hyswift --listThis prints:
- the WRIS basin list
- the total number of known CWC stations
hyswift --version
hyswift --cite
hyswift --coffeeThe beginner notebook explicitly maps many CLI commands to Python API calls.
Examples:
| CLI | Python API |
|---|---|
hyswift -b 5 -q |
hydroswift.wris.download(basin=5, variable='discharge') |
hyswift -b Krishna -q -rf -temp |
hydroswift.wris.download(basin='Krishna', variable=['discharge', 'rainfall', 'temperature']) |
hyswift --merge-only --input-dir output |
hydroswift.merge_only(input_dir='output') |
hyswift --plot-only --input-dir output |
hydroswift.plot_only(input_dir='output') |
hyswift --cwc-station 032-LGDHYD |
hydroswift.cwc.download(station=['032-LGDHYD']) |
hyswift --cwc-basin Krishna |
hydroswift.cwc.download(basin=['Krishna']) |
You must provide at least one WRIS dataset flag like -q or -rf.
These modes require:
--input-dir- an input directory that already contains HydroSwift outputs
CWC is a water-level workflow. If you need multiple WRIS variables, use WRIS mode with -b plus WRIS dataset flags.
The CLI does not expose the same table-native dispatch model as hydroswift.fetch(...). For discover → subset → fetch workflows, prefer the Python API.