Skip to content

feat: inputs and outputs on S3-compatible object storage and web servers (#11) - #29

Merged
Tristanovsk merged 1 commit into
feature/v3.xfrom
feature/s3-io
Nov 13, 2026
Merged

Tristanovsk merged 1 commit into
feature/v3.xfrom
feature/s3-io

Conversation

@Tristanovsk

@Tristanovsk Tristanovsk commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

First part of #11: inputs and outputs of the processing on S3-compatible object storage and web servers (fsspec URLs: s3://, https://...).

export AWS_PROFILE=my-profile AWS_ENDPOINT_URL=https://s3.example.org
grs s3://bucket/l1c/S2B_MSIL1C_..._.SAFE --cams_file s3://bucket/cams/cams_forecast_2022-07-14.nc \
    --odir s3://bucket/l2a --resolution 20

What accepts URLs

how
Level-1 product read in place by GRSdriver; needs its remote reading (GRSdriver.remote, not released yet), otherwise a clear GRS_IO_Exception (exit status 2)
CAMS, DEM, SURFWATER copied once into a local cache (GRS_CACHE_DIR, default: user cache folder)
output (--odir, Zarr) written directly to the bucket (already in 3.1), now also the no-water marker; log files written locally (--log_dir) and copied next to the product at the end
configuration (GRS_CONFIG) https:// (e.g. raw file on a Git server) or s3://

Available in Process.execute (new storage_options argument), the grs command and exe/launcher.py (input_file, cams_folder with the daily/monthly search, surfwater_file, output_dir). Credentials and endpoint: AWS environment (AWS_PROFILE, AWS_ENDPOINT_URL...) or storage_options.

Changes

  • new module grs.remote (URL helpers on fsspec), in the API reference;
  • grs/config.py: GRS_CONFIG URL; grs/grs_process.py: remote Level-1 / CAMS / DEM / SURFWATER, remote no-water marker; grs/run.py, exe/launcher.py: URLs kept as strings (not Path, which turns s3:// into s3:/), existence checks and cloud cover (MTD_MSIL1C.xml) read through fsspec, --no_clobber on the bucket, grs --log_dir;
  • optional dependencies: pip install GRSprocessor[remote] (s3fs);
  • grs: error.log now written next to log_file.log in the output folder (was the current folder);
  • README section, CHANGELOG.

Tests

grs/tests/unit/test_remote.py (16 tests) on the in-memory file system of fsspec (memory://, same code path as s3://, no network nor credentials): helpers, configuration from a URL, cloud cover, no-water marker, grs command and launcher with URL inputs and output, --no_clobber, and a full processing of the Camargue subset with the CAMS file and the output in the bucket (skipped without LUTs). 524 unit tests pass locally.

Not tested yet on a real S3 / CNES storage.

Still to do for #11

  • CWL: pass the S3 paths directly (no download step) and use the 3.x Docker image.

…ers (#11): URLs for the Level-1 product, CAMS, DEM, SURFWATER, output and GRS_CONFIG (grs.remote, storage_options, grs --log_dir)
@Tristanovsk
Tristanovsk merged commit 17592f7 into feature/v3.x Nov 13, 2026
6 checks passed
@Tristanovsk
Tristanovsk deleted the feature/s3-io branch November 13, 2026 15:15
Tristanovsk added a commit that referenced this pull request Nov 16, 2026
… fixed for Sentinel-2 (reference band, 0d76249) and Landsat (divided twice by sunglint_eps, edb2eaa), diffuse light interpolated in AOT, opt-in hybrid AOT under sunglint, log-log LUT interpolation in wavelength, stop when no clear-sky water is left; brings feature/v3.x (S3 inputs/outputs #29, exit codes #28) and the AERONET-OC match-up validation tooling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant