Skip to content

"Input array is not C_CONTIGUOUS" warning despite c-contiguous input #329

Open
@tyfolino

Description

@tyfolino

Hi!

I'm using xESMF in my Python package to take care of regridding. A certain input dataset constantly raises UserWarning: Input array is not C_CONTIGUOUS. Will affect performance.. The dataset in question can be found in this Zenodo repository under kernels/HadGEM3-GA7.1/TOA_HadGEM-GA7.1_Kerns.nc. A word of caution: they are quite large files.

What is confusing me, however, is that when I check the C_CONTIGUOUS flag of each variable, I get back True:

> False in [np.array(v).flags['C_CONTIGUOUS'] for v in ds_in_question.variables]

False

> False in [np.array(v).flags['C_CONTIGUOUS'] for v in ds_in_question.coords]

False

I have even tried casting to C-order using Xarray's .astype() function without success.

I'd love to get some insight into this issue so I don't have to arbitrarily suppress these warnings when using my package.

Thank you!

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