-
Notifications
You must be signed in to change notification settings - Fork 1
/
azmp_process_section_plots.py
90 lines (69 loc) · 4.14 KB
/
azmp_process_section_plots.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
## ----------- SECTION PLOT ---------------- ##
import numpy as np
import azmp_sections_tools as azst
import matplotlib.pyplot as plt
import os
## # Original figure generation:
## years = np.arange(1980, 2019)
## sections = ['SI', 'BB', 'WB', 'FC', 'SEGB']
## seasons = ['spring', 'summer', 'fall']
## variables = ['temperature', 'salinity']
## # Mathilde request:
## years = np.arange(1999, 2019)
## sections = ['SI', 'BB', 'WB']
## seasons = ['summer']
## variables = ['temperature', 'salinity']
## for year in years:
## for section in sections:
## for season in seasons:
## for var in variables:
## print(str(year), section, season, var)
## azst.seasonal_section_plot(VAR=var, SECTION=section, SEASON=season, YEAR=year, ZMAX=500, STATION_BASED=True)
## plt.close('all')
## command = 'montage temperature_' + section + '_' + season + '_' + str(year) + '.png salinity_' + section + '_' + season + '_' + str(year) + '.png -tile 2x1 -geometry +10+10 -background white ' + section + '_stn_' + season + '_' + str(year) + '.png'
## os.system(command)
## os.system('rm temperature*.png salinity*.png')
## for var in variables:
## azst.seasonal_section_plot(VAR=var, SECTION=section, SEASON=season, YEAR=year, ZMAX=500, STATION_BASED=False)
## plt.close('all')
## command = 'montage temperature_' + section + '_' + season + '_' + str(year) + '.png salinity_' + section + '_' + season + '_' + str(year) + '.png -tile 2x1 -geometry +10+10 -background white ' + section + '_itp_' + season + '_' + str(year) + '.png'
## os.system(command)
## os.system('rm temperature*.png salinity*.png')
# SI since 1950
years = np.arange(1999,2020)
sections = ['SI', 'BB', 'FC', 'SEGB']
seasons = ['spring', 'summer', 'fall']
variables = ['temperature', 'salinity']
# For Steve Jan 2021
years = np.arange(2008, 2020)
sections = ['FC']
seasons = ['spring', 'summer', 'fall']
variables = ['temperature', 'salinity']
for year in years:
for section in sections:
for season in seasons:
for var in variables:
print(str(year), section, season, var)
azst.seasonal_section_plot(VAR=var, SECTION=section, SEASON=season, YEAR=year, ZMAX=2800, STATION_BASED=True)
plt.close('all')
command = 'montage temperature_' + section + '_' + season + '_' + str(year) + '.png salinity_' + section + '_' + season + '_' + str(year) + '.png -tile 2x1 -geometry +10+10 -background white ' + section + '_station_' + season + '_' + str(year) + '.png'
os.system(command)
os.system('rm temperature*.png salinity*.png')
# Bottles sections
years = np.arange(1999,2019)
sections = ['SEGB']
seasons = ['fall']
variables = ['temperature', 'salinity', 'oxygen', 'NO3', 'PO4', 'SIO']
for year in years:
for section in sections:
for season in seasons:
for var in variables:
print(str(year), section, season, var)
azst.btl_section_plot(VAR=var, SECTION=section, SEASON=season, YEAR=year, ZMAX=500)
plt.close('all')
## command = 'montage temperature_' + section + '_' + season + '_' + str(year) + '.png salinity_' + section + '_' + season + '_' + str(year) + '.png oxygen_' + section + '_' + season + '_' + str(year) + '.png -tile 3x1 -geometry +10+10 -background white ' + section + '_btl_TSO_' + season + '_' + str(year) + '.png'
## os.system(command)
## os.system('rm temperature*.png salinity*.png')
## command = 'montage NO3_' + section + '_' + season + '_' + str(year) + '.png PO4_' + section + '_' + season + '_' + str(year) + '.png SIO_' + section + '_' + season + '_' + str(year) + '.png -tile 3x1 -geometry +10+10 -background white ' + section + '_btl_NPS_' + season + '_' + str(year) + '.png'
## os.system(command)
## os.system('rm temperature*.png salinity*.png')