Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behavior for datasets with one epoch value #268

Open
bourque opened this issue Jun 13, 2024 · 0 comments
Open

Odd behavior for datasets with one epoch value #268

bourque opened this issue Jun 13, 2024 · 0 comments

Comments

@bourque
Copy link

bourque commented Jun 13, 2024

For dataset that have only one epoch value in it, loading the CDF via the cdf_to_xarray results in some unexpected behavior -- The epoch coordinates do not appear to be properly set in the resulting xarray dataset. The function throws a warning of ISTP Compliance Warning: epoch is listed as the DEPEND_0 for variable <variable_name, but the dimensions do not match., and the coordinates of the dataset will be listed as record0instead ofepoch`.

Having more than one epoch value appears to help avoid this issue, for example:

epoch = xr.DataArray(
    [time, time + np.timedelta64(1, "s")],
    name="epoch",
    dims=["epoch"],
    attrs=cdf_attrs.get_variable_attributes("epoch_attrs"),
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

No branches or pull requests

1 participant