File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1111 lat/lon/elev fields.
1212- Update data model for ` IceflowDataFrame ` to include ` dataset ` , which gives the
1313 dataset short name and version as a string (e.g., ILVIS v2 is "ILVISv2").
14+ - Add ` total_size_mb ` property to ` IceflowSearchResult ` and log size when
15+ downloading.
1416
1517# v1.0.0
1618
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def _download_iceflow_search_result(
6161
6262 logger .info (
6363 f"Downloading { len (iceflow_search_result .granules )} granules"
64+ f" (approx. { iceflow_search_result .total_size_mb } MB)"
6465 f" to { output_subdir } ."
6566 )
6667
Original file line number Diff line number Diff line change @@ -247,5 +247,10 @@ class IceflowSearchResult(pydantic.BaseModel):
247247 # this that type
248248 model_config = pydantic .ConfigDict (arbitrary_types_allowed = True )
249249
250+ @property
251+ def total_size_mb (self ):
252+ granule_sizes_mb = [granule .size () for granule in self .granules ]
253+ return sum (granule_sizes_mb )
254+
250255
251256IceflowSearchResults = list [IceflowSearchResult ]
You can’t perform that action at this time.
0 commit comments