From f1604d436392c87448aa4a133a57b39c9bbe6e3b Mon Sep 17 00:00:00 2001 From: Zachary Hoppinen <56941602+ZachHoppinen@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:49:15 -0600 Subject: [PATCH] Update retrieval.py --- spicy_snow/retrieval.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spicy_snow/retrieval.py b/spicy_snow/retrieval.py index d3166a2..c0f8023 100644 --- a/spicy_snow/retrieval.py +++ b/spicy_snow/retrieval.py @@ -106,6 +106,9 @@ def retrieve_snow_depth(area: shapely.geometry.Polygon, search_results = s1_img_search(area, dates) log.info(f'Found {len(search_results)} results') + assert len(search_results) > 3, f"Need at least 4 images to run. Found {len(search_results)} \ + using area: {area} and dates: {dates}." + # download s1 images into dataset ['s1'] variable name jobs = hyp3_pipeline(search_results, job_name = job_name, existing_job_name = existing_job_name) imgs = download_hyp3(jobs, area, outdir = join(work_dir, 'tmp'), clean = False)