Skip to content

Index Error in create-diaz-pyCIAM-inputs.ipynb #5

@treypallace

Description

@treypallace
# correct greenland
out["vsl"] = out.vsl.where(
    ~ds_in.subsets.sel(subset="greenland", drop=True),
    (
        ds_in.vsl_ypc_mult
        * ds_in.ypc.sel(country="USA", drop=True)
        * (
            out.ypc.isel(seg=ds_in.subsets.sel(subset="greenland", drop=True))
            / ds_in.ypc.sel(country="USA", drop=True)
        )
        ** ds_in.vsl_inc_elast
    ).reindex(seg=out.seg),
)

This particular line out.ypc.isel(seg=ds_in.subsets.sel(subset="greenland", drop=True)) results in:

IndexError: dimension coordinate 'seg' conflicts between indexed and indexing objects:
array(['Albania489', 'Albania489', 'Albania489', ..., 'Albania489',
'Albania489', 'Albania489'], dtype='
array(['Albania489', 'Albania490', 'Albania491', ..., 'Yemen9422', 'Yemen9423',
'Yugoslavia488'], dtype='

I am looking for suggestions on how to resolve this. I was able to successfully download the required data using the data-acquisition.ipynb and also ran collapse-sliiders-to-seg.ipynb with no issues.

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