aihydro-data 0.2.0__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/PKG-INFO +222 -85
  2. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/README.md +210 -79
  3. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/__init__.py +19 -0
  4. aihydro_data-0.2.4/aihydro_data/_physical.py +142 -0
  5. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/_pipeline.py +372 -14
  6. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/_version.py +1 -1
  7. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/cache/__init__.py +133 -3
  8. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/cache/manifest.py +32 -0
  9. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/contracts.py +71 -2
  10. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/exceptions.py +8 -0
  11. aihydro_data-0.2.4/aihydro_data/flood/__init__.py +5 -0
  12. aihydro_data-0.2.4/aihydro_data/flood/gfm.py +106 -0
  13. aihydro_data-0.2.4/aihydro_data/flood/gfm_stac.py +198 -0
  14. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/geometry/__init__.py +72 -7
  15. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/auth.md +6 -4
  16. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/caching.md +9 -0
  17. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/errors.md +6 -0
  18. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/fallback.md +7 -0
  19. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/mcp/__init__.py +45 -8
  20. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/dem.py +57 -1
  21. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/et.py +59 -0
  22. aihydro_data-0.2.4/aihydro_data/products/flood.py +62 -0
  23. aihydro_data-0.2.4/aihydro_data/products/geology.py +171 -0
  24. aihydro_data-0.2.4/aihydro_data/products/impervious.py +127 -0
  25. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/landcover.py +3 -3
  26. aihydro_data-0.2.4/aihydro_data/products/population.py +186 -0
  27. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/precipitation.py +40 -25
  28. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/soil.py +57 -0
  29. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/streamflow.py +30 -17
  30. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/routing/__init__.py +2 -2
  31. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/routing/detect.py +3 -2
  32. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/routing/policy.py +110 -12
  33. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_common.py +54 -0
  34. aihydro_data-0.2.4/aihydro_data/sources/_gee_vendored/precipitation.py +58 -0
  35. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/timeseries.py +22 -4
  36. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/cds_glofas.py +4 -0
  37. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/direct_api.py +172 -118
  38. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/gee/__init__.py +8 -0
  39. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/geoglows_retro.py +14 -4
  40. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/hyriver.py +11 -5
  41. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/openmeteo_flood.py +2 -0
  42. aihydro_data-0.2.4/aihydro_data/sources/pygeoglim.py +191 -0
  43. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/stac.py +175 -68
  44. aihydro_data-0.2.4/aihydro_data/sources/usgs_waterdata.py +1108 -0
  45. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/PKG-INFO +222 -85
  46. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/SOURCES.txt +29 -0
  47. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/requires.txt +13 -6
  48. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/pyproject.toml +22 -7
  49. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_auto_batch.py +2 -2
  50. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_cache_and_batch.py +1 -1
  51. aihydro_data-0.2.4/tests/test_dem_size_routing_and_nlcd_layers.py +205 -0
  52. aihydro_data-0.2.4/tests/test_doc_consistency.py +92 -0
  53. aihydro_data-0.2.4/tests/test_fill_value_masking.py +140 -0
  54. aihydro_data-0.2.4/tests/test_geology_product.py +180 -0
  55. aihydro_data-0.2.4/tests/test_geometry_coercion.py +11 -0
  56. aihydro_data-0.2.4/tests/test_gfm_fetch.py +26 -0
  57. aihydro_data-0.2.4/tests/test_gfm_honesty.py +112 -0
  58. aihydro_data-0.2.4/tests/test_gfm_stac.py +16 -0
  59. aihydro_data-0.2.4/tests/test_payload_units.py +156 -0
  60. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase1_fixes.py +3 -45
  61. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase2_integrity.py +2 -2
  62. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase3_products.py +1 -1
  63. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase3_routing_cache.py +3 -3
  64. aihydro_data-0.2.4/tests/test_place_identity_cache.py +146 -0
  65. aihydro_data-0.2.4/tests/test_precipitation_contract.py +159 -0
  66. aihydro_data-0.2.4/tests/test_product_identity.py +118 -0
  67. aihydro_data-0.2.4/tests/test_queued_redirect_error.py +49 -0
  68. aihydro_data-0.2.4/tests/test_result_honesty.py +66 -0
  69. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_scaffold.py +9 -9
  70. aihydro_data-0.2.4/tests/test_usgs_gauge_resolution.py +559 -0
  71. aihydro_data-0.2.4/tests/test_usgs_pipeline_wiring.py +512 -0
  72. aihydro_data-0.2.4/tests/test_usgs_units.py +30 -0
  73. aihydro_data-0.2.4/tests/test_usgs_waterdata_contract.py +857 -0
  74. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/LICENSE +0 -0
  75. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/cli.py +0 -0
  76. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/geometry/batch.py +0 -0
  77. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/geometry/measures.py +0 -0
  78. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/__init__.py +0 -0
  79. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/batch.md +0 -0
  80. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/deprecations.md +0 -0
  81. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/first_fetch.md +0 -0
  82. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/help_topics/products.md +0 -0
  83. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/__init__.py +0 -0
  84. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/optical.py +0 -0
  85. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/soil_moisture.py +0 -0
  86. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/temperature.py +0 -0
  87. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/products/vegetation.py +0 -0
  88. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/routing/regions.py +0 -0
  89. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sampling/__init__.py +0 -0
  90. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sampling/catchment.py +0 -0
  91. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sampling/chunked.py +0 -0
  92. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/skills/__init__.py +0 -0
  93. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/__init__.py +0 -0
  94. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/__init__.py +0 -0
  95. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/auth.py +0 -0
  96. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/cli.py +0 -0
  97. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/contracts.py +0 -0
  98. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/map_layers.py +0 -0
  99. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_gee_vendored/presets.py +0 -0
  100. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/_retry.py +0 -0
  101. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/base.py +0 -0
  102. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/gee/_composite.py +0 -0
  103. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/sources/gee/_download.py +0 -0
  104. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/transforms/__init__.py +0 -0
  105. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/transforms/cloud_mask.py +0 -0
  106. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/transforms/indices.py +0 -0
  107. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/__init__.py +0 -0
  108. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/_common.py +0 -0
  109. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/_compare.py +0 -0
  110. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/auto.py +0 -0
  111. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/hydrology.py +0 -0
  112. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data/viz/spatial.py +0 -0
  113. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/dependency_links.txt +0 -0
  114. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/entry_points.txt +0 -0
  115. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/aihydro_data.egg-info/top_level.txt +0 -0
  116. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/setup.cfg +0 -0
  117. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_indices.py +0 -0
  118. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_layering.py +0 -0
  119. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_live_backends.py +0 -0
  120. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_live_sweep.py +0 -0
  121. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_mcp_tools.py +0 -0
  122. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_open_meteo.py +0 -0
  123. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_optical_products.py +0 -0
  124. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase4_products.py +0 -0
  125. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_phase_d_robustness.py +0 -0
  126. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_routing.py +0 -0
  127. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_sampling.py +0 -0
  128. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_stac.py +0 -0
  129. {aihydro_data-0.2.0 → aihydro_data-0.2.4}/tests/test_viz.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aihydro-data
