This module runs the raytracing code
Note
The ray tracing requires mpi to run. You can adjust the number of processors, but be wise about it and do not assign more than you have
Store and process electron density profiles after ray tracing
Plot electron density profile
# Show electron density profile
import datetime as dt
from models import raydarn
sTime = dt.datetime(2012, 11, 18, 5)
rto = raydarn.RtRun(sTime, rCode='bks', beam=12)
rto.readEdens() # read electron density into memory
ax, aax, cbax = rto.ionos.plot(sTime, title=True)
ax.grid()
written by Sebastien, 2013-04
Store and process individual rays after ray tracing
Plot ray paths
# Show ray paths with colored refractive index along path
import datetime as dt
from models import raydarn
sTime = dt.datetime(2012, 11, 18, 5)
rto = raydarn.RtRun(sTime, rCode='bks', beam=12, title=True)
rto.readRays() # read rays into memory
ax, aax, cbax = rto.rays.plot(sTime, step=10, showrefract=True, nr_lim=[.85,1])
ax.grid()
written by Sebastien, 2013-04
This class runs the raytracing code and processes the output
# Run a 2-hour ray trace from Blackstone on a random day
sTime = dt.datetime(2012, 11, 18, 5)
eTime = sTime + dt.timedelta(hours=2)
radar = 'bks'
# Save the results to your /tmp directory
rto = raydarn.RtRun(sTime, eTime, rCode=radar, outDir='/tmp')
Read edens.dat fortran output
Read rays.dat fortran output into dictionnary
Stores and process ground and ionospheric scatter
Plot scatter on ground/altitude profile
# Show ionospheric scatter
import datetime as dt
from models import raydarn
sTime = dt.datetime(2012, 11, 18, 5)
rto = raydarn.RtRun(sTime, rCode='bks', beam=12)
rto.readRays() # read rays into memory
ax, aax, cbax = rto.rays.plot(sTime, title=True)
rto.readScatter() # read scatter into memory
rto.scatter.plot(sTime, ax=ax, aax=aax)
ax.grid()
written by Sebastien, 2013-04
alias of models.raydarn.rt