Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions mno_data_source_simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ Edit `config.yml` for local/standalone use, or set environment variables for Doc
```yaml
data_source:
netcdf_file: "/app/example_data/openMRG_cmls_20150827_3months.nc"
loop_duration_seconds: 3600 # Lookback window for real-time replay
# Set to the full dataset duration so the simulator only loops after all
# source data is exhausted (openMRG_cmls_20150827_3months.nc ≈ 92 days).
loop_duration_seconds: 7948860

generator:
generation_frequency_seconds: 10 # How often to generate files
Expand All @@ -61,7 +63,26 @@ sftp:
| Variable | Description |
|---|---|
| `NETCDF_FILE` | Path to the NetCDF source file |
| `NETCDF_FILE_URL` | URL to download the file if not already present |
| `NETCDF_FILE_URL` | URL to download the file automatically if not already present |

### NetCDF dataset auto-download

The simulator downloads the 3-month source file automatically on startup if the
path set in `NETCDF_FILE` does not exist **and** `NETCDF_FILE_URL` is set.

**Docker (`docker-compose up mno_simulator`):** `NETCDF_FILE_URL` is already
configured in `docker-compose.yml`, so the file is downloaded automatically —
no extra steps needed.

**Standalone:** export the URL before starting the simulator:

```bash
export NETCDF_FILE_URL=https://bwsyncandshare.kit.edu/s/jSAFftGXcJjQbSJ/download
python main.py
```

The file (~193 MB) is saved to the path given by `NETCDF_FILE` (or
`data_source.netcdf_file` in `config.yml`) and is only downloaded once.

### Authentication

Expand Down
6 changes: 4 additions & 2 deletions mno_data_source_simulator/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ data_source:
# downloaded automatically at startup if NETCDF_FILE_URL is set.
# Override via the NETCDF_FILE environment variable.
netcdf_file: "/app/example_data/openMRG_cmls_20150827_3months.nc"
# Loop duration in seconds (1 hour = 3600 seconds)
loop_duration_seconds: 3600
# Loop duration in seconds — set to the full 3-month dataset duration so the
# simulator only restarts after exhausting all source data.
# (openMRG_cmls_20150827_3months.nc: 7 948 860 s ≈ 92 days)
loop_duration_seconds: 7948860

# SFTP upload configuration
sftp:
Expand Down
Loading