Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/actions/convert_to_dss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great

aoi_name=catalog_id,
storm_start=storm_start,
variable_duration_map={
Expand All @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect.

)
storm_duration = storm_params["storm_duration"]

items = list(collection.get_all_items())
Expand Down Expand Up @@ -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,
Expand Down
Loading