-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazmp_bottomT_genmaps.py
48 lines (31 loc) · 1.42 KB
/
azmp_bottomT_genmaps.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
'''
Generation of annual maps and 3D cube for temperature from interpolated CTD casts.
Originally developed for H. Andres
June 2022
Run in /home/cyrf0006/AZMP/state_reports/bottomT/T-SCubes
'''
import azmp_utils as azu
import numpy as np
climato_springT = '/home/cyrf0006/AZMP/state_reports/bottomT/Tbot_climato_spring_0.10.h5'
climato_fallT = '/home/cyrf0006/AZMP/state_reports/bottomT/Tbot_climato_fall_0.10.h5'
climato_springS = '/home/cyrf0006/AZMP/state_reports/bottomT/Sbot_climato_spring_0.10.h5'
climato_fallS = '/home/cyrf0006/AZMP/state_reports/bottomT/Sbot_climato_fall_0.10.h5'
for i in np.arange(1993, 2022):
print(i)
year_file = '/home/cyrf0006/data/dev_database/netCDF/' + str(i) + '.nc'
Tbot_dict = azu.get_bottomT(year_file, 'fall', climato_fallT)
Tbot_dict = azu.get_bottomT(year_file, 'spring', climato_springT)
Sbot_dict = azu.get_bottomS(year_file, 'fall', climato_fallS)
Sbot_dict = azu.get_bottomS(year_file, 'spring', climato_springS)
for i in np.arange(1993, 2022):
# spring
Tsh5 = 'Tcube_spring' + str(i) + '.h5'
Ssh5 = 'Scube_spring' + str(i) + '.h5'
ncfile_spring = 'T-Scube_spring' + str(i) + '.nc'
# fall
Tfh5 = 'Tcube_fall' + str(i) + '.h5'
Sfh5 = 'Scube_fall' + str(i) + '.h5'
ncfile_fall ='T-Scube_fall' + str(i) + '.nc'
azu.h5cubes_2nc(Tsh5, Ssh5, ncfile_spring)
azu.h5cubes_2nc(Tfh5, Sfh5, ncfile_fall)