Skip to content

Datasets for developing #6

@malmans2

Description

@malmans2

Maybe we should start with adding a module to generate small and simple xarray Datasets with all the input variables we need to get started (e.g., the equivalent of NEMO coordinates/bathymetry files).

Say we are developing/testing/benchmarking a new function, we can just do something like:

from pydomcfg.datasets import flat_bathy_ds

def create_domain_cfg(ds: Dataset, ...):
    ...
    return domain_cfg_ds

create_domain_cfg(flat_bathy_ds)

The real case scenario would become something like:

import pydomcfg
import xarray as xr

ds = xr.open_dataset("bathymetry_orca1.nc")
domain_cfg_ds = pydomcfg.create_domain_cfg(ds)
domain_cfg_ds.to_netcdf("domain_cfg_orca1.nc")

This way everything we need to develop is self-contained and we don't have to use/share files with data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    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