Skip to content

Coordinate Mismatches (Yellowstone) #228

@kkappler

Description

@kkappler

When merging data from local and remote station, underlying coordinates seem to differ slightly in the case of Stations WYYS3 and MTC20. The error was in xarray_helpers.py, specifically when merging the reference station data into the local station.

Previously:

merged_xr = X.merge(Y, join="exact")
merged_xr = merged_xr.merge(RR, join="exact")

Now:

merged_xr = X.merge(Y, join="exact")
    try:
        merged_xr = merged_xr.merge(RR, join="exact")
    except ValueError:
        print("Coordinate alignment mismatch")
        merged_xr = merged_xr.merge(RR, join="left")
        for ch in list(RR.keys()):
            merged_xr[ch].values = RR[ch].values

I could not detect the difference in the coordinates, but something must have been different. The error that was being thrown was occurring :

ValueError: cannot align objects with join='exact' where index/labels/sizes are not equal along these coordinates (dimensions): 'observation' ('observation',), 'frequency' ('observation',), 'time' ('observation',)

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