Skip to content

Move asdate to CFTime and use timedecode in CommonDataModel #46

@felixcremer

Description

@felixcremer

It seems that the asdate function here is conceptually doing the same as CFTime.decode with a slightly different interface.
Would it make sense to streamline this and move all date handling to CFTime?

This is coming from my struggle with opening a Zarr dataset with nanosecond units in CommonDataModel.

using Rasters
using Zarr
using ZarrDatasets
using Dates
using Downloads
using Mmap

testdatapath = Downloads.download("https://github.com/user-attachments/files/25968262/testdata.zip")
zstore = Zarr.ZipStore(Mmap.mmap(testdatapath))
z = zopen(zstore)
zdata = ZarrDataset(zstore)
 azimuth_time = CDM.cfvariable(zdata, :azimuth_time, prefer_datetime=false)
# This is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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