Skip to content

Unexpected spatial referencing in resample_in_space #1163

@konstntokas

Description

@konstntokas

Describe the bug
When calling resample_in_space(ds, source_gm, target_gm, gm_name="crs", encode_cf=True) and the CRS of source_gm and target_gm are not the same, then rectify_dataset removes the CRS information.

When calling resample_in_space(ds, source_gm, target_gm, encode_cf=True) and the CRS of source_gm and target_gm are the same and the source ds has the spatial referencing in the coords with the name spatial_ref, the returned dataset has the spatial referencing stored in spatial_ref in coords and in crs as data variable.

Expected behavior
For simplicity and accordance with #1013, the spatial referencing information shall be stored in spatial_ref in coords in any case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions