Skip to content

Fix dataset copy in coastline alteration and update to v1.5.1#716

Merged
xylar merged 3 commits intoMPAS-Dev:masterfrom
xylar:fix-coastline-alteration
Apr 22, 2026
Merged

Fix dataset copy in coastline alteration and update to v1.5.1#716
xylar merged 3 commits intoMPAS-Dev:masterfrom
xylar:fix-coastline-alteration

Conversation

@xylar
Copy link
Copy Markdown
Collaborator

@xylar xylar commented Apr 22, 2026

Same bug as #714 in another place.

@xylar xylar added the bug label Apr 22, 2026
@xylar xylar self-assigned this Apr 22, 2026
@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Apr 22, 2026

Testing

In the Polaris e3sm/init/qu240km/topo/cull test, I was seeing:

  File "/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/move-critical-passages-and-blockages-to-framework/pixi-env/.pixi/envs/default/lib/python3.14/site-packages/mpas_tools/ocean/coastline_alteration.py", line 178, in add_land_locked_cells_to_mask
    dsMask = xarray.Dataset(dsMask)
  File "/autofs/nccs-svm1_home1/xylar/e3sm_work/polaris/move-critical-passages-and-blockages-to-framework/pixi-env/.pixi/envs/default/lib/python3.14/site-packages/xarray/core/dataset.py", line 389, in __init__
    raise TypeError(
    ...<2 lines>...
    )
TypeError: Passing a Dataset as `data_vars` to the Dataset constructor is not supported. Use `ds.copy()` to create a copy of a Dataset.

With this fix, I'm no longer seeing that error.

@xylar xylar merged commit df9afed into MPAS-Dev:master Apr 22, 2026
5 checks passed
@xylar xylar deleted the fix-coastline-alteration branch April 22, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant