oafuncs 0.0.62__py2.py3-none-any.whl → 0.0.63__py2.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 +14 -14
- oafuncs/oa_down/refs_pdf.py +1 -1
- {oafuncs-0.0.62.dist-info → oafuncs-0.0.63.dist-info}/METADATA +1 -1
- {oafuncs-0.0.62.dist-info → oafuncs-0.0.63.dist-info}/RECORD +7 -7
- {oafuncs-0.0.62.dist-info → oafuncs-0.0.63.dist-info}/LICENSE.txt +0 -0
- {oafuncs-0.0.62.dist-info → oafuncs-0.0.63.dist-info}/WHEEL +0 -0
- {oafuncs-0.0.62.dist-info → oafuncs-0.0.63.dist-info}/top_level.txt +0 -0
oafuncs/oa_down/hycom_3hourly.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
Author: Liu Kun && 16031215@qq.com
|
5
5
|
Date: 2024-11-01 10:31:09
|
6
6
|
LastEditors: Liu Kun && 16031215@qq.com
|
7
|
-
LastEditTime: 2024-11-
|
7
|
+
LastEditTime: 2024-11-28 16:04:50
|
8
8
|
FilePath: \\Python\\My_Funcs\\OAFuncs\\oafuncs\\oa_down\\hycom_3hourly.py
|
9
9
|
Description:
|
10
10
|
EditPlatform: vscode
|
@@ -69,12 +69,12 @@ variable_info = {
|
|
69
69
|
'u': {'var_name': 'water_u', 'standard_name': 'eastward_sea_water_velocity'},
|
70
70
|
'v': {'var_name': 'water_v', 'standard_name': 'northward_sea_water_velocity'},
|
71
71
|
'temp': {'var_name': 'water_temp', 'standard_name': 'sea_water_potential_temperature'},
|
72
|
-
'
|
72
|
+
'salt': {'var_name': 'salinity', 'standard_name': 'sea_water_salinity'},
|
73
73
|
'ssh': {'var_name': 'surf_el', 'standard_name': 'sea_surface_elevation'},
|
74
74
|
'u_b': {'var_name': 'water_u_bottom', 'standard_name': 'eastward_sea_water_velocity_at_sea_floor'},
|
75
75
|
'v_b': {'var_name': 'water_v_bottom', 'standard_name': 'northward_sea_water_velocity_at_sea_floor'},
|
76
76
|
'temp_b': {'var_name': 'water_temp_bottom', 'standard_name': 'sea_water_potential_temperature_at_sea_floor'},
|
77
|
-
'
|
77
|
+
'salt_b': {'var_name': 'salinity_bottom', 'standard_name': 'sea_water_salinity_at_sea_floor'},
|
78
78
|
}
|
79
79
|
|
80
80
|
# classification method
|
@@ -305,7 +305,7 @@ def get_query_dict_single_depth(var, lon_min, lon_max, lat_min, lat_max, depth,
|
|
305
305
|
query_dict = set_query_dict_no_vertical(var, lon_min, lon_max, lat_min, lat_max, time_str_ymdh)
|
306
306
|
else:
|
307
307
|
query_dict = set_query_dict_depth_or_level(var, lon_min, lon_max, lat_min, lat_max, time_str_ymdh)
|
308
|
-
if var in ['u', 'v', 'temp', '
|
308
|
+
if var in ['u', 'v', 'temp', 'salt']:
|
309
309
|
print('Please ensure the depth is in the range of 0-5000 m')
|
310
310
|
query_dict['vertCoord'] = get_nearest_level_index(depth)+1
|
311
311
|
return query_dict
|
@@ -317,7 +317,7 @@ def get_query_dict_single_level(var, lon_min, lon_max, lat_min, lat_max, level_n
|
|
317
317
|
else:
|
318
318
|
# level_num: 1-40
|
319
319
|
query_dict = set_query_dict_depth_or_level(var, lon_min, lon_max, lat_min, lat_max, time_str_ymdh)
|
320
|
-
if var in ['u', 'v', 'temp', '
|
320
|
+
if var in ['u', 'v', 'temp', 'salt']:
|
321
321
|
print('Please ensure the level_num is in the range of 1-40')
|
322
322
|
if level_num == 0:
|
323
323
|
level_num = 1
|
@@ -397,21 +397,21 @@ def get_base_url(dataset_name, version_name, var, year_str):
|
|
397
397
|
elif classification_method == 'var_different':
|
398
398
|
if var in ['u', 'v', 'u_b', 'v_b']:
|
399
399
|
base_url = url_dict['uv3z']
|
400
|
-
elif var in ['temp', '
|
400
|
+
elif var in ['temp', 'salt', 'temp_b', 'salt_b']:
|
401
401
|
base_url = url_dict['ts3z']
|
402
402
|
elif var in ['ssh']:
|
403
403
|
base_url = url_dict['ssh']
|
404
404
|
else:
|
405
|
-
print('Please ensure the var is in [u,v,temp,
|
405
|
+
print('Please ensure the var is in [u,v,temp,salt,ssh,u_b,v_b,temp_b,salt_b]')
|
406
406
|
elif classification_method == 'var_year_different':
|
407
407
|
if var in ['u', 'v', 'u_b', 'v_b']:
|
408
408
|
base_url = url_dict['uv3z'][str(year_str)]
|
409
|
-
elif var in ['temp', '
|
409
|
+
elif var in ['temp', 'salt', 'temp_b', 'salt_b']:
|
410
410
|
base_url = url_dict['ts3z'][str(year_str)]
|
411
411
|
elif var in ['ssh']:
|
412
412
|
base_url = url_dict['ssh'][str(year_str)]
|
413
413
|
else:
|
414
|
-
print('Please ensure the var is in [u,v,temp,
|
414
|
+
print('Please ensure the var is in [u,v,temp,salt,ssh,u_b,v_b,temp_b,salt_b]')
|
415
415
|
return base_url
|
416
416
|
|
417
417
|
|
@@ -630,7 +630,7 @@ def convert_full_name_to_short_name(full_name):
|
|
630
630
|
for var, info in variable_info.items():
|
631
631
|
if full_name == info['var_name'] or full_name == info['standard_name'] or full_name == var:
|
632
632
|
return var
|
633
|
-
print('[bold #FFE4E1]Please ensure the var is in:\n[bold blue]u,v,temp,
|
633
|
+
print('[bold #FFE4E1]Please ensure the var is in:\n[bold blue]u,v,temp,salt,ssh,u_b,v_b,temp_b,salt_b')
|
634
634
|
print('or')
|
635
635
|
print('[bold blue]water_u, water_v, water_temp, salinity, surf_el, water_u_bottom, water_v_bottom, water_temp_bottom, salinity_bottom')
|
636
636
|
return False
|
@@ -655,7 +655,7 @@ def download(var, time_s, time_e, lon_min=0, lon_max=359.92, lat_min=-80, lat_ma
|
|
655
655
|
Download the data of single time or a series of time
|
656
656
|
|
657
657
|
Parameters:
|
658
|
-
var: str, the variable name, such as 'u', 'v', 'temp', '
|
658
|
+
var: str, the variable name, such as 'u', 'v', 'temp', 'salt', 'ssh', 'u_b', 'v_b', 'temp_b', 'salt_b' or 'water_u', 'water_v', 'water_temp', 'salinity', 'surf_el', 'water_u_bottom', 'water_v_bottom', 'water_temp_bottom', 'salinity_bottom'
|
659
659
|
time_s: str, the start time, such as '2024110100' or '20241101', if add hour, the hour should be 00, 03, 06, 09, 12, 15, 18, 21
|
660
660
|
time_e: str, the end time, such as '2024110221' or '20241102', if add hour, the hour should be 00, 03, 06, 09, 12, 15, 18, 21
|
661
661
|
lon_min: float, the minimum longitude, default is 0
|
@@ -725,11 +725,11 @@ def how_to_use():
|
|
725
725
|
|
726
726
|
# 2. Get the base url according to the dataset, version, var and year:
|
727
727
|
# 2.1 Dataset and version were found in step 1
|
728
|
-
# 2.2 Var: u, v, temp,
|
728
|
+
# 2.2 Var: u, v, temp, salt, ssh, u_b, v_b, temp_b, salt_b
|
729
729
|
# 2.3 Year: 1994-2024(current year)
|
730
730
|
|
731
731
|
# 3. Get the query_dict according to the var, lon_min, lon_max, lat_min, lat_max, depth, level_num, time_str_ymdh:
|
732
|
-
# 3.1 Var: u, v, temp,
|
732
|
+
# 3.1 Var: u, v, temp, salt, ssh, u_b, v_b, temp_b, salt_b
|
733
733
|
# 3.2 Lon_min, lon_max, lat_min, lat_max: float
|
734
734
|
# 3.3 Depth: 0-5000m, if you wanna get single depth data, you can set the depth
|
735
735
|
# 3.4 Level_num: 1-40, if you wanna get single level data, you can set the level_num
|
@@ -772,7 +772,7 @@ if __name__ == '__main__':
|
|
772
772
|
'water_v': {'simple_name': 'v', 'download': 0},
|
773
773
|
'surf_el': {'simple_name': 'ssh', 'download': 0},
|
774
774
|
'water_temp': {'simple_name': 'temp', 'download': 0},
|
775
|
-
'salinity': {'simple_name': '
|
775
|
+
'salinity': {'simple_name': 'salt', 'download': 1},
|
776
776
|
}
|
777
777
|
|
778
778
|
# set depth or level, only one can be True
|
oafuncs/oa_down/refs_pdf.py
CHANGED
@@ -305,7 +305,7 @@ def download5doi(store_path=None, doi_list=None, txt_file=None, excel_file=None,
|
|
305
305
|
download5doi(store_path=r'I:\Delete\ref_pdf', excel_file=r'I:\Delete\ref_pdf\wrong_record.xlsx')
|
306
306
|
download5doi(store_path=r'I:\Delete\ref_pdf', excel_file=r'I:\Delete\ref_pdf\wrong_record.xlsx', col_name='DOI')
|
307
307
|
'''
|
308
|
-
print('[bold #EE33fA]Note:\n
|
308
|
+
print('[bold #EE33fA]Note:\n 升级0.0.62版本后,函数路径将改为oafuncs.oa_down.literature.download5doi,此路径将被弃用。')
|
309
309
|
|
310
310
|
if not store_path:
|
311
311
|
store_path = Path.cwd()
|
@@ -7,17 +7,17 @@ oafuncs/oa_help.py,sha256=ppNktmtNzs15R20MD1bM7yImlTQ_ngMwvoIglePOKXA,1000
|
|
7
7
|
oafuncs/oa_nc.py,sha256=ALAYfqDy5lbUNJsTU29j6ZWkM4wgqQU3p2Fxn5pkvsQ,12102
|
8
8
|
oafuncs/oa_python.py,sha256=XPTP3o7zTFzfJR_YhsKfQksa3bSYwXsne9YxlJplCEA,3994
|
9
9
|
oafuncs/oa_down/__init__.py,sha256=a6rgxHQi8spvlI-TaVEqnrDNhYsKm5_IQf7ckAZ8U4w,603
|
10
|
-
oafuncs/oa_down/hycom_3hourly.py,sha256=
|
10
|
+
oafuncs/oa_down/hycom_3hourly.py,sha256=5ssqWxIpmCF77ojguxUem2zGULTPmPKZjqPTgne29fg,43912
|
11
11
|
oafuncs/oa_down/literature.py,sha256=dT3-7-beEzQ9mTP8LNV9Gf3q5Z1Pqqjc6FOS010HZeQ,17833
|
12
|
-
oafuncs/oa_down/refs_pdf.py,sha256=
|
12
|
+
oafuncs/oa_down/refs_pdf.py,sha256=wr1sIYO2FUBJTn-K79NylbRUvCAFaee6_fQljxSI_Q8,17979
|
13
13
|
oafuncs/oa_sign/__init__.py,sha256=QKqTFrJDFK40C5uvk48GlRRbGFzO40rgkYwu6dYxatM,563
|
14
14
|
oafuncs/oa_sign/meteorological.py,sha256=mLbupsZSq427HTfVbZMvIlFzDHwSzQAbK3X19o8anFY,6525
|
15
15
|
oafuncs/oa_sign/ocean.py,sha256=xrW-rWD7xBWsB5PuCyEwQ1Q_RDKq2KCLz-LOONHgldU,5932
|
16
16
|
oafuncs/oa_sign/scientific.py,sha256=a4JxOBgm9vzNZKpJ_GQIQf7cokkraV5nh23HGbmTYKw,5064
|
17
17
|
oafuncs/oa_tool/__init__.py,sha256=IKOlqpWlb4cMDCtq2VKR_RTxQHDNqR_vfqqsOsp_lKQ,466
|
18
18
|
oafuncs/oa_tool/email.py,sha256=7EX3VkD8TxYAKPLOuC_yS104p9zbKilZlGfkVa2C6BQ,2947
|
19
|
-
oafuncs-0.0.
|
20
|
-
oafuncs-0.0.
|
21
|
-
oafuncs-0.0.
|
22
|
-
oafuncs-0.0.
|
23
|
-
oafuncs-0.0.
|
19
|
+
oafuncs-0.0.63.dist-info/LICENSE.txt,sha256=rMtLpVg8sKiSlwClfR9w_Dd_5WubTQgoOzE2PDFxzs4,1074
|
20
|
+
oafuncs-0.0.63.dist-info/METADATA,sha256=c0kTonzu73DG0FabuV9DU_7sRnKBws4NPDq4IQhUPAY,22378
|
21
|
+
oafuncs-0.0.63.dist-info/WHEEL,sha256=pxeNX5JdtCe58PUSYP9upmc7jdRPgvT0Gm9kb1SHlVw,109
|
22
|
+
oafuncs-0.0.63.dist-info/top_level.txt,sha256=bgC35QkXbN4EmPHEveg_xGIZ5i9NNPYWqtJqaKqTPsQ,8
|
23
|
+
oafuncs-0.0.63.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|