From c32082ad586b68212123231dc99983fde73c6106 Mon Sep 17 00:00:00 2001 From: Nghiem Date: Tue, 12 May 2026 17:59:03 +0000 Subject: [PATCH] fix: DSS uses transposition domain, not watershed (closes #7) Clip the AORC zarr data to the transposition domain when writing DSS, not the watershed. The transposition domain is the spatial scope a storm can be moved over; clipping to the watershed truncates the storm field and yields DSS grids that can't represent transposed positions. Swap the AOI source in `convert_to_dss` from `payload.inputs[0].paths ["watershed"]` to `["transposition"]` and rename the carried variable to match. --- src/actions/convert_to_dss.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/actions/convert_to_dss.py b/src/actions/convert_to_dss.py index 426b462..58a4fd5 100644 --- a/src/actions/convert_to_dss.py +++ b/src/actions/convert_to_dss.py @@ -25,7 +25,7 @@ def _parse_storm_datetime(item: Any) -> Optional[datetime]: def _convert_single_storm( output_path: str, - watershed_file: str, + transposition_file: str, catalog_id: str, storm_start_iso: str, storm_duration: int, @@ -40,7 +40,7 @@ def _convert_single_storm( try: noaa_zarr_to_dss( output_dss_path=output_path, - aoi_geometry_gpkg_path=watershed_file, + aoi_geometry_gpkg_path=transposition_file, aoi_name=catalog_id, storm_start=storm_start, variable_duration_map={ @@ -65,7 +65,9 @@ def convert_to_dss(ctx: dict[str, Any], action: Any) -> None: dss_dir = output_dir / "data" dss_dir.mkdir(parents=True, exist_ok=True) - watershed_file = str(local_root / Path(payload.inputs[0].paths["watershed"]).name) + transposition_file = str( + local_root / Path(payload.inputs[0].paths["transposition"]).name + ) storm_duration = storm_params["storm_duration"] items = list(collection.get_all_items()) @@ -115,7 +117,7 @@ def convert_to_dss(ctx: dict[str, Any], action: Any) -> None: pool.submit( _convert_single_storm, out_path, - watershed_file, + transposition_file, catalog_id, start_iso, storm_duration,