-
Notifications
You must be signed in to change notification settings - Fork 12
/
iri1DExample02.py
executable file
·54 lines (43 loc) · 1.55 KB
/
iri1DExample02.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
#!/usr/bin/env python
from pyiri2016 import IRI2016,IRI2016Profile
from numpy import arange
from matplotlib.pyplot import figure, legend, show
import seaborn
def example02():
""" Geog. Latitude Profile Example """
latlim = [-60, 60]
latstp = 2.
iri2016Obj = IRI2016Profile(alt=600, hour=17., latlim=latlim, latstp=latstp, \
lon=-76.77, option=2, verbose=False, year=2004)
latbins = arange(latlim[0], latlim[1] + latstp, latstp)
nlat = len(latbins)
index = range(nlat)
fig = figure(figsize=(8,12))
pn = fig.add_subplot(211)
NmF2 = iri2016Obj.b[0, index]
NmF1 = IRI2016()._RmNeg(iri2016Obj.b[2, index])
NmE = iri2016Obj.b[4, index]
pn.plot(latbins, NmF2, label='N$_m$F$_2$')
pn.plot(latbins, NmF1, label='N$_m$F$_1$')
pn.plot(latbins, NmE, label='N$_m$E')
pn.set_title(iri2016Obj.title1)
pn.set_xlim(latbins[[0, -1]])
pn.set_xlabel('Geog. Lat. ($^\circ$)')
pn.set_ylabel('(m$^{-3}$)')
pn.set_yscale('log')
legend(loc='best')
pn = fig.add_subplot(212)
hmF2 = iri2016Obj.b[1, index]
hmF1 = IRI2016()._RmNeg(iri2016Obj.b[3, index])
hmE = iri2016Obj.b[5, index]
pn.plot(latbins, hmF2, label='h$_m$F$_2$')
pn.plot(latbins, hmF1, label='h$_m$F$_1$')
pn.plot(latbins, hmE, label='h$_m$E')
pn.set_xlim(latbins[[0, -1]])
pn.set_title(iri2016Obj.title2)
pn.set_xlabel('Geog. Lat. ($^\circ$)')
pn.set_ylabel('(km)')
legend(loc='best')
if __name__ == '__main__':
example02()
show()