A Flask web application for uploading and analyzing NetCDF3 and NetCDF4 files.
Report Bug
·
Request Feature
Table of Contents
NetCDF Explorer (netex) is a web application that allows users to upload and analyze NetCDF3 and NetCDF4 files. It provides a simple interface for viewing file metadata and structure using xarray's HTML representation.
Key features:
- Upload and view NetCDF file summaries including dimensions, coordinates, and variables
NetCDF Explorer uses xarray to read uploaded files. Since files are streamed from MinIO into memory, xarray selects a backend engine that supports reading from in-memory buffers. The engine is chosen automatically at runtime based on the file format:
| File Format | Engine | Notes |
|---|---|---|
| NetCDF3 (classic) | scipy |
Handles classic and 64-bit offset NetCDF formats |
| NetCDF4 / HDF5 | h5netcdf |
Reads HDF5-based NetCDF4 files via h5py |
To get a local copy up and running, follow these steps.
- Docker and Docker Compose (for containerized deployment)
- uv (for standalone development)
- Node.js (for Tailwind CSS compilation)
-
Clone the repo
git clone https://github.com/mversaggi/netcdf-explorer.git cd netcdf-explorer -
Start the application with Docker Compose
docker compose up
-
Access the application at http://localhost:5000
-
Clone the repo
git clone https://github.com/mversaggi/netcdf-explorer.git cd netcdf-explorer -
Install Python 3.13 with uv
uv python install 3.13
-
Install dependencies
uv sync
-
Build Tailwind CSS
npm install tailwindcss @tailwindcss/cli npx @tailwindcss/cli -i ./static/src/input.css -o ./static/dist/output.css
-
Run the application
uv run flask --app "src/netex/app:create_app" run
- Navigate to the home page
- Select a NetCDF file using the file input
- Click "Explore" to upload the file
- View the file summary showing dimensions, coordinates, variables, and attributes
Configuration is loaded from a TOML file with environment variable overrides. The config file path is specified by the NETEX_CONFIG environment variable.
| Variable | Description | Default |
|---|---|---|
NETEX_CONFIG |
Path to TOML config file | Required |
FLASK_DEBUG |
Enable Flask debug mode | false |
FLASK_SECRET_KEY |
Flask session secret key | Required |
OBJECT_STORAGE_ENDPOINT |
MinIO server endpoint | Required |
OBJECT_STORAGE_ACCESS_KEY |
MinIO access key | Required |
OBJECT_STORAGE_SECRET_KEY |
MinIO secret key | Required |
OBJECT_STORAGE_SECURE |
Use HTTPS for MinIO | false |
LOGGER_LEVEL |
Logging level (DEBUG, INFO, etc.) | INFO |
[flask]
debug = true
secret_key = "your_secret_key"
[object_storage]
endpoint = "localhost:9000"
access_key = "minioadmin"
secret_key = "minioadmin"
secure = false
[logger]
level = "info"This project uses pytest for testing.
# Run all tests
uv run pytest
# Run unit tests only
uv run pytest tests/unit/
# Run integration tests only (requires Docker for MinIO container)
uv run pytest tests/integration/
# Run with coverage
uv run pytest --cov=src --cov-report=html:tests/reports# Format Python code
uv run black src/ tests/
# Format Jinja2 templates
uv run djlint templates/ --reformat- File upload and storage in MinIO
- Organized summary view of file
- Variable visualization on globe
- View saved files
See the open issues for a full list of proposed features and known issues.
Project Link: https://github.com/mversaggi/netcdf-explorer
- xarray - N-D labeled arrays and datasets in Python
- Best-README-Template - README template