Skip to content

Compress and ingest background files via R2D2 - #853

Open
ftgoktas wants to merge 105 commits into
developfrom
feature/r2d2-file-compression
Open

Compress and ingest background files via R2D2#853
ftgoktas wants to merge 105 commits into
developfrom
feature/r2d2-file-compression

Conversation

@ftgoktas

@ftgoktas ftgoktas commented Jul 31, 2026

Copy link
Copy Markdown
Member

#790 already handles forecast compression for marine, so this PR just picks add ingest suite the feature to compress background files on the way in, and decompress them on the way back out, so we're not using too much disk space on backgrounds.

SaveBackground now takes compress_output/compress_algorithm (gzip or pigz)/compress_pigz_threads. When it's on, the file gets staged locally, compressed, stored, and cleaned up.

GetBackground knows to look for the compressed record and decompress it back. It's off by default, so nothing changes unless you opt in.

Testing:
swell create ingest_background_cf

Find a 09Z NRT file to test against first:
ls /css/gmao/geos-cf/NRTv2/priv/ana/Y<year>/M<month>/D<day>/ | grep _0900z

Edit experiment.yaml with that date as start_cycle_point/final_cycle_point, and set compress_output: true.
Leave dry_run at its default (true) for the first pass:

Then run: swell launch <path>
Check the logs, it should log [DRY RUN] Would store for all 24 hourly steps...

Once that looks right, set dry_run: false, and re-launch, and confirm that it stores background files.

@ftgoktas ftgoktas changed the title Fetch and store compressed files via R2D2 Compress and ingest background files via R2D2 Aug 21, 2026
@ftgoktas
ftgoktas marked this pull request as ready for review August 21, 2026 22:38
@ftgoktas
ftgoktas requested a review from Dooruk August 21, 2026 22:38
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.

2 participants