Skip to content

Feat: Integration CMIP7 Repacking Tool #273

Description

@pgierz

In the process of generating compliant CMIP7 data from AWI-ESM3, @JanStreffing has been in contact with colleagues at DKRZ for the eventual data submission.

In this context, it has been suggested that we apply the "repacking tool" as a pipeline step.

To be clarified and documented in this issue:

  • Link to code of repacking tool
  • Discuss approach: a) possibility of calling repacker directly from Python, b) via subprocess

The two ideas are shown below:

from pycmor.core import Rule
from cmip7repacker import Repacker
from typing import Any

def repack_for_cmip(data, rule: Rule) -> Any:
    repacker = Repacker(...)  # This is a total guess. I have no idea
    repacker_kwargs = rule.get("repacker_kwargs", {})
    return repacker.repack(data, **repacker_kwargs)

Or alternatively:

import subprocess

def repack_for_cmip(data, rule: Rule) -> Any:
    repacker = rule.get("repacker")  # Path to binary
    repacker_kwargs = rule.get("repacker_kwargs", {})
    return subprocess.run(...)  # Not ideal: probably needs Disk Input and Disk Output. 

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions