Пример #1
0
def example08():

    """ GMT Profile Example """

    hrlim = [0, 24]
    hrstp = 0.25
    iri2016Obj = IRI2016Profile(hrlim=hrlim, hrstp=hrstp, lat=-11.95, \
    lon=-76.77, option=8, verbose=False, year=2004)

    hrbins = arange(hrlim[0], hrlim[1] + hrstp, hrstp)

    nhr = hrbins.size
    index = range(nhr)

    fig = figure(figsize=(16,12))

    pn = fig.add_subplot(221)
    NmF2 = iri2016Obj.b[0, index]
    NmF1 = IRI2016()._RmNeg(iri2016Obj.b[2, index])
    NmE = iri2016Obj.b[4, index]
    pn.plot(hrbins, NmF2, label='N$_m$F$_2$')
    pn.plot(hrbins, NmF1, label='N$_m$F$_1$')
    pn.plot(hrbins, NmE, label='N$_m$E')
    pn.set_title(iri2016Obj.title1)
    pn.set_xlim(hrbins[[0, -1]])
    pn.set_xlabel('Hour (UT)')
    pn.set_ylabel('(m$^{-3}$)')        
    pn.set_yscale('log')
    legend(loc='best')

    pn = fig.add_subplot(222)
    hmF2 = iri2016Obj.b[1, index]
    hmF1 = IRI2016()._RmNeg(iri2016Obj.b[3, index])
    hmE = iri2016Obj.b[5, index]
    pn.plot(hrbins, hmF2, label='h$_m$F$_2$')
    pn.plot(hrbins, hmF1, label='h$_m$F$_1$')
    pn.plot(hrbins, hmE, label='h$_m$E')
    pn.set_xlim(hrbins[[0, -1]])
    pn.set_title(iri2016Obj.title2)
    pn.set_xlabel('Hour (UT)')
    pn.set_ylabel('(km)')
    legend(loc='best')    

    # pn = fig.add_subplot(223)
    # tec = iri2016Obj.b[36, index]
    # pn.plot(hrbins, tec, label=r'TEC')
    # pn.set_xlim(hrbins[[0, -1]])
    # pn.set_xlabel('Hour (UT)')
    # pn.set_ylabel('(m$^{-2}$)')
    # #pn.set_yscale('log')
    # legend(loc='best')

    pn = fig.add_subplot(224)
    vy = iri2016Obj.b[43, index]
    pn.plot(hrbins, vy, label=r'V$_y$')
    pn.set_xlim(hrbins[[0, -1]])
    pn.set_xlabel('Hour (UT)')
    pn.set_ylabel('(m/s)')
    legend(loc='best')
Пример #2
0
def example01():

    """ Height Profile Example """

    altlim = [90., 200.]
    altstp = 2.
    lat, lon = -11.95, -76.77
    year, month, dom = 2003, 11, 21

    iri2016Obj = IRI2016Profile(altlim=altlim, altstp=altstp, lat=lat, \
        lon=lon, year=year, month=month, dom=dom, option=1, verbose=False, \
        hour=17.)

    altbins = arange(altlim[0], altlim[1] + altstp, altstp)

    nalt = len(altbins)
    index = range(nalt)

    fig = figure(figsize=(16,6))

    pn = fig.add_subplot(121)

    ne = iri2016Obj.a[0, index]

    nO2p = iri2016Obj.a[7, index] * ne * 1e-2
    nNOp = iri2016Obj.a[8, index] * ne * 1e-2
    #nOp = iri2016Obj.a[5, index] * ne * 1e-2
            
    pn.plot(ne, altbins, label='N$_e$')
    pn.plot(nO2p, altbins, label='O$_2$$^+$')
    pn.plot(nNOp, altbins, label='NO$^+$')
    #pn.plot(nOp, altbins, label='O$^+$')        
    pn.set_title(iri2016Obj.title1)
    pn.set_xlabel('Density (m$^{-3}$)')
    pn.set_ylabel('Altitude (km)')
    pn.set_xscale('log')
    legend(loc='best')

    pn = fig.add_subplot(122)
    ti = iri2016Obj.a[2, index]
    te = iri2016Obj.a[3, index]
    pn.plot(ti, altbins, label='T$_i$')
    pn.plot(te, altbins, label='T$_e$')
    pn.set_title(iri2016Obj.title2)
    pn.set_xlabel('Temperature ($^\circ$K)')
    pn.set_ylabel('Altitude (km)')
    legend(loc='best')
Пример #3
0
def a_priori_model(heights, hmax, lat, lon, time):
    t = gmtime(mktime(strptime(time.isot, "%Y-%m-%dT%H:%M:%S.%f")))
    year, month, day = t.tm_year, t.tm_mon, t.tm_mday
    iri = IRI2016Profile(altlim=[1., hmax],
                         altstp=1.,
                         lat=lat,
                         lon=lon,
                         year=year,
                         month=month,
                         dom=day,
                         option=1,
                         verbose=False)
    ne = iri.a[0, :]
    ne[ne == -1] = np.min(ne[ne != -1])
    h = np.linspace(1., hmax, len(ne))
    ne_out = np.interp(heights, h, ne)
    return ne_out
Пример #4
0
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')
Пример #5
0
#!/usr/bin/env python
from pyiri2016 import IRI2016,IRI2016Profile
from numpy import arange
from matplotlib.pyplot import figure,  show

""" Geog. Latitude Profile Example """

latlim = [-60, 60]
latstp = 2.
iri2016Obj = IRI2016Profile(alt=600, latlim=latlim, latstp=latstp, \
lon=-76.77, option='lat',  time='2004-01-01T17')

latbins = arange(latlim[0], latlim[1] + latstp, latstp)


index = range(latbins.size)

fig = figure(figsize=(8,12))
axs = fig.subplots(2,1, sharex=True)

pn = axs[0]
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}$)')
Пример #6
0
#!/usr/bin/env python
from pyiri2016 import IRI2016Profile


sim = IRI2016Profile(option='vertical')
Пример #7
0
    def main1():

        iri2016Obj = IRI2016Profile(option=1, verbose=True)
Пример #8
0
from pyiri2016 import IRI2016Profile
#
import numpy as np
from matplotlib.pyplot import figure, show
""" Height Profile Example """

lat = -11.95
lon = -76.77
time = '2003-11-21T12'
altlim = [90., 200.]
altstp = 2.

sim = IRI2016Profile(altlim=altlim,
                     altstp=altstp,
                     lat=lat,
                     lon=lon,
                     time=time,
                     option='vertical',
                     verbose=False)

altbins = np.arange(altlim[0], altlim[1] + altstp, altstp)

index = range(altbins.size)

fig = figure(figsize=(16, 6))
axs = fig.subplots(1, 2)

ne = sim.a[0, index]

nO2p = sim.a[7, index] * ne * 1e-2
nNOp = sim.a[8, index] * ne * 1e-2