3
- Version: 0.2.0
3
+ Version: 0.2.4
4
4
  Summary: Global hydrology dataverse — multi-source, region-aware data fetch (GEE + STAC + HyRiver) for AI agents and humans
5
5
  Author-email: Mohammad Galib <mgalib@purdue.edu>
6
6
  License-Expression: Apache-2.0
@@ -21,7 +21,7 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Requires-Python: >=3.10
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE
24
- Requires-Dist: aihydro-core<0.2,>=0.1.0
24
+ Requires-Dist: aihydro-core<0.3,>=0.2.3
25
25
  Requires-Dist: numpy>=1.24.0
26
26
  Requires-Dist: pandas>=2.0.0
27
27
  Requires-Dist: pydantic>=2.0.0
@@ -43,12 +43,12 @@ Provides-Extra: hyriver
43
43
  Requires-Dist: pynhd>=0.16.0; extra == "hyriver"
44
44
  Requires-Dist: pygeohydro>=0.16.0; extra == "hyriver"
45
45
  Requires-Dist: pygridmet>=0.15.0; extra == "hyriver"
46
+ Requires-Dist: pydaymet>=0.16.0; extra == "hyriver"
46
47
  Requires-Dist: py3dep>=0.15.0; extra == "hyriver"
47
- Requires-Dist: hydrofunctions>=0.2.0; extra == "hyriver"
48
48
  Requires-Dist: rioxarray>=0.15.0; extra == "hyriver"
49
49
  Requires-Dist: xarray>=2023.0.0; extra == "hyriver"
50
- Provides-Extra: direct
51
- Requires-Dist: hydrofunctions>=0.2.0; extra == "direct"
50
+ Provides-Extra: legacy-usgs
51
+ Requires-Dist: dataretrieval>=1.0; extra == "legacy-usgs"
52
52
  Provides-Extra: opendap
53
53
  Requires-Dist: xarray>=2023.0.0; extra == "opendap"
54
54
  Requires-Dist: netCDF4>=1.6.0; extra == "opendap"
