oceandl is a lightweight C++ CLI for downloading ocean/climate NetCDF datasets from NOAA PSL. The project is still in alpha: the current focus is safe download flow, practical resume behavior, and a codebase that stays simple to extend.
- Native C++ CLI with a
CMakebuild - Dataset registry separated from provider implementation
- Simple provider abstraction, currently with one built-in provider: NOAA PSL
per_yearandsingle_filedataset downloads- Default dataset
oisst - Platform-aware default output root (
~/data/oceandlon Linux,%LOCALAPPDATA%\\oceandl\\dataon Windows) oceandl --version,providers,datasets,info, anddownloadoceandl --helpand<command> --help- Alpha
oceandl cm ...wrapper commands for the official Copernicus Marine Toolbox - Resume from
.partfiles when the server supportsRange - Safe fallback to a full re-download when resume is unavailable
- Skip valid final files
- Lightweight validation based on file size and NetCDF/HDF5 signatures
- Simple TOML config with strict type validation
--verboseand--quietmodeshelp,datasets,providers, andinfostill work even when the local config is broken- Safe retry policy with bounded exponential backoff
Built-in datasets:
oisst- NOAA OISST Daily SST Meanoisst_icec_day_mean- NOAA OISST Daily Sea Ice Concentrationoisst_sst_day_anom- NOAA OISST Daily SST Anomalyoisst_sst_day_err- NOAA OISST Daily SST Erroroisst_icec_day_mean_ltm_1991_2020- NOAA OISST Daily Ice Concentration LTM 1991-2020oisst_icec_mon_ltm_1991_2020- NOAA OISST Monthly Ice Concentration LTM 1991-2020oisst_icec_mon_mean- NOAA OISST Monthly Ice Concentrationoisst_icec_week_mean- NOAA OISST Weekly Ice Concentrationoisst_lsmask- NOAA OISST Land-Sea Maskoisst_sst_day_mean_ltm_1971_2000- NOAA OISST Daily SST LTM 1971-2000oisst_sst_day_mean_ltm_1982_2010- NOAA OISST Daily SST LTM 1982-2010oisst_sst_day_mean_ltm_1991_2020- NOAA OISST Daily SST LTM 1991-2020oisst_sst_day_mean_ltm- NOAA OISST Daily SST LTMoisst_sst_mon_ltm_1991_2020- NOAA OISST Monthly SST LTM 1991-2020oisst_sst_mon_mean- NOAA OISST Monthly SSToisst_sst_week_mean- NOAA OISST Weekly SSTgpcp- GPCP Monthly Precipitationair- NCEP Reanalysis Air Temperaturemslp- NCEP Reanalysis Mean Sea Level Pressureuwnd_surface- NCEP Reanalysis Surface Zonal Windvwnd_surface- NCEP Reanalysis Surface Meridional Windrhum_surface- NCEP Reanalysis Surface Relative Humiditypr_wtr- NCEP Reanalysis Precipitable Waterhgt_pressure- NCEP Reanalysis 2 Geopotential Heightomega_pressure- NCEP Reanalysis 2 Vertical Velocity
For Arch users, this is the default install path.
Install with an AUR helper:
yay -S oceandlOr install manually from the AUR package repo:
git clone https://aur.archlinux.org/oceandl.git
cd oceandl
makepkg -siIf your goal is simply to use the tool, you can stop there. You do not need to build oceandl manually from source first.
Windows support target for end users is currently:
x64- portable zip archive with a self-contained
oceandl.exe - manual download from GitHub Releases
- not Winget yet
Download oceandl-windows-x64.zip from the latest GitHub Release, then extract it somewhere stable such as:
%LOCALAPPDATA%\Programs\oceandl
This is a CLI program. Do not expect a useful result from double-clicking oceandl.exe in Explorer.
Open PowerShell or Windows Terminal in the extracted folder and run it from there.
Run it like this:
.\oceandl-windows-x64\bin\oceandl.exe --help
.\oceandl-windows-x64\bin\oceandl.exe datasetsOptional: add the extracted bin\ directory to PATH, then you can run:
oceandl.exe --help
oceandl.exe download --helpIf your goal is simply to use the tool, you do not need Visual Studio, CMake, or a manual source build.
Typical first commands after install:
oceandl --help
oceandl datasets
oceandl info oisst
oceandl download oisst --start-year 2024 --end-year 2024That will typically create output under:
~/data/oceandl/
On Windows, the equivalent default data root is:
%LOCALAPPDATA%\oceandl\data
Examples below assume oceandl or oceandl.exe is already on your PATH.
On Windows portable releases, either run bin\\oceandl.exe directly or add bin\\ to PATH.
If you are running from the build tree instead, replace oceandl with ./build/oceandl on Linux or .\build\Release\oceandl.exe on Windows.
| Command | Function | Use when |
|---|---|---|
oceandl --help |
Show general CLI help | You want the top-level command list and global flags |
oceandl --version |
Print the current binary version | You want to confirm the installed version |
oceandl providers |
List available data providers | You want to know which backend serves the datasets |
oceandl datasets |
List the built-in dataset catalog | You want available dataset IDs before downloading |
oceandl info <dataset> |
Show detailed metadata for one dataset | You want mode, file naming, base URL, and year support |
oceandl download [dataset] |
Download one dataset | You want to fetch files using config defaults plus CLI overrides |
oceandl cm <command> |
Use the Copernicus Marine Toolbox wrapper | You want Copernicus Marine data through the official toolbox CLI |
oceandl help <command> |
Show help for one command | You want command-specific syntax and options |
These flags must appear before the command name:
| Flag | Function |
|---|---|
--config PATH |
Load a specific config.toml instead of the default path |
--verbose |
Print more progress and process detail |
--quiet |
Hide non-critical output |
--help, -h |
Show top-level help |
Examples:
oceandl --help
oceandl --version
oceandl --config ./config.toml datasets
oceandl --verbose download oisst --start-year 2024 --end-year 2024Inspect what the tool knows about providers and datasets:
oceandl providers
oceandl datasets
oceandl info oisst
oceandl info gpcpDownload a per-year dataset:
oceandl download oisst --start-year 2024 --end-year 2025
oceandl download oisst_sst_day_anom --start-year 2024 --end-year 2024Download a single-file dataset:
oceandl download oisst_lsmask
oceandl download oisst_sst_mon_mean
oceandl download gpcp
oceandl download airUse the default dataset from config instead of naming one on the command line:
oceandl download --start-year 2024 --end-year 2025Send output to a specific directory:
oceandl download oisst --start-year 2024 --end-year 2025 --output-dir ./dataAsk the tool for command-specific help:
oceandl help download
oceandl help info
oceandl help cmoceandl cm is an alpha, unofficial wrapper around the official Copernicus Marine Toolbox command, copernicusmarine. NOAA PSL native downloads remain separate under oceandl download.
You still need a Copernicus Marine account. Credentials are handled by the official copernicusmarine login command and its own files; oceandl does not store Copernicus usernames or passwords in its config.
Recommended simple flow:
oceandl cm setup
oceandl cm login
oceandl cm subset --helpoceandl cm setup looks for an existing copernicusmarine command on PATH and saves it to the OceanDL config. If the toolbox is installed somewhere else, point OceanDL at it:
oceandl cm setup --executable /path/to/copernicusmarine
oceandl cm doctorAdvanced users who already keep the toolbox in a named environment can save a runner instead:
oceandl cm setup --runner micromamba --env copernicusmarine
oceandl cm setup --runner conda --env copernicusmarineForwarded commands:
oceandl cm login
oceandl cm describe --help
oceandl cm get --help
oceandl cm subset --helpSubset example:
oceandl cm subset \
--dataset-id cmems_mod_glo_phy_my_0.083deg_P1D-m \
--variable so \
--variable thetao \
--variable uo \
--variable vo \
--start-datetime 2025-01-01T00:00:00 \
--end-datetime 2025-12-31T00:00:00 \
--minimum-longitude 132.43732068838182 \
--maximum-longitude 137.00306480805972 \
--minimum-latitude -10.641552392478912 \
--maximum-latitude -7.57981810045961 \
--minimum-depth 0.49402499198913574 \
--maximum-depth 222.47520446777344OceanDL does not reimplement Copernicus Marine APIs. It resolves the toolbox command, then forwards login, describe, get, and subset arguments to the official CLI.
Command form:
oceandl download [dataset] [options]Dataset selection:
- Prefer the positional dataset argument:
oceandl download oisst ... - The legacy alias
--dataset IDis still supported:oceandl download --dataset oisst ... - If you omit the dataset entirely,
oceandlusesdefault_datasetfrom the config file
Dataset mode rules:
- Per-year datasets such as
oisstrequire both--start-yearand--end-year - Single-file datasets such as
gpcp,air, andmslpdo not accept year flags
Important download options:
| Option | Function | Notes |
|---|---|---|
--start-year YEAR |
Start year for a per-year dataset | Must be used together with --end-year |
--end-year YEAR |
End year for a per-year dataset | Must be used together with --start-year |
--output-dir PATH |
Override the output root for this run | Default comes from config |
--overwrite |
Re-download a file even if the final file is already valid | Use when you want to replace an existing final file |
--no-overwrite |
Force overwrite off for this run | Overrides config |
--resume |
Allow resume from .part files |
Enabled by default |
--no-resume |
Disable partial resume and start clean | Useful for debugging or when you do not trust partial state |
--timeout SECONDS |
Set HTTP stall timeout for downloads | Must be finite and greater than zero |
--chunk-size BYTES |
Set the requested libcurl receive buffer size |
Minimum 1024; default 1048576 |
--retries N |
Retry transient failures | Allowed range 0..10 |
--help, -h |
Show help for download |
Does not start a download |
Examples:
oceandl download oisst --start-year 2020 --end-year 2022
oceandl download oisst_icec_day_mean --start-year 2024 --end-year 2024
oceandl download oisst --start-year 2024 --end-year 2025 --overwrite
oceandl download oisst --start-year 2024 --end-year 2025 --no-resume
oceandl download oisst --start-year 2020 --end-year 2022 --timeout 90 --chunk-size 1048576 --retries 5
oceandl --quiet download oisst_sst_week_mean
oceandl --quiet download gpcpchunk_size is used as the requested receive buffer size passed to libcurl.
retry_count is bounded to 0..10 to keep retries predictable and avoid pathological retry loops.
Default locations:
Windows : %APPDATA%\oceandl\config.toml
Linux : ~/.config/oceandl/config.toml
Default data/output directory:
Windows : %LOCALAPPDATA%\oceandl\data
Linux : ~/data/oceandl
Example:
default_dataset = "oisst"
default_output_dir = "~/data/oceandl"
timeout = 60
chunk_size = 1048576
retry_count = 3
overwrite = false
resume = true
[provider_base_urls]
psl = "https://downloads.psl.noaa.gov"
[copernicusmarine]
runner = "system"
executable = "/absolute/path/to/copernicusmarine"All CLI flags still override the config file.
Notes:
- Built-in dataset URLs are composed from
provider_base_urls;dataset_base_urlsremains available for dataset-specific URL overrides. - Invalid config value types now fail fast instead of being silently ignored.
- Unknown config keys are ignored with a warning.
- URLs in
provider_base_urlsanddataset_base_urlsmust behttp://orhttps://. retry_countmust be an integer in the range0..10.- Copernicus Marine config stores only runner metadata such as
runner,env, orexecutable; credentials stay with the official toolbox.
- Downloads are only accepted when the final size is verifiable from
Content-LengthorContent-Range. - HTTP error responses (
4xx/5xx) are never persisted into.partfiles. .partfiles are removed after integrity/payload validation failures.- Resume only proceeds when remote identity checks (ETag or Last-Modified) are safe.
- A target-specific
.lockartifact is temporary. After a successful download, skip, or stale-lock recovery, it is removed automatically. - If a crash or forced interruption leaves a
.lockartifact behind, rerunoceandl. The tool will either recover the stale lock or report that another process still owns the target.
Could not resolve hostname: Check DNS/network connectivity or configure the network/proxy environment correctly.response did not provide a verifiable file size: The remote endpoint did not provideContent-Length/Content-Range; this is rejected for safety.retry_count must be between 0 and 10: Reduceretry_countin CLI flags orconfig.toml.target is already being used by another process: Anotheroceandlprocess is downloading the same target, or a stale lock still needs recovery; wait for the active process to finish and rerun the command.Nothing useful happens when I double-click oceandl.exe:oceandlis a terminal program, not a GUI app. Open PowerShell or Windows Terminal and run.\bin\oceandl.exe --helpfrom the extracted folder.Windows protected your PC: This is SmartScreen. Verify the file came from the expected GitHub Release, checkSHA256SUMS, then use the normal Windows trust flow if you want to run it.'oceandl' is not recognized as an internal or external command: Runoceandl.exefrom the extractedbin\directory directly, or add that directory toPATH.Copernicus Marine Toolbox was not found: Runoceandl cm setup, or configure an installed toolbox withoceandl cm setup --executable /path/to/copernicusmarine.
~/data/oceandl/
oisst/
sst.day.mean.2024.nc
gpcp/
precip.mon.mean.nc
air/
air.mon.mean.nc
| Maintained path | CI coverage today | Recommended path | Notes |
|---|---|---|---|
| Arch Linux / Arch-based distributions | configure, build, ctest, CLI smoke, strict warnings, hermetic localhost HTTP integration, AUR makepkg verification |
yay -S oceandl or the AUR package repo |
GitHub Actions runs these checks inside an Arch Linux container on a GitHub-hosted Linux runner because GitHub does not provide a managed Arch runner. |
Windows x64 portable release path |
configure, build, ctest, CLI smoke, portable release archive verification |
download oceandl-windows-x64.zip from GitHub Releases |
Current Windows target is manual-download portable x64 only. The maintained release path is a self-contained CLI executable without extra runtime DLL files next to oceandl.exe. Winget is intentionally not published yet. |
Other environments may still build from source, but they are not maintainer-gated support targets and should not be described as such in public docs or release notes.
The first official package-manager target is:
- Arch
makepkg/ AUR-compatible source package
Why this one first:
- Linux is the most thoroughly exercised platform in CI today.
- A single Arch source package is lower-maintenance than trying to support multiple package ecosystems at the same time.
- The package can build from a formal source release asset with a published SHA-256 checksum.
Authoritative files live in:
packaging/arch/oceandl/PKGBUILDpackaging/arch/oceandl/.SRCINFO
Current status:
- the package spec is maintained in this repository,
- the release workflow defines the formal source asset contract
oceandl-src-vX.Y.Z.tar.gz, - GitHub Releases currently publish
oceandl-linux-x64.tar.gz,oceandl-windows-x64.zip, the source archive, andSHA256SUMS, - the AUR package
oceandlis published from that maintained package spec.
Windows note:
- manual GitHub Release download is the intended Windows distribution path for now,
- Winget is deferred until the portable Windows release path has stayed stable across multiple releases.
If you only want to use oceandl, you can skip this section. This path is mainly for maintainers, local debugging, and packaging work.
Expected build dependencies:
- CMake
- C++20 compiler
libcurlfmttomlplusplus- Python 3 if you want the full hermetic localhost integration test on Linux
- for Windows source builds, a local
vcpkgcheckout plus the repovcpkg.jsonmanifest
Maintained bootstrap example (Arch Linux / Arch-based):
sudo pacman -Syu --needed \
base-devel \
cmake \
ninja \
curl \
fmt \
tomlplusplus \
pythonWindows source-build prerequisites:
- Visual Studio 2022 or Build Tools 2022 with MSVC
x64 - a local
vcpkgcheckout
Windows configure/build/test example:
$env:VCPKG_ROOT = "C:\src\vcpkg"
if (-not (Test-Path "$env:VCPKG_ROOT\vcpkg.exe")) {
& "$env:VCPKG_ROOT\bootstrap-vcpkg.bat" -disableMetrics
}
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake" `
-DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build --config Release --parallel
ctest --test-dir build --build-config Release --output-on-failureLinux build and test:
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
ctest --test-dir build --output-on-failureLinux install example:
cmake --install build --prefix /tmp/oceandl-installRun from the build tree:
./build/oceandl --help
./build/oceandl datasets
./build/oceandl info gpcp
./build/oceandl download gpcpWindows run-from-build-tree example:
.\build\Release\oceandl.exe --help
.\build\Release\oceandl.exe datasets
.\build\Release\oceandl.exe info gpcp
.\build\Release\oceandl.exe download gpcpcpp/src/cli.cppCLI entry point and runtime/config loading policy.cpp/src/downloader.cppHigh-level download orchestration.cpp/src/catalog.cppDataset registry and dataset URL composition from config/provider data.cpp/src/builtin_datasets.cppThe built-in dataset catalog shipped with the binary.cpp/src/providers/Provider abstraction and the NOAA PSL implementation.cpp/src/http_client.cpplibcurl-based HTTP transport.cpp/src/config.cppTOML config loader.cpp/src/copernicusmarine.cppCopernicus Marine Toolbox command resolution, setup, doctor, and passthrough wrapper.cpp/src/process_runner.cppCross-platform subprocess execution without shell command strings.cpp/src/validation.cppLightweight NetCDF validation.
- Public release posture remains alpha and source-first.
- Linux CI builds and tests the maintained Arch path inside an Arch Linux container on a GitHub-hosted Linux runner.
- Windows CI builds and tests the maintained Windows
x64path onwindows-latest. - Tagging
v*triggers the release workflow that builds the Linux and Windows release archives, smoke-tests the extracted artifacts, and uploads them to GitHub Releases. - The maintained Windows release path now targets a self-contained
oceandl.exe, not a release folder that depends on extra runtime DLL files next to the executable. - Produced artifacts currently include
oceandl-linux-x64.tar.gz,oceandl-windows-x64.zip, the formal source archiveoceandl-src-vX.Y.Z.tar.gz, and aSHA256SUMSfile for integrity verification. - Current recommendation:
- prefer AUR on Arch-based systems,
- prefer the Windows portable release zip on Windows,
- treat GitHub Release archives as convenience artifacts for the currently published Linux and Windows release paths,
- treat the in-repo Arch
makepkgpackage spec as the first official package-manager target, - do not treat the project as a stable binary-first or broad package-manager distribution yet.
- Winget is intentionally not published yet; the prerequisite is a stable Windows portable release path first.
- Detached release signatures are not published yet; SHA-256 checksums are the current baseline until maintainer-managed signing keys are in place.
Checksum verification examples:
sha256sum -c SHA256SUMS- Do not open public issues for suspected vulnerabilities.
- Report security findings privately to
febysyarief.dev@gmail.com. - See SECURITY.md for the reporting format and response targets.
- Add the new dataset metadata in
cpp/src/builtin_datasets.cpp. - Point
provider_keyto the relevant provider. - Choose
FileMode::PerYearorFileMode::SingleFile. - If the URL pattern still matches an existing provider, no CLI/downloader changes are needed.
- If the new source needs custom behavior, add a new provider in
cpp/src/providers/and register it incpp/src/providers/registry.cpp.
MIT.