1111 DOWNLOAD_METADATA ,
1212 DownloadMetadata ,
1313 complete_download ,
14- get_area_of_interest_hash ,
1514 get_existing_download ,
15+ get_space_time_region_hash ,
1616 hash_to_filename ,
1717)
1818from virtualship .expedition .do_expedition import _get_schedule , do_expedition
@@ -68,7 +68,7 @@ def init(path):
6868 default = None ,
6969)
7070def fetch (path : str | Path , username : str | None , password : str | None ) -> None :
71- """Entrypoint for the tool to download data based on area of interest ."""
71+ """Entrypoint for the tool to download data based on space-time region ."""
7272 if sum ([username is None , password is None ]) == 1 :
7373 raise ValueError ("Both username and password must be provided when using CLI." )
7474
@@ -79,31 +79,31 @@ def fetch(path: str | Path, username: str | None, password: str | None) -> None:
7979
8080 schedule = _get_schedule (path )
8181
82- if schedule .area_of_interest is None :
82+ if schedule .space_time_region is None :
8383 raise ValueError (
84- "Area of interest not found in schedule, please define it to fetch the data."
84+ "space_time_region not found in schedule, please define it to fetch the data."
8585 )
8686
87- aoi_hash = get_area_of_interest_hash (schedule .area_of_interest )
87+ space_time_region_hash = get_space_time_region_hash (schedule .space_time_region )
8888
89- existing_download = get_existing_download (data_folder , aoi_hash )
89+ existing_download = get_existing_download (data_folder , space_time_region_hash )
9090 if existing_download is not None :
9191 click .echo (
92- f"Data download for area of interest already completed ('{ existing_download } ')."
92+ f"Data download for space-time region already completed ('{ existing_download } ')."
9393 )
9494 return
9595
9696 creds_path = path / creds .CREDENTIALS_FILE
9797 username , password = creds .get_credentials_flow (username , password , creds_path )
9898
99- # Extract area_of_interest details from the schedule
100- spatial_range = schedule .area_of_interest .spatial_range
101- time_range = schedule .area_of_interest .time_range
99+ # Extract space_time_region details from the schedule
100+ spatial_range = schedule .space_time_region .spatial_range
101+ time_range = schedule .space_time_region .time_range
102102 start_datetime = time_range .start_time
103103 end_datetime = time_range .end_time
104104
105105 # Create download folder and set download metadata
106- download_folder = data_folder / hash_to_filename (aoi_hash )
106+ download_folder = data_folder / hash_to_filename (space_time_region_hash )
107107 download_folder .mkdir ()
108108 DownloadMetadata (download_complete = False ).to_yaml (
109109 download_folder / DOWNLOAD_METADATA
@@ -134,7 +134,7 @@ def fetch(path: str | Path, username: str | None, password: str | None) -> None:
134134 },
135135 }
136136
137- # Iterate over all datasets and download each based on area_of_interest
137+ # Iterate over all datasets and download each based on space_time_region
138138 try :
139139 for dataset in download_dict .values ():
140140 copernicusmarine .subset (
@@ -160,7 +160,7 @@ def fetch(path: str | Path, username: str | None, password: str | None) -> None:
160160 raise e
161161
162162 complete_download (download_folder )
163- click .echo ("Data download based on area of interest completed." )
163+ click .echo ("Data download based on space-time region completed." )
164164
165165
166166@click .command (help = "Do the expedition." )
0 commit comments