Skip to content

Commit

Permalink
Update mcsmip script
Browse files Browse the repository at this point in the history
  • Loading branch information
w-k-jones committed Nov 29, 2023
1 parent 6d7f903 commit b00d52a
Show file tree
Hide file tree
Showing 2 changed files with 1,074 additions and 183 deletions.
8 changes: 7 additions & 1 deletion code/process_mcsmip.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def main() -> None:

print(datetime.now(), f"Calculating merges and splits", flush=True)
merge_params = dict(
distance=dxy*10,
frame_len=1,
PBC_flag="hdim_2",
min_h1=0,
Expand Down Expand Up @@ -155,6 +156,11 @@ def main() -> None:
feature_is_mcs = out_ds.track_is_mcs.loc[out_ds.feature_track_id]

out_ds["feature_is_mcs"] = feature_is_mcs
out_ds["cell_track_id"] = merges.cell_parent_track_id
out_ds["track_child_cell_count"] = merges.track_child_cell_count
out_ds["cell_child_feature_count"] = merges.cell_child_feature_count
out_ds["cell_starts_with_split"] = merges.cell_starts_with_split
out_ds["cell_ends_with_merge"] = merges.cell_ends_with_merge

all_feature_labels = xr.DataArray.from_iris(segments)
all_feature_labels.name = "all_feature_labels"
Expand Down Expand Up @@ -207,7 +213,7 @@ def main() -> None:
]
)

out_ds.assign_attrs(
out_ds = out_ds.assign_attrs(
title=f"{season} {model} MCS mask file",
model=f"{model}",
season=f"{season}",
Expand Down
Loading

0 comments on commit b00d52a

Please sign in to comment.