Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Archive fdb #128

Merged
merged 4 commits into from
Apr 11, 2024
Merged

Archive fdb #128

merged 4 commits into from
Apr 11, 2024

Conversation

cfkanesan
Copy link
Collaborator

Purpose

Add function that archives a field to FDB

Code Changes

  • Add mch_model_data.archive_to_fdb

Copy link
Collaborator

@ninaburg ninaburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Adding more logging would be beneficial.

@@ -1,10 +1,12 @@
"""Get Meteoswiss model data from FDB or polytope."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update module documentation string

Suggested change
"""Get Meteoswiss model data from FDB or polytope."""
"""Module for retrieving Meteoswiss model data from FDB or Polytope, and archiving the data to FDB storage"""

handle = io.BufferedWriter(buffer.raw)
grib_decoder.save(field, handle, bits_per_value)
fdb = pyfdb.FDB()
req = request.to_fdb() if request is not None else None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
req = request.to_fdb() if request is not None else None
req = request.to_fdb() if request is not None else None
logger.info("Archiving request %s to FDB", request)

@cfkanesan cfkanesan merged commit 8a9c703 into main Apr 11, 2024
2 checks passed
@cfkanesan cfkanesan deleted the archive-fdb branch April 11, 2024 07:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants