River_Network / src /config /settings.py
ageraustine's picture
Upload folder using huggingface_hub
a74054f verified
Raw
History Blame Contribute Delete
3.13 kB
"""
Configuration settings for the hydrological GNN pipeline.
Centralized configuration following SRP.
"""
from pathlib import Path
from typing import List
# Project root
PROJECT_ROOT = Path(__file__).parent.parent.parent
# Data directories
DATA_DIR = PROJECT_ROOT / "datasets"
WATERSHED_RISLE = DATA_DIR / "Watersehd_risle" / "Watershed_Risle.shp"
WATERSHED_EURE = DATA_DIR / "Watershed_Eure" / "Watershed_Eure.shp"
WATERSHED_MERGED = DATA_DIR / "Risle_Eure_watershed" / "Risle_Eure_Watershed.shp"
ADES_DIR = DATA_DIR / "ADES"
ADES_STATIONS = ADES_DIR / "groundwater_stations.csv"
ADES_LEVELS = ADES_DIR / "groundwater_levels_watershed.csv"
IDPR_FILE = DATA_DIR / "IDPR_values.csv"
STATION_LIST = DATA_DIR / "station_list.csv"
SELECTED_STATIONS = DATA_DIR / "selected_stations.csv"
# Note: Hydrometric and SAFRAN data directories (to be populated)
HYDROMETRIC_DIR = DATA_DIR / "hydrometric" # To be created
SAFRAN_DIR = DATA_DIR / "safran" # To be created
DEM_DIR = DATA_DIR / "DEM" # To be created
# Basin IDs (based on station names in station_list.csv)
BASIN_IDS = {
"LA_RISLE": 0, # 12 stations: "La Risle à ..."
"LA_EURE": 1 # 13 stations: "L'Eure à ..." + "Le bras de l'Eure à ..."
}
# Total stations in study area
NUM_STATIONS = 27 # 12 Risle + 13 Eure + 2 variants
# CRS (Coordinate Reference Systems)
CRS_LAMBERT93 = "EPSG:2154" # French national projection (shapefiles, X/Y coords)
CRS_WGS84 = "EPSG:4326" # Geographic coordinates (lat/lon)
# Target variables (streamflow predictions)
TARGET_VARIABLES = [
"QmnJ", # Daily mean discharge
"QIXnJ", # Daily maximum instantaneous discharge
"HIXnJ" # Daily maximum water level
]
# SAFRAN meteorological input variables
SAFRAN_VARIABLES = [
"DLI_Q", # Atmospheric radiation
"DRAINC_Q", # Drainage
"ETP_Q", # Potential evapotranspiration
"FF_Q", # Wind speed
"HU_Q", # Relative humidity
"PRELIQ_Q", # Liquid precipitation
"PRENEI_Q", # Solid precipitation (snowfall)
"RESR_NEIGE_Q", # Snowpack water equivalent
"RUNC_Q", # Runoff
"SSI_Q", # Visible radiation
"SWI_Q", # Soil moisture index
"T_Q" # Average air temperature
]
# Additional hydrometric variables (not targets but useful features)
HYDROMETRIC_FEATURES = [
"QmM", # Monthly mean discharge
"QINM", # Monthly minimum instantaneous discharge
"QIXM", # Monthly maximum instantaneous discharge
"HIXM" # Monthly maximum water level
]
# Temporal settings
TEMPORAL_WINDOW = 30 # Input window: 30 days
DATE_RANGE = ("1960-01-01", "2026-12-31")
# Normalization
NORMALIZATION_METHOD = "robust" # Options: "standard", "minmax", "robust"
# Device configuration
DEVICE = "cuda" # Will fall back to CPU if CUDA unavailable
# Graph construction
ALLOW_DISCONNECTED_COMPONENTS = True # Per project requirements
SURFACE_CONNECTIVITY_ONLY = True # Phase 1: no groundwater connections yet
# Random seed for reproducibility
RANDOM_SEED = 42