Skip to content

Issue opening dataset with new xgcm version (0.9.0) #77

@CaiqueDiasLuko

Description

@CaiqueDiasLuko

Hi, I have been using xroms smoothly for a while. However, I updated my xarray package, and now I cannot open my datasets anymore.

For the following piece of code, I am getting the following error:

import xgcm
from xgcm import Grid
import xarray as xr
import xroms

path = '/Volumes/Seagate Portable Drive/txla_model/2022/ocean_his_parent_02.nc'

def open_roms(path):
    ds1 = xroms.open_netcdf(path)
    ds1, grid1 = xroms.roms_dataset(ds1)
    return ds1, grid1

ds1, grid1 = open_roms(path)

ValueError: Autoparsed Grid kwargs: 'coords' conflict with user-supplied kwargs. Run with 'auto parse_metadata=False', or autoparse and amend kwargs before calling Grid constructer.

I noticed that the xgcm package was updated a day ago (v0.9.0) and I tried downgrading it to solve the issue (to v0.8.1). Now I am able to open the file but I got a new error when trying to compute relative vorticity:

zeta = xroms.relative_vorticity(ds1.u,ds1.v,grid1)

NotImplementedError: Cannot chunk along a core dimension for a grid ufunc which has a signature which includes one of the axis positions ['inner', 'outer'].Consider rechunking to a single chunk along this dimension if possible.

I didn't use to get this error before trying to update my xarray package.

Has anyone ever had similar problems?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions