VFlood
Struktur Proyek

11. Struktur proyek (untuk pengembangan)

src/VFlood-RRI/
├── config.py         RRI_Input.txt reader + writer
├── grid.py           DEM/raster I/O, geodesic dx/dy
├── channel.py        geometri river (auto / file / cross-section)
├── indexing.py       kompaksi active-cell + neighbor tables
├── section.py        rating-curve cross-sections
├── boundary.py       water-level / discharge boundary conditions
├── dam.py            dam/reservoir operation
├── diversion.py      channel diversion
├── rainfall.py       rain.dat reading + grid remapping
├── integrator.py     RKF45 adaptive time-stepping
├── kernels/          bagian fisika (slope, river, exchange, infiltration, groundwater, ET)
├── engine.py         menyatukan semuanya ke dalam time loop
├── io_output.py      output file writers/readers (.out grid, storage.dat)
├── viz.py            GeoTIFF / PNG / KML export + hillshade/GIF animation
├── geo_import.py     GeoTIFF (GEE/HEC-GeoHMS) -> ascii-grid / rain.dat import
├── dem_terrain.py    DEM lokal -> flow-direction/accumulation (pysheds) untuk DEMNAS/BATNAS
├── rain_netcdf_import.py  gridded satellite rainfall NetCDF (CHIRPS/GSMaP/IMERG) -> rain.dat
├── vrain_import.py   VRain CSV/manifest -> Thiessen-weighted rain.dat
├── grid_align.py     resample grid georeferensi ke grid target (DEM sebagai anchor)
├── project_scaffold.py  DEM + rainfall (+ land use) -> proyek siap dijalankan, satu call
├── gee_codegen.py    generate skrip GEE Code Editor
├── basin_atlas.py     lookup DAS Indonesia (DAS) -> bbox ter-buffer, dari sibling project (basin-atlas)
│                       yang punya static JSON index
├── disaster_events.py  lookup major flood event -> buffered event_start/end, dari sibling project (disasterLab)
├── vfloodprep_gui.py   VFloodPrep: Tkinter GUI atas gee_codegen/project_scaffold/
│                       basin_atlas/disaster_events
├── netcdf_export.py  bundling output menjadi satu NetCDF file
├── atlas_plot.py     plotting gaya basin-atlas untuk NetCDF
├── postprocess.py    zonal stats, Moran's I, point/hydrograph extraction + ACF
├── analyze_plot.py   chart (matplotlib) dari output CSV vflood-analyze
├── velocity.py        velocity turunan (m/s) + vector field dari qu/qv/qr/hr/hs
├── validate.py        validasi pra-run project (alignment grid, overlap rain, file existence, ...)
├── gui_common.py       widget Tk bersama (LogPanel, file/dir picker, catchment picker, disasterLab event picker)
├── vcontrol_gui.py     VFloodControl: orkestrasi pipeline — embed VFloodPrep, call validate.py/cli.run_project,
│                       dan export/netcdf/analyze sebagai subprocess
├── cli.py            `vflood-rri` command (run simulasi) + run_project(), implementasi run bersama
├── export_cli.py     `vflood-export` command (post-process .out ke format GIS)
├── import_cli.py     `vflood-import` command
├── gee_cli.py        `vflood-gee` command
├── netcdf_cli.py     `vflood-netcdf` command
└── postprocess_cli.py   `vflood-analyze` command
                     (vfloodprep_gui.py/vcontrol_gui.py mendefinisikan entry point masing-masing)

reference/rri-1.4.2.7-source/ berisi source Fortran asli yang menjadi dasar port.

Jika Anda ragu terhadap rumus, cek ground truth-nya di sumber Fortran itu.