@@ -64,6 +64,8 @@ Requires-Dist: s3fs>=2023.0.0; extra == "geoglows"
64
64
  Requires-Dist: zarr>=2.14.0; extra == "geoglows"
65
65
  Requires-Dist: pyproj>=3.4.0; extra == "geoglows"
66
66
  Requires-Dist: shapely>=2.0.0; extra == "geoglows"
67
+ Provides-Extra: pygeoglim
68
+ Requires-Dist: pygeoglim>=1.1.0; extra == "pygeoglim"
67
69
  Provides-Extra: cache
68
70
  Requires-Dist: diskcache>=5.6.0; extra == "cache"
69
71
  Provides-Extra: mcp
@@ -72,11 +74,15 @@ Provides-Extra: viz
72
74
  Requires-Dist: matplotlib>=3.7.0; extra == "viz"
73
75
  Requires-Dist: folium>=0.15.0; extra == "viz"
74
76
  Provides-Extra: all
75
- Requires-Dist: aihydro-data[cache,direct,gee,geoglows,glofas,hyriver,mcp,opendap,stac,viz]; extra == "all"
77
+ Requires-Dist: aihydro-data[cache,gee,geoglows,glofas,hyriver,mcp,opendap,pygeoglim,stac,viz]; extra == "all"
76
78
  Provides-Extra: dev
77
79
  Requires-Dist: pytest>=7.4.0; extra == "dev"
78
80
  Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
79
81
  Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
82
+ Requires-Dist: xarray>=2023.0.0; extra == "dev"
83
+ Requires-Dist: rasterio>=1.3.0; extra == "dev"
84
+ Requires-Dist: pyarrow>=14.0.0; extra == "dev"
85
+ Requires-Dist: matplotlib>=3.7.0; extra == "dev"
80
86
  Requires-Dist: ruff>=0.1.0; extra == "dev"
81
87
  Requires-Dist: mypy>=1.0.0; extra == "dev"
82
88
  Requires-Dist: build>=1.0.0; extra == "dev"
