# natrist-0/geovel architecture

> Architecture diagram of the GitHub repository natrist-0/geovel, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/natrist-0/geovel
- Repository: https://github.com/natrist-0/geovel

## Overview

GEOVEL is a PyQt desktop tool for turning ocean CTD station profiles into geostrophic velocity products and visualizations. The user configures input files and processing options in the GUI; the controller runs the processing and exposes station localization, CTD profiles, velocity profiles, and hodographs. Processing covers CTD normalization, spatial specific-volume gradients, and velocity integration, with the combined CSV acting as persistent intermediate and result data. README and sampled controller code establish the product workflow; unsampled module call details are not assumed.

Main entry points: [`01_code/code/main.py`](https://github.com/natrist-0/geovel/blob/main/01_code/code/main.py) (Application controller), [`01_code/code/core/utils.py`](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/utils.py) (Plot layout utilities), [`01_code/code/core/ctd_profiles.py`](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/ctd_profiles.py) (CTD profile plots), [`01_code/code/core/map_coords.py`](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/map_coords.py) (Station localization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_controller["Application controller<br/>[main.py]"]
  node_window["Main window UI<br/>[ui_mainwindow.py]"]
  node_resources["UI resources<br/>[ui_resources.py]"]
end

subgraph group_processing["CTD processing"]
  node_dataio["CTD import and gradients<br/>[data_io.py]"]
  node_ctdstore[("Combined CTD data")]
end

subgraph group_analysis["Velocity analysis"]
  node_geovel["Velocity integration<br/>[derive_geovel.py]"]
end

subgraph group_visuals["Visualization"]
  node_profiles["CTD profile plots<br/>[ctd_profiles.py]"]
  node_localization["Station localization<br/>[map_coords.py]"]
  node_velocityplots["Velocity profile plots"]
  node_hodograph["Hodograph plots<br/>[hodograph.py]"]
  node_plotutils["Plot layout utilities<br/>[utils.py]"]
end

node_user(("Oceanographer"))

node_user -->|"configures and views"| node_window
node_controller -->|"sets up"| node_window
node_controller -->|"loads UI assets"| node_resources
node_window -->|"provides input"| node_controller
node_controller -->|"dispatches processing"| node_dataio
node_dataio -.->|"writes processed data"| node_ctdstore
node_controller -->|"dispatches calculation"| node_geovel
node_geovel -->|"updates velocities"| node_ctdstore
node_controller -->|"requests plots"| node_profiles
node_controller -->|"requests plots"| node_localization
node_controller -->|"requests plots"| node_velocityplots
node_controller -->|"requests plots"| node_hodograph
node_profiles -->|"reads profiles"| node_ctdstore
node_localization -->|"reads coordinates"| node_ctdstore
node_velocityplots -->|"reads velocities"| node_ctdstore
node_hodograph -->|"reads velocities"| node_ctdstore
node_profiles -->|"formats plot"| node_plotutils
node_localization -->|"formats plot"| node_plotutils
node_velocityplots -->|"formats plot"| node_plotutils
node_hodograph -->|"formats plot"| node_plotutils

click node_controller "https://github.com/natrist-0/geovel/blob/main/01_code/code/main.py"
click node_window "https://github.com/natrist-0/geovel/blob/main/01_code/code/ui_mainwindow.py"
click node_resources "https://github.com/natrist-0/geovel/blob/main/01_code/code/ui_resources.py"
click node_dataio "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/data_io.py"
click node_geovel "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/derive_geovel.py"
click node_profiles "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/ctd_profiles.py"
click node_localization "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/map_coords.py"
click node_velocityplots "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/velocity_profiles.py"
click node_hodograph "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/hodograph.py"
click node_plotutils "https://github.com/natrist-0/geovel/blob/main/01_code/code/core/utils.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_controller,node_window,node_resources toneBlue
class node_dataio,node_ctdstore toneAmber
class node_geovel toneMint
class node_profiles,node_localization,node_velocityplots,node_hodograph,node_plotutils toneRose
class node_user toneIndigo
```

## Components

### Desktop interface

- [Application controller](https://github.com/natrist-0/geovel/blob/main/01_code/code/main.py): `01_code/code/main.py`
- [Main window UI](https://github.com/natrist-0/geovel/blob/main/01_code/code/ui_mainwindow.py): `01_code/code/ui_mainwindow.py`
- [UI resources](https://github.com/natrist-0/geovel/blob/main/01_code/code/ui_resources.py): `01_code/code/ui_resources.py`

### CTD processing

- [CTD import and gradients](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/data_io.py): `01_code/code/core/data_io.py`
- **Combined CTD data**

### Velocity analysis

- [Velocity integration](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/derive_geovel.py): `01_code/code/core/derive_geovel.py`

### Visualization

- [CTD profile plots](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/ctd_profiles.py): `01_code/code/core/ctd_profiles.py`
- [Station localization](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/map_coords.py): `01_code/code/core/map_coords.py`
- [Velocity profile plots](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/velocity_profiles.py): `01_code/code/core/velocity_profiles.py`
- [Hodograph plots](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/hodograph.py): `01_code/code/core/hodograph.py`
- [Plot layout utilities](https://github.com/natrist-0/geovel/blob/main/01_code/code/core/utils.py): `01_code/code/core/utils.py`

### Other components

- **Oceanographer**

## Connections

- Oceanographer → Main window UI: configures and views (evidence: `README.md`)
- Application controller → Main window UI: sets up (evidence: `01_code/code/main.py`)
- Application controller → UI resources: loads UI assets (evidence: `01_code/code/main.py`)
- Main window UI → Application controller: provides input (evidence: `01_code/code/main.py`)
- Application controller → CTD import and gradients: dispatches processing (evidence: `01_code/code/main.py`)
- CTD import and gradients → Combined CTD data: writes processed data
- Application controller → Velocity integration: dispatches calculation (evidence: `01_code/code/main.py`)
- Velocity integration → Combined CTD data: updates velocities (evidence: `01_code/code/core/derive_geovel.py`)
- Application controller → CTD profile plots: requests plots (evidence: `01_code/code/main.py`)
- Application controller → Station localization: requests plots (evidence: `01_code/code/main.py`)
- Application controller → Velocity profile plots: requests plots (evidence: `01_code/code/main.py`)
- Application controller → Hodograph plots: requests plots (evidence: `01_code/code/main.py`)
- CTD profile plots → Combined CTD data: reads profiles (evidence: `01_code/code/core/ctd_profiles.py`)
- Station localization → Combined CTD data: reads coordinates (evidence: `01_code/code/core/map_coords.py`)
- Velocity profile plots → Combined CTD data: reads velocities (evidence: `01_code/code/core/velocity_profiles.py`)
- Hodograph plots → Combined CTD data: reads velocities (evidence: `01_code/code/core/hodograph.py`)
- CTD profile plots → Plot layout utilities: formats plot (evidence: `01_code/code/core/ctd_profiles.py`)
- Station localization → Plot layout utilities: formats plot (evidence: `01_code/code/core/map_coords.py`)
- Velocity profile plots → Plot layout utilities: formats plot (evidence: `01_code/code/core/velocity_profiles.py`)
- Hodograph plots → Plot layout utilities: formats plot (evidence: `01_code/code/core/hodograph.py`)
