How shr-aditya/gwsa-stage-0b works
This single-file scientific workflow derives Stage 0B groundwater-storage anomalies from GLDAS-2.2 GRACE-DA data. Its principal flow inventories input files, processes them in either gridded or study-area-mean mode, aggregates valid daily GWS to monthly values, computes a fixed 2004–2009 reference and anomaly, and writes mode-specific outputs. The script also documents water-balance checks and an optional seasonal diagnostic. The graph reflects only relationships visible in the excerpts; some internal processing details and output calls are not shown.
Main entry points: gwsa_stage0b.py Grid processing
Components 17
Input and spatial setup
- File inventory
gwsa_stage0b.py - Metadata and units
gwsa_stage0b.py - Spatial preparation
gwsa_stage0b.py
GWS processing
- Grid processing
gwsa_stage0b.py - Study-area processing
gwsa_stage0b.py - Cleaning and masks
gwsa_stage0b.py - Daily GWS states
gwsa_stage0b.py - Monthly GWS states
gwsa_stage0b.py
Analysis and diagnostics
- Water-balance checks
gwsa_stage0b.py - Fixed-mean reference
gwsa_stage0b.py - Fixed-mean GWSA
gwsa_stage0b.py - Seasonal diagnostic
gwsa_stage0b.py - GRACE-gap flag
gwsa_stage0b.py
Products
- Grid NetCDF
gwsa_stage0b.py - Area-mean CSV
gwsa_stage0b.py
Other components
- GLDAS input files
- Study boundary
Connections 18
- GLDAS input files → File inventory: scans pattern
gwsa_stage0b.py - File inventory → Grid processing: dispatches files
gwsa_stage0b.py - File inventory → Study-area processing: dispatches files
gwsa_stage0b.py - Study boundary → Spatial preparation: provides geometry
gwsa_stage0b.py - Grid processing → Metadata and units: logs and validates
gwsa_stage0b.py - Grid processing → Spatial preparation: clips spatially
gwsa_stage0b.py - Grid processing → Cleaning and masks: cleans variables
gwsa_stage0b.py - Cleaning and masks → Daily GWS states: produces valid states
gwsa_stage0b.py - Daily GWS states → Monthly GWS states: aggregates daily
gwsa_stage0b.py - Grid processing → Water-balance checks: checks variables
gwsa_stage0b.py - Monthly GWS states → Fixed-mean reference: computes baseline
gwsa_stage0b.py - Monthly GWS states → Fixed-mean GWSA: subtracts reference
gwsa_stage0b.py - Fixed-mean reference → Fixed-mean GWSA: supplies baseline
gwsa_stage0b.py - Monthly GWS states → Seasonal diagnostic: computes diagnostic
gwsa_stage0b.py - Grid processing → GRACE-gap flag: flags missing period
gwsa_stage0b.py - Grid processing → Grid NetCDF: saves results
gwsa_stage0b.py - Study-area processing → Spatial preparation: builds area weights
gwsa_stage0b.py - Study-area processing → Area-mean CSV: saves results
gwsa_stage0b.py