@@ -109,6 +115,7 @@ result.next_steps # agent-facing hints: what to do with this data
109
115
  [![PyPI](https://img.shields.io/pypi/v/aihydro-data)](https://pypi.org/project/aihydro-data/)
110
116
  [![Python](https://img.shields.io/pypi/pyversions/aihydro-data)](https://pypi.org/project/aihydro-data/)
111
117
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
118
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.20823443.svg)](https://doi.org/10.5281/zenodo.20823443)
112
119
 
113
120
  ---
114
121
 
@@ -117,7 +124,7 @@ result.next_steps # agent-facing hints: what to do with this data
117
124
  - [Why](#why)
118
125
  - [Install](#install)
119
126
  - [Quick Start](#quick-start)
120
- - [Products (32 total)](#products)
127
+ - [Products (49 total)](#products)
121
128
  - [Routing System](#routing-system)
122
129
  - [Auth Setup](#auth-setup)
123
130
  - [MCP Tools](#mcp-tools)
@@ -142,7 +149,7 @@ Before `aihydro-data`, fetching hydrology data meant hard-coding a single CONUS-
142
149
  | Land cover | NLCD | ESA WorldCover | Dynamic World |
143
150
  | Soil properties | POLARIS | SoilGrids | — |
144
151
  | DEM | 3DEP (10 m) | Copernicus GLO-30 | SRTM, MERIT-DEM |
145
- | Streamflow | USGS NWIS | — | — |
152
+ | Streamflow | USGS Water Data API (NWIS) | GEOGLOWS, Open-Meteo, GloFAS | GEOGLOWS, Open-Meteo |
146
153
  | NDVI | MODIS (250 m) | MODIS (250 m) | Sentinel-2 (10 m) |
147
154
  | LAI | MODIS | MODIS | — |
148
155
 
@@ -157,13 +164,13 @@ Before `aihydro-data`, fetching hydrology data meant hard-coding a single CONUS-
157
164
  pip install aihydro-data[all]
158
165
 
159
166
  # Per-backend
160
- pip install aihydro-data[gee] # Google Earth Engine (20 products)
167
+ pip install aihydro-data[gee] # Google Earth Engine (23 products)
161
168
  pip install aihydro-data[hyriver] # CONUS via HyRiver (10 products)
162
169
  pip install aihydro-data[stac] # STAC catalogues (Planetary Computer)
163
170
  pip install aihydro-data[opendap] # IRI OPeNDAP (CHIRPS auth-free fallback)
164
171
  ```
165
172
 
166
- > **Python**: 3.10+ &nbsp;|&nbsp; **GEE auth**: required for 20 GEE products (see [Auth Setup](#auth-setup))
173
+ > **Python**: 3.10+ &nbsp;|&nbsp; **GEE auth**: required for 23 GEE products (see [Auth Setup](#auth-setup))
167
174
 
168
175
  ---
169
176
 
@@ -275,86 +282,159 @@ check = data_validate_request(
275
282
 
276
283
  ## Products
277
284
 
278
- 32 products across 13 variables, live-tested against real backends (v0.2.0).
285
+ 57 products across 19 variables (v0.2.0).
279
286
 
280
287
  ### Precipitation (6 products)
281
288
 
282
289
  | ID | Source | Coverage | Resolution | Timestep | Notes |
283
290
  |---|---|---|---|---|---|
284
- | `CHIRPS` | GEE | Global | 5 km | Daily | Primary global; GEE auth required |
285
- | `IMERG_PRECIP` | GEE | Global | 11 km | Daily | NASA GPM V07; GEE auth required |
286
- | `ERA5L_PRECIP` | GEE | Global | 11 km | Daily | Reanalysis; 1950–present |
287
- | `GRIDMET_PRECIP` | HyRiver | CONUS | 4 km | Daily | Primary CONUS; no auth |
288
- | `DAYMET_PRECIP` | HyRiver | N. America | 1 km | Daily | High-res; no auth |
289
- | `CHIRPS_IRI` | Direct API | Global | 5 km | Daily | **Auth-free fallback** via IRI OPeNDAP |
290
-
291
- ### Temperature (7 products)
292
-
293
- | ID | Source | Coverage | Resolution | Timestep |
294
- |---|---|---|---|---|
295
- | `ERA5L_TMAX` | GEE | Global | 11 km | Daily |
296
- | `ERA5L_TMIN` | GEE | Global | 11 km | Daily |
297
- | `ERA5L_TMEAN` | GEE | Global | 11 km | Daily |
298
- | `GRIDMET_TMAX` | HyRiver | CONUS | 4 km | Daily |
299
- | `GRIDMET_TMIN` | HyRiver | CONUS | 4 km | Daily |
300
- | `DAYMET_TMAX` | HyRiver | N. America | 1 km | Daily |
301
- | `DAYMET_TMIN` | HyRiver | N. America | 1 km | Daily |
302
-
303
- ### Evapotranspiration (5 products)
304
-
305
- | ID | Variable | Source | Coverage | Resolution | Timestep |
291
+ | `CHIRPS` | gee | global | 5 km | daily | GEE auth required |
292
+ | `IMERG_PRECIP` | gee | global | 11 km | daily | GEE auth required |
293
+ | `ERA5L_PRECIP` | gee | global | 11 km | daily | GEE auth required |
294
+ | `GRIDMET_PRECIP` | hyriver | CONUS | 4 km | daily | auth-free |
295
+ | `DAYMET_PRECIP` | hyriver | NORTH_AMERICA | 1 km | daily | auth-free |
296
+ | `CHIRPS_IRI` | direct_api | global | 5 km | daily | auth-free |
297
+
298
+ ### Temperature — Tmax (4 products)
299
+
300
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
301
+ |---|---|---|---|---|---|
302
+ | `GRIDMET_TMAX` | hyriver | CONUS | 4 km | daily | auth-free |
303
+ | `DAYMET_TMAX` | hyriver | NORTH_AMERICA | 1 km | daily | auth-free |
304
+ | `ERA5L_TMAX` | gee | global | 11 km | daily | GEE auth required |
305
+ | `OPEN_METEO_TMAX` | direct_api | global | 25 km | daily | auth-free; spatial support: point |
306
+
307
+ ### Temperature — Tmin (4 products)
308
+
309
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
310
+ |---|---|---|---|---|---|
311
+ | `GRIDMET_TMIN` | hyriver | CONUS | 4 km | daily | auth-free |
312
+ | `DAYMET_TMIN` | hyriver | NORTH_AMERICA | 1 km | daily | auth-free |
313
+ | `ERA5L_TMIN` | gee | global | 11 km | daily | GEE auth required |
314
+ | `OPEN_METEO_TMIN` | direct_api | global | 25 km | daily | auth-free; spatial support: point |
315
+
316
+ ### Temperature — Tmean (1 product)
317
+
318
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
306
319
  |---|---|---|---|---|---|
307
- | `MOD16_ET` | ET (actual) | GEE | Global | 500 m | 8-day → monthly |
308
- | `TERRACLIMATE_AET` | ET (actual) | GEE | Global | 4.6 km | Monthly |
309
- | `MOD16_PET` | PET | GEE | Global | 500 m | 8-day → monthly |
310
- | `ERA5L_PET` | PET | GEE | Global | 11 km | Daily |
311
- | `GRIDMET_PET` | PET | HyRiver | CONUS | 4 km | Daily |
320
+ | `ERA5L_TMEAN` | gee | global | 11 km | daily | GEE auth required |
312
321
 
313
- ### DEM (4 products)
322
+ ### Potential Evapotranspiration (PET) (4 products)
314
323
 
315
- | ID | Source | Coverage | Resolution | Notes |
316
- |---|---|---|---|---|
317
- | `GLO30` | GEE | Global | 30 m | Copernicus; primary global DEM |
318
- | `SRTM` | GEE | 60°S–60°N | 30 m | NASA SRTM v3 |
319
- | `MERIT_DEM` | GEE | Global | 90 m | Hydrologically conditioned |
320
- | `DEM3DEP_10M` | HyRiver | CONUS | 10 m | USGS 3DEP; highest resolution |
324
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
325
+ |---|---|---|---|---|---|
326
+ | `MOD16_PET` | gee | global | 500 m | monthly | GEE auth required |
327
+ | `ERA5L_PET` | gee | global | 11 km | daily | GEE auth required |
328
+ | `GRIDMET_PET` | hyriver | CONUS | 4 km | daily | auth-free |
329
+ | `OPEN_METEO_PET` | direct_api | global | 25 km | daily | auth-free; spatial support: point |
330
+
331
+ ### Actual Evapotranspiration (ET) (3 products)
332
+
333
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
334
+ |---|---|---|---|---|---|
335
+ | `MOD16_ET` | gee | global | 500 m | monthly | GEE auth required |
336
+ | `TERRACLIMATE_AET` | gee | global | 4 km | monthly | GEE auth required |
337
+ | `OPENET_ENSEMBLE` | gee | CONUS | 30 m | monthly | GEE auth required |
338
+
339
+ ### DEM (6 products)
340
+
341
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
342
+ |---|---|---|---|---|---|
343
+ | `GLO30` | gee | global | 30 m | static | GEE auth required |
344
+ | `SRTM` | gee | global | 30 m | static | GEE auth required |
345
+ | `DEM3DEP_10M` | hyriver | CONUS | 10 m | static | auth-free |
346
+ | `MERIT_DEM` | gee | global | 90 m | static | GEE auth required |
347
+ | `GLO30_STAC` | stac | global | 30 m | static | auth-free |
348
+ | `GLO30_ELEMENT84` | stac | global | 30 m | static | auth-free |
321
349
 
322
350
  ### Soil Moisture (1 product)
323
351
 
324
- | ID | Source | Coverage | Resolution | Timestep |
325
- |---|---|---|---|---|
326
- | `SMAP_SM` | GEE | Global | 9 km | Daily (2015–present) |
352
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
353
+ |---|---|---|---|---|---|
354
+ | `SMAP_SM` | gee | global | 9 km | daily | GEE auth required |
327
355
 
328
- ### Land Cover (3 products)
356
+ ### Land Cover (4 products)
329
357
 
330
- | ID | Source | Coverage | Notes |
331
- |---|---|---|---|
332
- | `NLCD` | HyRiver | CONUS | NLCD 2021; 30 m |
333
- | `ESA_WORLDCOVER` | GEE | Global | 10 m; 2020 & 2021 |
334
- | `DYNAMIC_WORLD` | GEE | Global | 10 m; Sentinel-2 derived |
358
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
359
+ |---|---|---|---|---|---|
360
+ | `NLCD` | hyriver | CONUS | 30 m | static | auth-free |
361
+ | `ESA_WORLDCOVER` | gee | global | 10 m | static | GEE auth required |
362
+ | `DYNAMIC_WORLD` | gee | global | 10 m | static | GEE auth required |
363
+ | `ESA_WORLDCOVER_STAC` | stac | global | 10 m | static | auth-free |
335
364
 
336
365
  ### Soil Properties (2 products)
337
366
 
338
- | ID | Source | Coverage | Notes |
339
- |---|---|---|---|
340
- | `POLARIS` | HyRiver | CONUS | 30 m; 9 properties |
341
- | `SOILGRIDS` | GEE | Global | 250 m; ISRIC |
367
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
368
+ |---|---|---|---|---|---|
369
+ | `POLARIS` | hyriver | CONUS | 30 m | static | auth-free |
370
+ | `SOILGRIDS` | gee | global | 250 m | static | GEE auth required |
342
371
 
343
- ### Vegetation (3 products)
372
+ ### NDVI (2 products)
344
373
 
345
- | ID | Variable | Source | Coverage | Resolution | Timestep |
374
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
346
375
  |---|---|---|---|---|---|
347
- | `MODIS_NDVI` | NDVI | GEE | Global | 250 m | 16-day composite |
348
- | `SENTINEL2_NDVI` | NDVI | GEE | Global | 10 m | ~5 day revisit |
349
- | `MODIS_LAI` | LAI | GEE | Global | 500 m | 8-day composite |
376
+ | `MODIS_NDVI` | gee | global | 250 m | monthly | GEE auth required |
377
+ | `SENTINEL2_NDVI` | gee | global | 10 m | monthly | GEE auth required |
350
378
 
351
- ### Streamflow (1 product)
379
+ ### LAI (1 product)
352
380
 
353
- | ID | Source | Coverage | Notes |
354
- |---|---|---|---|
355
- | `NWIS_STREAMFLOW` | Direct API | CONUS | USGS daily values; pass gauge ID as geometry |
381
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
382
+ |---|---|---|---|---|---|
383
+ | `MODIS_LAI` | gee | global | 500 m | monthly | GEE auth required |
356
384
 
357
- ---
385
+ ### Optical (5 products)
386
+
387
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
388
+ |---|---|---|---|---|---|
389
+ | `SENTINEL2_SR` | gee | global | 10 m | composite | GEE auth required |
390
+ | `LANDSAT9_SR` | gee | global | 30 m | composite | GEE auth required |
391
+ | `LANDSAT8_SR` | gee | global | 30 m | composite | GEE auth required |
392
+ | `SENTINEL2_SR_STAC` | stac | global | 10 m | composite | auth-free |
393
+ | `LANDSAT_SR_STAC` | stac | global | 30 m | composite | auth-free |
394
+
395
+ ### Streamflow (4 products)
396
+
397
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
398
+ |---|---|---|---|---|---|
399
+ | `NWIS_STREAMFLOW` | direct_api | CONUS | 0 m | daily | auth-free; spatial support: gauge_point |
400
+ | `GEOGLOWS_RETRO` | geoglows_retro | global | 0 m | daily | auth-free; spatial support: reach |
401
+ | `OPENMETEO_FLOOD` | openmeteo_flood | global | 5 km | daily | auth-free; spatial support: reach |
402
+ | `GLOFAS_STREAMFLOW` | cds_glofas | global | 5 km | daily | spatial support: reach |
403
+
404
+ ### Bedrock Depth (1 product)
405
+
406
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
407
+ |---|---|---|---|---|---|
408
+ | `OPENLANDMAP_BEDROCK` | gee | global | 250 m | static | GEE auth required |
409
+
410
+ ### Flood Inundation (1 product)
411
+
412
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
413
+ |---|---|---|---|---|---|
414
+ | `GFM_S1_INUNDATION` | direct_api | global | 20 m | event | auth-free |
415
+
416
+ ### Geology (3 products)
417
+
418
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
419
+ |---|---|---|---|---|---|
420
+ | `PYGEOGLIM_ALL` | pygeoglim | global | 0 m | static | auth-free |
421
+ | `GLIM_TILES` | pygeoglim | global | 0 m | static | auth-free |
422
+ | `GLHYMPS_TILES` | pygeoglim | global | 0 m | static | auth-free |
423
+
424
+ ### Impervious (2 products)
425
+
426
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
427
+ |---|---|---|---|---|---|
428
+ | `NLCD_IMPERVIOUS` | hyriver | CONUS | 30 m | static | auth-free |
429
+ | `GHSL_BUILT_UP` | gee | global | 100 m | static | GEE auth required |
430
+
431
+ ### Population (3 products)
432
+
433
+ | ID | Source | Coverage | Resolution | Timestep | Notes |
434
+ |---|---|---|---|---|---|
435
+ | `GHSL_POP` | gee | global | 100 m | 5-yearly | — |
436
+ | `WORLDPOP` | gee | global | 100 m | annual | — |
437
+ | `GPW_V411` | gee | global | 927 m | 5-yearly | — |
358
438
 
359
439
  ## Routing System
360
440
 
@@ -387,7 +467,7 @@ FetchResult(data, product, source, citation, units, next_steps)
387
467
 
388
468
  ## Auth Setup
389
469
 
390
- ### Google Earth Engine (20 products)
470
+ ### Google Earth Engine (23 products)
391
471
 
392
472
  ```bash
393
473
  # 1. Install
@@ -410,13 +490,25 @@ No auth required. Just install:
410
490
  pip install aihydro-data[hyriver]
411
491
  ```
412
492
 
413
- ### CHIRPS IRI / NWIS (2 products)
493
+ ### Auth-free global products
414
494
 
415
495
  No auth required:
416
496
 
417
497
  ```bash
418
498
  pip install aihydro-data[opendap] # CHIRPS_IRI — needs xarray + netCDF4
419
- # NWIS_STREAMFLOW works with [hyriver] — no extra auth
499
+ pip install aihydro-data[geoglows] # GEOGLOWS_RETRO — AWS Zarr; needs s3fs + zarr
500
+ # NWIS_STREAMFLOW, OPEN_METEO_*, *_STAC all work with their respective extras; no auth
501
+ ```
502
+
503
+ ### GloFAS (modelled global streamflow)
504
+
505
+ ```bash
506
+ pip install aihydro-data[glofas]
507
+
508
+ # One-time: create a free Copernicus CDS account at cds.climate.copernicus.eu
509
+ # then add your token to ~/.cdsapirc:
510
+ # url: https://cds-beta.climate.copernicus.eu
511
+ # key: <your-api-key>
420
512
  ```
421
513
 
422
514
  ---
@@ -453,22 +545,31 @@ aihydro_data/
453
545
  │
454
546
  ├── products/ ← Declarative variable registry (one file per variable)
455
547
  │ ├── precipitation.py 6 products
456
- │ ├── temperature.py 7 products
457
- │ ├── et.py 5 products
458
- │ ├── dem.py 4 products
548
+ │ ├── temperature.py 9 products (tmax/tmin/tmean + Open-Meteo)
549
+ │ ├── et.py 6 products (pet 4 + et 2)
550
+ │ ├── dem.py 5 products
459
551
  │ ├── soil_moisture.py 1 product
460
- │ ├── landcover.py 3 products
552
+ │ ├── landcover.py 4 products
461
553
  │ ├── soil.py 2 products
462
- │ ├── vegetation.py 3 products
463
- │ └── streamflow.py 1 product
554
+ │ ├── vegetation.py 3 products (ndvi 2 + lai 1)
555
+ │ ├── optical.py 5 products
556
+ │ └── streamflow.py 4 products (NWIS + GEOGLOWS + Open-Meteo + GloFAS)
464
557
  │
465
558
  ├── sources/ ← Backend adapters (lazy imports — safe without extras)
466
559
  │ ├── base.py SourceBackend ABC
467
- │ ├── gee.py GEE backend (20 products)
560
+ │ ├── gee/ GEE backend package (23 products)
561
+ │ │ ├── __init__.py Backend class + fetch_timeseries/fetch_raster
562
+ │ │ ├── _download.py raster download helpers
563
+ │ │ └── _composite.py optical composite + spectral index helpers
468
564
  │ ├── hyriver.py HyRiver backend (10 products)
469
- │ ├── direct_api.py NWIS + CHIRPS IRI OPeNDAP (2 products)
470
- │ ├── stac.py STAC/Planetary Computer (future)
471
- │ └── _gee_vendored/ GEE auth + timeseries helpers (vendored from aihydro-tools)
565
+ │ ├── direct_api.py NWIS + CHIRPS IRI OPeNDAP + Open-Meteo (5 products)
566
+ │ ├── stac.py STAC/Planetary Computer (4 products)
567
+ │ ├── geoglows_retro.py GEOGLOWS v2 retrospective via AWS Zarr (1 product)
568
+ │ ├── openmeteo_flood.py Open-Meteo river discharge (1 product)
569
+ │ ├── cds_glofas.py GloFAS via Copernicus CDS (1 product)
570
+ │ ├── _common.py require_import + assert_backend_available helpers
571
+ │ ├── _retry.py call_with_retry for transient HTTP errors
572
+ │ └── _gee_vendored/ GEE auth + timeseries helpers
472
573
  │
473
574
  ├── routing/
474
575
  │ ├── regions.py CONUS bbox, Pfafstetter region table
@@ -535,7 +636,7 @@ Every success carries `citation`, `bibtex`, `units`, `license`, and `next_steps`
535
636
  # Offline suite (no network, no auth — ~7 seconds)
536
637
  pytest -m "not live"
537
638
 
538
- # Live sweep — tests all 32 products against real backends (~13 minutes)
639
+ # Live sweep — tests all 57 products against real backends (~15 minutes)
539
640
  # Requires GEE auth + internet
540
641
  pytest tests/test_live_sweep.py -v
541
642
  ```
@@ -544,9 +645,11 @@ pytest tests/test_live_sweep.py -v
544
645
 
545
646
  ## Status
546
647
 
547
- **v0.1.5** — Pre-PyPI development. 34 products live-tested; visualization layer (auto-plot, hydrology plots, multi-source compare, folium map preview); STAC backend with auth-free DEM + landcover; cookbook notebook with 10 recipes; multi-OS CI. Versioning stays on `0.1.x` until the first public PyPI release.
648
+ **v0.2.1** — STAC robustness + metadata repair: retry+backoff in STAC backend; `GLO30_ELEMENT84`; impervious + bedrock_depth variables; and corrected `aihydro-core` dependency metadata so downstream `aihydro-watershed`/`aihydro-tools` resolve with `aihydro-core>=0.2`. Shipped with 54 products in 18 variables and 369 offline tests (current counts: see [Products](#products)).
548
649
 
549
- See **[ROADMAP.md](ROADMAP.md)** for what's planned next, and **[examples/cookbook.ipynb](examples/cookbook.ipynb)** for 10 working recipes.
650
+ **v0.2.0** — First public PyPI release. Global streamflow tri-source chain (GEOGLOWS/Open-Meteo/GloFAS); spatial-support honesty (point vs areal vs reach products declared and enforced); verify-on-read cache; `region` and `outlet` kwargs; structural refactor (gee/ package, MCP `@_tool_envelope`); 341 offline tests.
651
+
652
+ See **[examples/cookbook.ipynb](examples/cookbook.ipynb)** for working recipes.
550
653
 
551
654
  | Phase | Status | Description |
552
655
  |---|---|---|
@@ -557,10 +660,44 @@ See **[ROADMAP.md](ROADMAP.md)** for what's planned next, and **[examples/cookbo
557
660
  | 5: Cache + provenance | ✅ | Disk cache, manifest, license tracking |
558
661
  | 6: Batch fetching | ✅ | Multi-geometry parallel dispatch |
559
662
  | 7: MCP tools | ✅ | 9 tools, help topics, doctor |
560
- | 8: PyPI publish | 🔲 | v0.2.0 release |
663
+ | 8: PyPI publish | ✅ | v0.2.0 on PyPI (`pip install aihydro-data`) |
664
+
665
+ ---
666
+
667
+
668
+ ---
669
+
670
+ ## Citation
671
+
672
+ If you use `aihydro-data` in your research, please cite it:
673
+
674
+ ```bibtex
675
+ @software{galib2025aihydrodata,
676
+ author = {Galib, Mohammad},
677
+ title = {aihydro-data: Global Hydrology Dataverse for the AI-Hydro Platform},
678
+ year = {2025},
679
+ publisher = {Zenodo},
680
+ doi = {10.5281/zenodo.20823443},
681
+ url = {https://doi.org/10.5281/zenodo.20823443}
682
+ }
683
+ ```
561
684
 
562
685
  ---
563
686
 
564
687
  ## License
565
688
 
566
689
  Apache-2.0. Data products carry their own licenses — always check `result.license` or `data_describe_product(id)`.
690
+
691
+ ### IMERG daily precipitation contract
692
+
693
+ `IMERG_PRECIP` integrates the native half-hourly rates into complete UTC daily totals. Date-only start/end are inclusive for this product. Missing, duplicate or invalid intervals fail instead of producing partial totals. Returned `interval_count`, `expected_interval_count` and `source_status` columns expose temporal support and product maturity. Provisional or unknown status must not be cited as verified Final data. This check does not establish spatial completeness or observational accuracy. See [the decision and limitations](DECISIONS.md) and [implementation plan](plans/precipitation-contract-2026-09-07.md).
694
+
695
+ ### GFM observational failures and synthetic fixtures
696
+
697
+ `fetch_gfm_extent` raises on network/asset failures; it never substitutes synthetic polygons. `use_fixture=True` explicitly selects synthetic test data, without an observational citation. Inspect `status`: no acquisitions and no valid pixels are distinct from no flood detected. Per-item acquisition times and assets remain available for review. Automatic model-validation scores are withheld until a jointly valid comparison footprint is established; an extent alone is insufficient. See [the flood-reference decision](DECISIONS.md).
698
+
699
+ ### CHIRPS versions and cached identity
700
+
701
+ `CHIRPS` currently routes to **v3 daily SAT** on GEE. `CHIRPS_IRI` serves **v2 daily-improved**; fallback between them changes the scientific product. V3 SAT uses IMERG Late V07 for daily partitioning of pentad totals, so comparison with IMERG must account for shared inputs.
702
+
703
+ Inspect `result.product_identity` (also returned by MCP) for version, variant, derivation, dependencies and interpretation metadata. New caches retain the identity and warnings captured at fetch time. Empty legacy identity means unknown. These are configured-product declarations, not verification of upstream asset bytes or revision. See [the identity decision](DECISIONS.md).