oafuncs 0.0.97.10__py3-none-any.whl → 0.0.97.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oafuncs/oa_down/hycom_3hourly.py +7 -6
- {oafuncs-0.0.97.10.dist-info → oafuncs-0.0.97.11.dist-info}/METADATA +1 -1
- {oafuncs-0.0.97.10.dist-info → oafuncs-0.0.97.11.dist-info}/RECORD +6 -6
- {oafuncs-0.0.97.10.dist-info → oafuncs-0.0.97.11.dist-info}/WHEEL +0 -0
- {oafuncs-0.0.97.10.dist-info → oafuncs-0.0.97.11.dist-info}/licenses/LICENSE.txt +0 -0
- {oafuncs-0.0.97.10.dist-info → oafuncs-0.0.97.11.dist-info}/top_level.txt +0 -0
oafuncs/oa_down/hycom_3hourly.py
CHANGED
@@ -1000,7 +1000,7 @@ def _done_callback(future, progress, task, total, counter_lock):
|
|
1000
1000
|
progress.update(task, advance=1, description=f"[cyan]Downloading... {parallel_counter}/{total}")
|
1001
1001
|
|
1002
1002
|
|
1003
|
-
def _download_hourly_func(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_min=-80, lat_max=90, depth=None, level=None, store_path=None, dataset_name=None, version_name=None, num_workers=None, check=False, ftimes=1,
|
1003
|
+
def _download_hourly_func(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_min=-80, lat_max=90, depth=None, level=None, store_path=None, dataset_name=None, version_name=None, num_workers=None, check=False, ftimes=1, interval_hour=3):
|
1004
1004
|
"""
|
1005
1005
|
Description:
|
1006
1006
|
Download the data of single time or a series of time
|
@@ -1032,7 +1032,7 @@ def _download_hourly_func(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_mi
|
|
1032
1032
|
_prepare_url_to_download(var, lon_min, lon_max, lat_min, lat_max, ymdh_time_s, None, depth, level, store_path, dataset_name, version_name, check)
|
1033
1033
|
elif int(ymdh_time_s) < int(ymdh_time_e):
|
1034
1034
|
print("Downloading a series of files...")
|
1035
|
-
time_list = get_time_list(ymdh_time_s, ymdh_time_e,
|
1035
|
+
time_list = get_time_list(ymdh_time_s, ymdh_time_e, interval_hour, "hour")
|
1036
1036
|
with Progress() as progress:
|
1037
1037
|
task = progress.add_task("[cyan]Downloading...", total=len(time_list))
|
1038
1038
|
if ftimes == 1:
|
@@ -1050,7 +1050,8 @@ def _download_hourly_func(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_mi
|
|
1050
1050
|
for feature in as_completed(futures):
|
1051
1051
|
_done_callback(feature, progress, task, len(time_list), counter_lock)
|
1052
1052
|
else:
|
1053
|
-
new_time_list = get_time_list(ymdh_time_s, ymdh_time_e, 3 * ftimes, "hour")
|
1053
|
+
# new_time_list = get_time_list(ymdh_time_s, ymdh_time_e, 3 * ftimes, "hour")
|
1054
|
+
new_time_list = get_time_list(ymdh_time_s, ymdh_time_e, interval_hour * ftimes, "hour")
|
1054
1055
|
total_num = len(new_time_list)
|
1055
1056
|
if num_workers is None or num_workers <= 1:
|
1056
1057
|
# 串行方式
|
@@ -1071,7 +1072,7 @@ def _download_hourly_func(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_mi
|
|
1071
1072
|
print("[bold red]Please ensure the time_s is no more than time_e")
|
1072
1073
|
|
1073
1074
|
|
1074
|
-
def download(var, time_s, time_e=None, lon_min=0, lon_max=359.92, lat_min=-80, lat_max=90, depth=None, level=None, store_path=None, dataset_name=None, version_name=None, num_workers=None, check=False, ftimes=1, idm_engine=None, fill_time=None,
|
1075
|
+
def download(var, time_s, time_e=None, lon_min=0, lon_max=359.92, lat_min=-80, lat_max=90, depth=None, level=None, store_path=None, dataset_name=None, version_name=None, num_workers=None, check=False, ftimes=1, idm_engine=None, fill_time=None, interval_hour=3):
|
1075
1076
|
"""
|
1076
1077
|
Description:
|
1077
1078
|
Download the data of single time or a series of time
|
@@ -1094,7 +1095,7 @@ def download(var, time_s, time_e=None, lon_min=0, lon_max=359.92, lat_min=-80, l
|
|
1094
1095
|
ftimes: int, the number of time in one file, default is 1, if set to 1, the data of single time will be downloaded; the maximum is 8, if set to 8, the data of 8 times will be downloaded in one file
|
1095
1096
|
idm_engine: str, the IDM engine, default is None, if set, the IDM will be used to download the data; example: "D:\\Programs\\Internet Download Manager\\IDMan.exe"
|
1096
1097
|
fill_time: bool or None, the mode to fill the time, default is None. None: only download the data; True: modify the real time of data to the time in the file name; False: check the time in the file name and the real time of data, if not match, delete the file
|
1097
|
-
|
1098
|
+
interval_hour: int, the interval time to download the data, default is 3, if set, the interval time will be used to download the data; example: 3, 6, ...
|
1098
1099
|
|
1099
1100
|
Returns:
|
1100
1101
|
None
|
@@ -1181,7 +1182,7 @@ def download(var, time_s, time_e=None, lon_min=0, lon_max=359.92, lat_min=-80, l
|
|
1181
1182
|
global match_time
|
1182
1183
|
match_time = fill_time
|
1183
1184
|
|
1184
|
-
_download_hourly_func(var, time_s, time_e, lon_min, lon_max, lat_min, lat_max, depth, level, store_path, dataset_name, version_name, num_workers, check, ftimes,
|
1185
|
+
_download_hourly_func(var, time_s, time_e, lon_min, lon_max, lat_min, lat_max, depth, level, store_path, dataset_name, version_name, num_workers, check, ftimes, int(interval_hour))
|
1185
1186
|
|
1186
1187
|
if idm_engine is not None:
|
1187
1188
|
if idm_download_list:
|
@@ -16,7 +16,7 @@ oafuncs/_script/plot_dataset.py,sha256=zkSEnO_-biyagorwWXPoihts_cwuvripzEt-l9bHJ
|
|
16
16
|
oafuncs/_script/replace_file_concent.py,sha256=eCFZjnZcwyRvy6b4mmIfBna-kylSZTyJRfgXd6DdCjk,5982
|
17
17
|
oafuncs/oa_down/User_Agent-list.txt,sha256=pazxSip8_lphEBOPHG902zmIBUg8sBKXgmqp_g6j_E4,661062
|
18
18
|
oafuncs/oa_down/__init__.py,sha256=kRX5eTUCbAiz3zTaQM1501paOYS_3fizDN4Pa0mtNUA,585
|
19
|
-
oafuncs/oa_down/hycom_3hourly.py,sha256=
|
19
|
+
oafuncs/oa_down/hycom_3hourly.py,sha256=KQVan04E54YtwCCNBewE6NI7TK3dHrXMDLRvwpQyZlQ,65643
|
20
20
|
oafuncs/oa_down/idm.py,sha256=XfYCNnQWADxOhhJd-T8sNYN0nGiRrAs7zbQcsB5-UmI,1668
|
21
21
|
oafuncs/oa_down/literature.py,sha256=2bF9gSKQbzcci9LcKE81j8JEjIJwON7jbwQB3gDDA3E,11331
|
22
22
|
oafuncs/oa_down/test_ua.py,sha256=0IQq3NjqfNr7KkyjS_U-a4mYu-r-E7gzawwo4IfEa6Y,10851
|
@@ -33,8 +33,8 @@ oafuncs/oa_sign/scientific.py,sha256=a4JxOBgm9vzNZKpJ_GQIQf7cokkraV5nh23HGbmTYKw
|
|
33
33
|
oafuncs/oa_tool/__init__.py,sha256=AvrCNR2-xad9ZRjthIdAoSk8UX4vOpEWLg6CV1NQNKc,161
|
34
34
|
oafuncs/oa_tool/email.py,sha256=4lJxV_KUzhxgLYfVwYTqp0qxRugD7fvsZkXDe5WkUKo,3052
|
35
35
|
oafuncs/oa_tool/parallel.py,sha256=LBFWEKPcILVCbfSulETJE4wGPiOw1P_Fl9DzjYoCqgk,21844
|
36
|
-
oafuncs-0.0.97.
|
37
|
-
oafuncs-0.0.97.
|
38
|
-
oafuncs-0.0.97.
|
39
|
-
oafuncs-0.0.97.
|
40
|
-
oafuncs-0.0.97.
|
36
|
+
oafuncs-0.0.97.11.dist-info/licenses/LICENSE.txt,sha256=rMtLpVg8sKiSlwClfR9w_Dd_5WubTQgoOzE2PDFxzs4,1074
|
37
|
+
oafuncs-0.0.97.11.dist-info/METADATA,sha256=_bt0gpRAi04hfJM3UMVYjuXc743JdkGEu0U1UZApd9w,4226
|
38
|
+
oafuncs-0.0.97.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
39
|
+
oafuncs-0.0.97.11.dist-info/top_level.txt,sha256=bgC35QkXbN4EmPHEveg_xGIZ5i9NNPYWqtJqaKqTPsQ,8
|
40
|
+
oafuncs-0.0.97.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|