-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbatch_trmm.py
72 lines (46 loc) · 1.24 KB
/
batch_trmm.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
"""
Plot TRMM product automagically
Raul Valenzuela
December 2015
adasd
asda
"""
from glob import glob
import plot_trmm
base_dir = '/home/rvalenzuela/Data/new_TRMM/'
# date = '20020602'
# date = '20020603'
# date = '20020604'
# date = '20020605'
# date = '20050625'
date = '20050626'
# date = '20050627'
# date = '20010718'
# date = '20020525'
# date = '20060711'
# date = '20000623'
# date = '20030520'
# date = '20040802'
# date = '20040801'
product = {'2A25': 'rainrate'} # [mm/hr]
# product = {'2A25':'dBZnearSurf'}
# product = {'1B01':''} # IR channel
# product = {'1C21':''} # radar reflectivity
def main():
datef = get_filenames(base_dir, product, date)
# for f in datef:
# plot_trmm.product(product, f)
# plot_trmm.fuse(product, datef)
plot_trmm.daily_accum2A25(datef)
# pngname = basename(datef[0])[:-3] + 'fuse.png'
# plt.savefig('./figs/'+pngname,
# dpi=300, bbox_inches='tight')
def get_filenames(base_dir, product, date):
# path = base_dir + date[:4] + '/' \
# + product + '.' + date + '*'
path = base_dir + product.keys()[0] + '.' + date + '*'
out = glob(path)
out.sort()
return out
main()