ntime: long integer number of time in arrays (max allowed is NTIME_MAX)
nipa: long integer number of pitch angles in arrays (max allowed is NALPHA_MAX)
kext: long integer to select external magnetic
field
options: array(5) of long integer to set some control options on computed values
sysaxes, sysaxesIN, and sysaxesOUT: long integer to define which coordinate
system is provided in
iyear, iyr or iyearsat: array(NTIME_MAX) of long integer year when
measurements are given. /font>
x1: array(NTIME_MAX) of double, first coordinate
according to sysaxes. If sysaxes is 0 then altitude has to be in km otherwise use
dimensionless variables (in Re)
x2: array(NTIME_MAX) of double, second coordinate
according to sysaxes. If sysaxes is 0 then latitude has to be in degrees otherwise
use dimensionless variables (in Re)
x3: array(NTIME_MAX) of double, third coordinate
according to sysaxes. If sysaxes is 0 then longitude has to be in degrees otherwise
use dimensionless variables (in Re).
alpha: array(NALPHA_MAX) double, pitch-angle at input
location (in degres).
R0: double, radius, in Re, of the minimum allowed radial
distance along the drift orbit (use R0 < 1) for the drift loss cone.
maginput: array (25,NTIME_MAX) of double to specify
magnetic fields inputs such as:
Lm: L McIlwain (array(NTIME_MAX,NALPHA_MAX) of double)
IMPORTANT: When using a non dipole field Lm is
pitch-angle dependent because of the McIlwain L definition which has some limitation
but this dependency has nothing to do with shell-splitting!
POSIT: (note: size
varies. Changes from what's given here will be provided in the
function definitions). xGEO,yGEO and zGEO along the drift
shell, (array(3,1000,48) of double)
Note: Posit is organized as follow: array(xyz,along
bounce,drift index). Nposit tells how many of the 1000 (or 3000) points available are used to
described one bounce.
idoy: array(NTIME_MAX) of long integer doy when
measurements are given
UT or secs: array(NTIME_MAX) of double, UT in seconds
Note: In matlab, year/doy/UT arguments are replaced by the single matlabd argument, which is a Matlab date numbers (a double precision day counter created with datenum). They can be generated, if needed, using the helper function [iyear,idoy,UT] = onera_desp_lib_matlabd2yds(matlabd).
where the <> mean an average over the previous
1 hour, Vsw is the solar wind speed, Dsw is the solar wind density, Bs=|IMF Bz| when
IMF Bz < 0 and Bs=0 when IMF Bz > 0.
Blocal: magnitude of magnetic field at point (array(NTIME_MAX,NALPHA_MAX)
of double) - [nT]
Bmir or Bmirror: magnitude of magnetic field at mirror point (array(NTIME_MAX,NALPHA_MAX)
of double) - [nT]
Bmin: magnitude of magnetic field at equator
(array(NTIME_MAX,NALPHA_MAX) of double) - [nT]
XJ: I, related to second adiabatic invariant
(array(NTIME_MAX,NALPHA_MAX) of double) - [Re]
MLT: magnetic local time in hours, (array(NTIME_MAX,NALPHA_MAX)
of double) - [hour]
1st element:
x, y, z GEO coord, 2nd element: points along field line, 3rd
element: number of field lines. Note, sometimes the long
dimension is 3000 rather than 1000; see specific functions for
clarification.
Nposit: (note: size
varies. Changes from what's given here will be provided in the
function definitions) long integer array (48) providing the
number of points along the field line for each field line
traced in 2nd element of POSIT array (max 1000 for some functions, 3000 for others).
Comments on adiabatic invariants:
J2=2*p*I/(2*π) where p is the particle momemtum - [kg m2 s-2 Re]
J3=q/(2*π) *Φ - [C nT Re2]
Below is provided an chart explaining the logic for the coding of Lm and Lstar
from the routine:
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
see Common Argument Definitions
see Common Argument Definitions
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
hmin: double, minimum altitude, GDZ, km, along the drift orbit
hmin_lon: double, longitude, GDZ, degrees, at hmin.
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
see Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
POSIT: xGEO,yGEO and zGEO of the magnetic equator location, (array(3) of double)
See Common Argument Definitions
stop_alt: double, desired altitude of field-line crossing, km.
hemi_flag: long integer, hemisphere flag.
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
See Common Argument Definitions
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
See Common Argument Definitions
dX: dX is the step size, in RE for the numerical derivatives (recommend 1E-3), double scalar.
IMPORTANT: all inputs must be present. For those which are not used a dummy value can be provided.
See Common Argument Definitions
R0: double, specifies radius of reference surface between which field line is traced.
See Common Argument Definitions
POSIT is (3,3000), Nposit is a scalar.
See Common Argument Definitions
ds: double, Integration step along field line (in Re).
See Common Argument Definitions
POSIT is (3,3000), Nposit is a scalar.
See Common Argument Definitions
IMPORTANT: all inputs must be present. For those which are not used a dummy value can be provided.
See Common Argument Definitions
NOTE: options does not support user-supplied internal field model.
whichinv: long integer to select which conversion
to perform
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
Phi: Φ=2π*Bo/Lstar [nT Re2]
(array(GET_IRBEM_NTIME_MAX()) of double)
see Common Argument Definitions
sysaxesIN: long integer indicating input
coordinates system
IMPORTANT: all inputs must be present. For those
which are not used a dummy value can be provided.
GDZ (0)
GEO (1)
GSM (2)
GSE (3)
SM(4)
GEI(5)
MAG (6)
SPH(7)
RLL(8)
HEE (9)
HAE(10)
HEEQ (11)
GDZ (0)
GEO (1)
GSM (2)
GSE (3)
SM (4)
GEI (5)
MAG (6)
SPH (7)
RLL (8)
HEE (9)
HAE (10)
Table: Available coordinates transformation:
sysaxesOUT : long integer indicating
output coordinates system
xIN : array (3,NTIME_MAX) of double with position
in input coordinates system.
Input
Output
HEEQ (11)
⇒Transformation
implemented
⇒Will
not crash but not very usefull
⇒Not
implemented
OUTPUTS:
xOUT : array (3,NTIME_MAX) of double with position
in output coordinates system. (systems defined by sysaxesOUT)
CALLING SEQUENCE FROM MATLAB:
Y=onera_desp_lib_coord_trans(X,rotation,matlabd)
CALLING SEQUENCE from IDL:
result = call_external(lib_name, 'coord_trans_vec_',
ntime,sysaxesIN,sysaxesOUT,iyr,idoy,secs,xIN,xOUT, /f_value)
CALLING SEQUENCE from FORTRAN:
call coord_trans_vec1(ntime,sysaxesIN,sysaxesOUT,iyr,idoy,secs,xIN,xOUT)
Routine to transform Cartesian GEO to cartesian GSM
coordinates
iyr : long integer year
idoy : long integer day of year
secs : UT in seconds - double
xGEO : 3D array (double) of cartesian position
in GEO (Re)
psi : angle for GSM coordinate - double
xGSM : 3D array (double) of cartesian position in GSM (Re)
xGSM = onera_desp_lib_rotate(xGEO,'geo2gsm',matlabd);
[xGSM,psi] = onera_desp_lib_rotate(xGEO,'geo2gsm',matlabd);
result = call_external(lib_name, 'geo2gsm_', iyr,idoy,secs,psi,xGEO,xGSM,
/f_value)
call geo2gsm1(iyr,idoy,secs,psi,xGEO,xGSM)
DAY: Number of day of the month. - long
YEAR: Number of the desired year.Year parameters
must be valid values from the civil calendar. Years B.C.E. are represented as negative
integers. Years in the common era are represented as positive integers. In particular,
note that there is no year 0 in the civil calendar. 1 B.C.E. (-1) is followed by 1
C.E. (1). - long
DAY: Number of day of the month. - long
YEAR: Number of the desired year. - long
DAY: Number of day of the month.
YEAR: Number of the desired year.Year parameters
must be valid values from the civil calendar. Years B.C.E. are represented as negative
integers. Years in the common era are represented as positive integers. In particular,
note that there is no year 0 in the civil calendar. 1 B.C.E. (-1) is followed by 1
C.E. (1).
MONTH: Number month (1 = January, ..., 12 = December). - long
DAY: Number of day of the month. - long
DOY: Number of day of year (DOY=1 is for January 1st) - long
HOUR, MINUTE and SECOND: Universal time in the day - long
UT: Univeral time in seconds - double
MONTH: Number month (1 = January, ..., 12 = December). - long
DAY: Number of day of the month. - long
HOUR, MINUTE and SECOND: Universal time in the day - long
DOY: Number of day of year (DOY=1 is for January 1st) - long
UT: Universal time in seconds - double
Month : Number month (1 = January, ..., 12 = December). - long
Day : Number of day of the month - long
HOUR, MINUTE and SECOND: Universal
time in the day - long
sysaxes: long integer to define which coordinate
system is provided in
whichm: long integer to select in which NASA
model to fly
whichm | Model | |
---|---|---|
1 | = | AE8 MIN |
2 | = | AE8 MAX |
3 | = | AP8 MIN |
4 | = | AP8 MAX |
-1 | = | AE8 MIN - ESA Interpolation |
-2 | = | AE8 MAX - ESA Interpolation |
-3 | = | AP8 MIN - ESA Interpolation |
-4 | = | AP8 MAX - ESA Interpolation |
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 25)
energy: array(2,25) of double. If whatf=1 or
3 then energy(2,*) is not considered.
Note: if energy is
in MeV then differential flux will be per MeV.
iyear: array(GET_IRBEM_NTIME_MAX()) of long integer year when positions
are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8.
idoy: array(GET_IRBEM_NTIME_MAX()) of long integer doy when positions are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8.
UT: array(GET_IRBEM_NTIME_MAX()) of double, UT in seconds when positions are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8
x1: array(GET_IRBEM_NTIME_MAX()) of double, first coordinate according to sysaxes. If sysaxes is 0 then altitude has to be in km otherwise use dimensionless variables (in Re)
x2: array(GET_IRBEM_NTIME_MAX()) of double, second coordinate according to sysaxes. If sysaxes is 0 then latitude has to be in degrees otherwise use dimensionless variables (in Re)
x3: array(GET_IRBEM_NTIME_MAX()) of double, third coordinate according to sysaxes. If sysaxes is 0 then East longitude has to be in degrees otherwise use dimensionless variables (in Re).
This function allows one to compute NASA AE8 min/max
and AP8 min/max flux for any B/Bo, L position.
The output can be differential flux or flux within an energy range or integral flux.
ntime: long integer number of points in arrays (max allowed is GET_IRBEM_NTIME_MAX())
whichm: long integer to select in which NASA
model to fly
whichm | Model | |
---|---|---|
1 | = | AE8 MIN |
2 | = | AE8 MAX |
3 | = | AP8 MIN |
4 | = | AP8 MAX |
-1 | = | AE8 MIN - ESA Interpolation |
-2 | = | AE8 MAX - ESA Interpolation |
-3 | = | AP8 MIN - ESA Interpolation |
-4 | = | AP8 MAX - ESA Interpolation |
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 25)
energy: array(2,25) of double. If whatf=1 or
3 then energy(2,*) is not considered.
Note: if energy is
in MeV then differential flux will be per MeV.
BBo: array(GET_IRBEM_NTIME_MAX()) of double. Provide B/Bequator
for all position where to compute the fluxes. Note that the Jensen and Cain 1960 magnetic
field model must be used for any call to AE8min, AE8max, AP8min and GSFC 1266 (extended
to year 1970) for any call to AP8max.
L: array(GET_IRBEM_NTIME_MAX()) of double. Provide McIlwain
L for all position where to compute the fluxes. Note that the Jensen
and Cain 1960 magnetic field model must be used for any call to AE8min, AE8max, AP8min
and GSFC 1266 (extended to year 1970) for any call to AP8max.
flux: flux according to selection of whatf for
all times and energies (array(GET_IRBEM_NTIME_MAX(),25) of double)
Flux = onera_desp_lib_get_ae8_ap8_flux(whichm,energy,BBo,L)
result = call_external(lib_name, 'get_ae8_ap8_flux_idl_', ntime,whichm,whatf,Nene,energy,BBo,L,,flux, /f_value)
CALL get_ae8_ap8_flux (ntime,whichm,whatf,Nene,energy,BBo,L,flux )
This function allows one to fly any spacecraft in AFRL
CRRESPRO and CRRESELE models.
The output can be differential flux or flux within an energy range or integral flux.
Caution: integral flux for electron are from E to 5.75 MeV and for proton are from E to 81.3 MeV.
To run CRRES models you have to set the full path for
the source code directory (where CRRES data files are located).
sysaxes: long integer to define which coordinate
system is provided in
whichm: long integer to select in which AFRL
CRRES model to fly
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 25)
energy: array(2,25) of double (MeV). If whatf=1
or 3 then energy(2,*) is not considered.
iyear: array(GET_IRBEM_NTIME_MAX()) of long integer year when positions
are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8.
idoy: array(GET_IRBEM_NTIME_MAX()) of long integer doy when positions are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8.
UT: array(GET_IRBEM_NTIME_MAX()) of double, UT in seconds when positions are given. Can be a dummy value for the following sysaxes values: 0,1,6,7,8.
x1: array(GET_IRBEM_NTIME_MAX()) of double, first coordinate according to sysaxes. If sysaxes is 0 then altitude has to be in km otherwise use dimensionless variables (in Re)
x2: array(GET_IRBEM_NTIME_MAX()) of double, second coordinate according to sysaxes. If sysaxes is 0 then latitude has to be in degrees otherwise use dimensionless variables (in Re)
x3: array(GET_IRBEM_NTIME_MAX()) of double, third coordinate according to sysaxes. If sysaxes is 0 then longitude has to be in degrees otherwise use dimensionless variables (in Re).
Ap15: array(GET_IRBEM_NTIME_MAX()) of double, preceding 15-day running average of Ap index assuming a one day delay. Array can be set to 0 if whichm non equal to 5.
path: byte array where the number of elements is the length of the string to be converted to byte, provides the path to locate the files which describe CRRES models. Note that the path should end by a "/" or "\" depending on your operating system. Before submitting the path it must me converted to byte array where each element is the ascii code for the corresponding character in the path.
path_len: long integer, provide here the length of the path string
CALL fly_in_afrl_crres1(ntime,sysaxes,whichm,whatf,Nene,energy,iyear,idoy, UT,x1,x2,x3,Ap15,flux,path,path_len)
This function allows one to compute AFRL CRRESPRO and
CRRESELE flux for any B/Bo, L position.
The output can be differential flux or flux within an energy range or integral flux.
Caution: integral flux for electron are from E to 5.75 MeV and for proton are from E to 81.3 MeV.
To run CRRES models you have to set the full path for
the source code directory (where CRRES data files are located).
ntime: long integer number of points in arrays (max allowed is GET_IRBEM_NTIME_MAX())
whichm: long integer to select in which AFRL
CRRES model to fly
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 25)
energy: array(2,25) of double (MeV). If whatf=1
or 3 then energy(2,*) is not considered.
BBo: array(GET_IRBEM_NTIME_MAX()) of double. Provide B/Bequator
for all position where to compute the fluxes. Note that the IGRF1985 magnetic field
model must be used.
L: array(GET_IRBEM_NTIME_MAX()) of double. Provide McIlwain L for all position where to compute the fluxes. Note that the IGRF1985 magnetic field model must be used.
Ap15: array(GET_IRBEM_NTIME_MAX()) of double, preceding 15-day running average of Ap index assuming a one day delay. Array can be set to 0 if whichm non equal to 5.
path: byte array where the number of elements is the length of the string to be converted to byte, provides the path to locate the files which describe CRRES models. Note that the path should end by a "/" or "\" depending on your operating system. Before submitting the path it must me converted to byte array where each element is the ascii code for the corresponding character in the path.
path_len: long integer, provide here the length of the path string
flux: flux according to selection of whatf for
all times and energies (array(GET_IRBEM_NTIME_MAX(),25) of double)
Flux = onera_desp_lib_get_crres_flux(whichm,energy,BBo,L,Ap15,crres_path)
result = call_external(lib_name, 'get_crres_flux_idl_', ntime,whichm,whatf,Nene,energy,BBo,L,Ap15,flux,path,path_len, /f_value)
CALL get_crres_flux(ntime,whichm,whatf,Nene,energy,BBo,L,Ap15,flux,path,path_len)
This function allows one to fly any geostationary spacecraft in IGE (International Geostationary Electron) models. The use of the model is limited to geostationary altitude as it is based on LANL-GEO bird series (1976 to 2006) and JAXA-DRTS spacecraft (added in IGE2006). Three versions of the model are provided:
Note that POLE stands for Particle-ONERA-LANL-Electrons
The output can be differential flux or flux within an energy range or integral flux.
Caution: integral flux for electron are from E to Emax
of the given selected model. So one should be very carrefull when looking at
integral fluxes with POLE-V1 .
launch_year: year of spacecraft start of life in space - long integer
mission_duration: duration of the mission (number
of years) - long integer
whichm: long integer to select in which IGE
model to fly
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 50). If Nene =0 then a default energy grid is being used. The number of default channels is then returned in Nene.
energy: array(2,50) of double (MeV). If whatf=1
or 3 then energy(2,*) is not considered. If Nene=0 then the default energies are returned
(in energy(1,1:Nene) in fortran or in energy(0,0:Nene-1)).
Lower_flux: Lower flux according to selection of whatf for all energies averaged over entire mission duration - This has to be considered as a lower envelop to bound expected flux at GEO for any solar cycle (array(50) of double)
Mean_flux: Mean flux according to selection of whatf for all energies averaged over entire mission duration - This spectrum is an averaged expected flux at GEO for any solar cycle , no margins are included at this point(array(50) of double)
Upper_flux: Upper flux according to selection of whatf for all energies averaged over entire mission duration - This has to be considered as an upper envelop for expected flux at GEO for any solar cycle, this spectrum can be used for any conservative approach as margins are included at this point. Note that the margins are enrgy depended and can be assesed by looking at Upper_flux/Mean_flux (array(50) of double)
Note: all flux are expressed in MeV-1 cm-2 s-1 sr-1 for differential flux or in cm-2 s-1 sr-1 for integrated flux. To derive omnidirectional flux at GEO one should multiply these flux values by 4π.
[Lower_flux,Mean_flux,Upper_flux] = onera_desp_lib_fly_in_ige(launch_year,mission_duration,whichm,whatf,energy)
result = call_external(lib_name, 'fly_in_ige_', launch_year,mission_duration,whichm,whatf,Nene,energy,Lower_flux,Mean_flux,Upper_flux, /f_value)
CALL fly_in_ige1(launch_year,mission_duration,whichm,whatf,Nene,energy,Lower_flux,Mean_flux,Upper_flux)
This function allows one to fly any MEO GNSS type spacecraft in MEO ONERA models. The use of the model is limited to GPS altitude (~20000 km - 55° inclination) as it is based on LANL-GPS bird series (1990 to 2006). Two versions of the model are provided:
The output can be differential flux or flux within an energy range or integral flux.
launch_year: year of spacecraft start of life in space - long integer
mission_duration: duration of the mission (number
of years) - long integer
whichm: long integer to select in which MEO
model to fly
whatf: long integer to select what flux to compute
Nene: long integer number of energies in array energy (max allowed is 50). If Nene =0 then a default energy grid is being used. The number of default channels is then returned in Nene.
energy: array(2,50) of double (MeV). If whatf=1
or 3 then energy(2,*) is not considered. If Nene=0 then the default energies are returned
(in energy(1,1:Nene) in fortran or in energy(0,0:Nene-1)).
Lower_flux: Lower flux according to selection of whatf for all energies averaged over entire mission duration - This has to be considered as a lower envelop to bound expected flux at MEO-GNSS for any solar cycle (array(50) of double)
Mean_flux: Mean flux according to selection of whatf for all energies averaged over entire mission duration - This spectrum is an averaged expected flux at MEO-GNSS for any solar cycle , no margins are included at this point(array(50) of double)
Upper_flux: Upper flux according to selection of whatf for all energies averaged over entire mission duration - This has to be considered as an upper envelop for expected flux at MEO-GNSS for any solar cycle, this spectrum can be used for any conservative approach as margins are included at this point. Note that the margins are enrgy depended and can be assesed by looking at Upper_flux/Mean_flux (array(50) of double)
Note: all flux are expressed in MeV-1 cm-2 s-1 sr-1 for differential flux or in cm-2 s-1 sr-1 for integrated flux. To derive omnidirectional flux at MEO-GNSS one should multiply these flux values by 4π.
[Lower_flux,Mean_flux,Upper_flux] = onera_desp_lib_fly_in_meo_gnss(launch_year,mission_duration,whichm,energy)
result = call_external(lib_name, 'fly_in_meo_gnss_', launch_year,mission_duration,whichm,whatf,Nene,energy,Lower_flux,Mean_flux,Upper_flux, /f_value)
CALL fly_in_meo_gnss1(launch_year,mission_duration,whichm,whatf,Nene,energy,Lower_flux,Mean_flux,Upper_flux)
The Mass-Spectrometer-Incoherent-Scatter-1986 (MSIS-86) neutral atmosphere model describes the neutral temperature and the densities of He, O, N2, O2, Ar, H, and N. The MSIS model is based on the extensive data compilation and analysis work of A. E. Hedin and his collaborators [A. E. Hedin et al., J. Geophys. Res. 82, 2139-2156, 1977; A. E. Hedin, J. Geophys. Res. 88, 10170- 10188, 1983; A. E. Hedin, J. Geophys. Res. 92, 4649, 1987]. MSIS-86 constitutes the upper part of the COSPAR International Reference Atmosphere (CIRA-86).
Data sources for the present model include temperature and density measurements from several rockets, satellites (OGO-6, San Marco 3, Aeros-A, AE-C, AE-D, AE-E, ESRO 4 and DE-2) and incoherent scatter radars (Millstone Hill, St. Santin, Arecibo, Jicamarca, and Malvern). Since the MSIS-83 model, terms were added or changed to better represent seasonal variations in the polar regions under both quiet and magnetically disturbed conditions and local time variations in the magnetic activity effect. In addition a new species, atomic nitrogen, was added to the list of species covered by the model.
Ntime: long integer number of time in arrays (max allowed is GET_IRBEM_NTIME_MAX())
WhichAp: long integer to select the kind
of Ap input:
DOY: array(GET_IRBEM_NTIME_MAX()) of long integer, Number of day of year (DOY=1 is for January 1st)
UT: array(GET_IRBEM_NTIME_MAX()) of double, UT in seconds when positions are given..
Alt: array(GET_IRBEM_NTIME_MAX()) of double, Altitude in km (greater than 85 km).
Lat: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic latitude (Deg.)
Long: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic longitude (Deg.)
F107A: array(GET_IRBEM_NTIME_MAX()) of double, 3 month average of F10.7 flux.
F107: array(GET_IRBEM_NTIME_MAX()) of double, daily F10.7 flux for previous day.
Ap: array(7,GET_IRBEM_NTIME_MAX()) of double where:
Dens: array(8,GET_IRBEM_NTIME_MAX()) of double where:
Temp: array(2,GET_IRBEM_NTIME_MAX()) of double where:
out = onera_desp_lib_msis('msis86',date,X,sysaxes,F107A,F107,Ap)
result = call_external(lib_name, 'msis86_idl_', ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp, /f_value)
CALL msis86(ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp)
The MSISE model describes the neutral temperature and densities in Earth's atmosphere from ground to thermospheric heights. Below 72.5 km the model is primarily based on the MAP Handbook (Labitzke et al., 1985) tabulation of zonal average temperature and pressure by Barnett and Corney, which was also used for the CIRA-86. Below 20 km these data were supplemented with averages from the National Meteorological Center (NMC). In addition, pitot tube, falling sphere, and grenade sounder rocket measurements from 1947 to 1972 were taken into consideration. Above 72.5 km MSISE-90 is essentially a revised MSIS-86 model taking into account data derived from space shuttle flights and newer incoherent scatter results. For someone interested only in the thermosphere (above 120 km), the author recommends the MSIS-86 model. MSISE is also not the model of preference for specialized tropospheric work. It is rather for studies that reach across several atmospheric boundaries.
Ntime: long integer number of time in arrays (max allowed is GET_IRBEM_NTIME_MAX())
WhichAp: long integer to select the kind
of Ap input:
DOY: array(GET_IRBEM_NTIME_MAX()) of long integer, Number of day of year (DOY=1 is for January 1st)
UT: array(GET_IRBEM_NTIME_MAX()) of double, UT in seconds when positions are given..
Alt: array(GET_IRBEM_NTIME_MAX()) of double, Altitude (km).
Lat: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic latitude (Deg.)
Long: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic longitude (Deg.)
F107A: array(GET_IRBEM_NTIME_MAX()) of double, 3 month average of F10.7 flux.
F107: array(GET_IRBEM_NTIME_MAX()) of double, daily F10.7 flux for previous day.
Ap: array(7,GET_IRBEM_NTIME_MAX()) of double where:
OUTPUTS:
Dens: array(8,GET_IRBEM_NTIME_MAX()) of double where:
Temp: array(2,GET_IRBEM_NTIME_MAX()) of double where:
out = onera_desp_lib_msis('msise90',date,X,sysaxes,F107A,F107,Ap)
result = call_external(lib_name, 'msise90_idl_', ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp, /f_value)
CALL msise90(ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp)
The NRLMSIS-00 empirical atmosphere model was developed by Mike Picone, Alan Hedin, and Doug Drob based on the MSISE90 model. The main differences to MSISE90 are noted in the comments at the top of the computer code. They involve (1) the extensive use of drag and accelerometer data on total mass density, (2) the addition of a component to the total mass density that accounts for possibly significant contributions of O+ and hot oxygen at altitudes above 500 km, and (3) the inclusion of the SMM UV occultation data on [O2]. The MSISE90 model describes the neutral temperature and densities in Earth's atmosphere from ground to thermospheric heights. Below 72.5 km the model is primarily based on the MAP Handbook (Labitzke et al., 1985) tabulation of zonal average temperature and pressure by Barnett and Corney, which was also used for the CIRA-86. Below 20 km these data were supplemented with averages from the National Meteorological Center (NMC). In addition, pitot tube, falling sphere, and grenade sounder rocket measurements from 1947 to 1972 were taken into consideration. Above 72.5 km MSISE-90 is essentially a revised MSIS-86 model taking into account data derived from space shuttle flights and newer incoherent scatter results. For someone interested only in the thermosphere (above 120 km), the author recommends the MSIS-86 model. MSISE is also not the model of preference for specialized tropospheric work. It is rather for studies that reach across several atmospheric boundaries.
Ntime: long integer number of time in arrays (max allowed is GET_IRBEM_NTIME_MAX())
WhichAp: long integer to select the kind
of Ap input:
DOY: array(GET_IRBEM_NTIME_MAX()) of long integer, Number of day of year (DOY=1 is for January 1st)
UT: array(GET_IRBEM_NTIME_MAX()) of double, UT in seconds when positions are given..
Alt: array(GET_IRBEM_NTIME_MAX()) of double, Altitude in km (greater than 85 km).
Lat: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic latitude (Deg.)
Long: array(GET_IRBEM_NTIME_MAX()) of double, Geodetic longitude (Deg.)
F107A: array(GET_IRBEM_NTIME_MAX()) of double, 3 month average of F10.7 flux.
F107: array(GET_IRBEM_NTIME_MAX()) of double, daily F10.7 flux for previous day.
Ap: array(7,GET_IRBEM_NTIME_MAX()) of double where:
OUTPUTS:
Dens: array(9,GET_IRBEM_NTIME_MAX()) of double where:
Temp: array(2,GET_IRBEM_NTIME_MAX()) of double where:
out = onera_desp_lib_msis('nrlmsise00',date,X,sysaxes,F107A,F107,Ap)
result = call_external(lib_name, 'nrlmsise00_idl_', ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp, /f_value)
CALL nrlmsise00(ntime,whichAp,DOY,UT,Alt,Lat,Lon,F107A,F107,Ap,Dens,Temp)
SGP4 stands for Simplified General Perturbation -4 and consists in an orbit propagator. This function allows one to propagate NORAD two lines elements (TLE sets can be found at http://celestrak.com/). More about SGP4 can be found at: http://celestrak.com/NORAD/documentation/spacetrk.pdf and at http://www.centerforspace.com/downloads/files/pubs/AIAA 2006-6753 Revisiting Spacetrack Report 3.pdf
Important notice: those who are running the library on Unix or linux system have to convert TLE files from NORAD from DOS to UNIX using the command : dos2unix file.tle newfile.tle . Also be aware that some TLE files contains random errors, like elements from another satellite, repeated elements, ... there are no specific filters implemented in the SGP4 function.
For those who are familiar with SGP4 code, be aware for one difference between orginal SGP4 code and the one provided here: input start and stop time and time step are not in minutes but in seconds. This was chosen for convenience.
runtype: long integer to select in which mode SGP4_TLE will run
startsfe: double giving start time in seconds from date provided in each TLE. This number can be negative. Note that this value is not use if runtype is equal to 0.
stopsfe: double giving stop time in seconds from date provided in
each TLE. This number can be negative. Note that this value is not use if runtype
is equal to 0.
deltasec: double giving step time in seconds to propagateTLE.
InFileByte: byte array where the number of elements is the length of the string to be converted to byte, provides the path and name to locate the input TLE to be propagated. Before submitting the path it must me converted to byte array where each element is the ascii code for the corresponding character in the path.
strlenIn: long integer providing the length of InFileByte string
OutFileByte: byte array where the number of elements is the length of the string to be converted to byte, provides the path and name to locate the output file. Before submitting the path it must me converted to byte array where each element is the ascii code for the corresponding character in the path.
strlenOut: long integer providing here the length
of OutFileByte string
None: They are provided in OutFileByte.
This file is composed of 6 columns:
The Matlab wrapper handles calculation of runtype strlenIn, OutfileByte, strlenOut. OutfileByte and strlenOut will be set appropriately for a temporary file (onera_desp_lib_sgp4_tle.tmp or onera_desp_lib_sgp4_tle.tmp.####). The wrapper reads the library routine's output from the temporary file and passes it back as a Matlab structure. The temporary file is deleted, so the Matlab structure is the only result of a successful call to sgp4_tle. In order to avoid a memory overflow for very long TLE runs, it is possible to leave the output in a text file (as in the FORTRAN call): the syntax is then onera_desp_lib_sgp4_tle(InFile,OutFile)
pos = onera_desp_lib_sgp4_tle(InFileByte) %implies runtype=0
pos = onera_desp_lib_sgp4_tle(startsfe,stopsfe,deltasec,InFileByte) %implies runtype=1
result = call_external(lib_name, 'sgp4_tle_', runtype,startsfe,stopsfe,deltasec,InFileByte,strlenIn,OutFileByte,strlenOut, /f_value)
CALL sgp4_tle1(runtype,startsfe,stopsfe,deltasec,InFileByte,strlenIn,OutFileByte,strlenOut)
SGP4 stands for Simplified General Perturbation -4 and consists in an orbit propagator. This function allows one to produce orbit coordinates from different types of orbital elements... More about SGP4 can be found at: http://celestrak.com/NORAD/documentation/spacetrk.pdf and at http://www.centerforspace.com/downloads/files/pubs/AIAA 2006-6753 Revisiting Spacetrack Report 3.pdf
For those who are familiar with SGP4 code, be aware for one difference between orginal SGP4 code and the one provided here: input start and stop time and time step are not in minutes but in seconds. This was chosen for convenience.
sysaxesOUT: long integer to define which coordinate
system is provided out
year: long integer giving start year of start date
month: long integer giving start month of start date
day: long integer giving start day of month of start date.
hour: long integer giving start hour of start time.
minute: long integer giving start minute of start time.
sec: double giving start seconds of start time.
e1: double see detailed definition according to options array.
e2: double see detailed definition according to options array.
e2: double see detailed definition according to options array.
e4: double see detailed definition according to options array.
e5: double see detailed definition according to options array.
e6: double see detailed definition according to options array.
options: array(5) of long integer to define which type
of element is provided in
Case options(1st element)
of:
startsfe: double giving start time in seconds from date provided before. This number can be negative.
stopsfe: double giving stop time in
seconds from date provided before. This number can be negative.
deltasec: double giving step time
in seconds to produce orbit outputs.
OUTyear: array of long integer(GET_IRBEM_NTIME_MAX()) giving
output year for each orbital locations
OUTdoy: array of long integer(GET_IRBEM_NTIME_MAX()) giving
output day of year for each orbital locations
UT: array of double(GET_IRBEM_NTIME_MAX()) giving output UT (seconds) for each orbital locations
X1: array of double(GET_IRBEM_NTIME_MAX()) giving
first coordinate of orbit according to sysaxes
X2: array of double(GET_IRBEM_NTIME_MAX()) giving second coordinate of orbit according to sysaxes
X3: array of double(GET_IRBEM_NTIME_MAX()) giving third
coordinate of orbit according to sysaxes
pos = onera_desp_lib_sgp4_ele([e1,e2,e3,e4,e5,e6],startdate,enddate,deltasec,sysaxesOUT)
result = call_external(lib_name, 'sgp4_ele_', sysaxesOUT,year,month,day,hour,minute,sec, e1,e2,e3,e4,e5,e6,options,startsfe,stopsfe,deltasec,OUTyear,OUTdoy,UT,X1,X2,X3, /f_value)
CALL sgp4_ele1(sysaxesOUT,year,month,day,hour,minute,sec,
e1,e2,e3,e4,e5,e6,options,startsfe,stopsfe,deltasec,OUTyear,OUTdoy,UT,X1,X2,X3)
This function finds the classical orbital elements given the Geocentric Equatorial Position and Velocity vectors. It comes from SGP4 distribution. SGP4 stands for Simplified General Perturbation -4 and consists in an orbit propagator. More about SGP4 can be found at: http://celestrak.com/NORAD/documentation/spacetrk.pdf and at http://www.centerforspace.com/downloads/files/pubs/AIAA 2006-6753 Revisiting Spacetrack Report 3.pdf
R: array(3) of double. Position vector in GEI (km)
V: array(3) of double. Velocity vector in GEI (km/s).
P: double. SemiLatus rectum (km)
A: double. Semimajor axis (km)
Ecc: double. Eccentricity
Incl: double. Inclination (rad)
Omega: double. Longitude of ascending node (rad)
Argp: double. Argument of perigee (rad)
Nu: double. True anomaly (rad)
M: double. Mean anomaly (rad)
ArgLat: double. Argument of latitude (rad)
LamTrue: double. True longitude (rad)
LonPer: double. Longitude of Periapsis
(rad)
elements=onera_desp_lib_rv2coe(R,V)
result = call_external(lib_name, 'rv2coe_idl_', R,V,P,A,Ecc,Incl,Omega,Argp,Nu,M,ArgLat,LamTrue,LonPer, /f_value)
CALL rv2coe(R,V,P,A,Ecc,Incl,Omega,Argp,Nu,M,ArgLat,LamTrue,LonPer)
rls = BYTARR(80)
SHIELDOSE2 [Seltzer, 1994] is a computer code for
space-shielding radiation dose calculations. It determines the absorbed dose as a
function of depth in aluminium shielding material of spacecraft, given the electron
and proton fluences encountered in orbit. The code makes use of precalculated,
mono-energetic depth-dose data for an isotropic, broad-beam fluence of radiation
incident on uniform aluminium plane media. Such data are particularly suitable for
routine dose predictions in situations where the geometrical and compositional
complexities of the spacecraft are not known. Furthermore, the restriction to these
rather simple geometries has allowed for the development of accurate electron and
electron-bremsstrahlung data sets based on detailed transport calculations rather
than on more approximate methods.
SHIELDOSE2 calculates, for arbitrary proton and electron incident spectra,
the dose absorbed in small volumes of different detector materials for the
following aluminium shield geometries:
IDET: long integer to set the index of the detector type:
INUC: long integer to indicate the nuclear interaction to account for:
IMAX: long integer to set the number of shielding depth (max allowed=71). It is recommended to set this number close to maximum allowed value to compute accurate doses in semi-infinite aluminium medium and at center of aluminium spheres.
IUNT: long integer to set the shielding depth unit
Zin: double array(71) of thickness in unit of IUNT. Below is provided a reasonable thickness array in g/cm2 with IMAX=70
data Zin /1.000E-06,2.000E-06,5.000E-06,1.000E-05,2.000E-05,5.000E-05,1.000E-04,2.000E-04,&
5.000E-04,1.000E-03,1.000E-01,2.000E-01,5.000E-01,7.000E-01,1.000E+00,1.250E+00,&
1.500E+00,1.750E+00,2.000E+00,2.500E+00,3.000E+00,3.500E+00,4.000E+00,4.500E+00,&
5.000E+00,6.000E+00,7.000E+00,8.000E+00,9.000E+00,1.000E+01,1.100E+01,1.200E+01,&
1.300E+01,1.400E+01,1.500E+01,1.600E+01,1.700E+01,1.800E+01,1.900E+01,2.000E+01,&
2.100E+01,2.200E+01,2.300E+01,2.400E+01,2.500E+01,2.600E+01,2.700E+01,2.800E+01,&
2.900E+01,3.000E+01,3.100E+01,3.200E+01,3.300E+01,3.400E+01,3.500E+01,3.600E+01,&
3.700E+01,3.800E+01,3.900E+01,4.000E+01,4.100E+01,4.200E+01,4.300E+01,4.400E+01,&
4.500E+01,4.600E+01,4.700E+01,4.800E+01,4.900E+01,5.000E+01,0.000E+00/
EminS: min energy of solar protons spectrum (double) [MeV]
EmaxS: max energy of solar protons spectrum (double) [MeV]
EminP: min energy of trapped protons spectrum (double) [MeV]
EmaxP: max energy of trapped protons spectrum (double) [MeV]
NPTSP: number of spectrum points which divides proton spectra for integration. A value of 1001 is recommended (long integer).
EminE: min energy of trapped electrons spectrum (double) [MeV]
EmaxE: max energy of trapped electrons spectrum (double) [MeV]
NPTSE: Number of spectrum points which divides electron spectra for integration. A value of 1001 is recommended (long integer).
JSMAX: Number of points in falling spectrum of solar protons, max allowed=301 (long integer).
JPMAX: Number of points in falling spectrum of trapped protons, max allowed=301 (long integer).
JEMAX: Number of points in falling spectrum of trapped electrons, max allowed=301 (long integer).
EUNIT: Conversion factor from /energy to /MeV; e.g. EUNIT = 1000 if flux is /keV (double).
DURATN: Mission duration in multiples of unit time [s] (double).
ESin: Energy array(301) of solar proton spectrum [MeV] (double).
SFLUXin: Solar flare flux array(301) for solar protons [in /energy/cm2] (double).
EPin: Energy array(301) of trapped proton spectrum [MeV] (double).
PFLUXin: Incident omnidirectional flux array(301) for trapped protons [in /energy/cm2/s] (double).
EEin: Energy array(301) of trapped electron spectrum [MeV] (double).
EFLUXin: Incident omnidirectional flux array(301) for trapped electrons [in /energy/cm2/s] (double).
SolDose: Dose profile array (71,3) for solar protons [rads] (double)
ProtDose: Dose profile array (71,3) for trapped protons [rads] (double)
ElecDose: Dose profile array (71,3) for trapped electrons [rads] (double)
BremDose: Dose profile array (71,3) for Bremsstrahlung [rads] (double)
TotDose: Total dose profile array (71,3) [rads] (double)
[ProtDose,ElecDose,BremDose,SolDose,TotDose] = onera_desp_lib_shieldose2(ProtSpect,ElecSpect,SolSpect,Target,...)
result = call_external(lib_name, 'shieldose2idl_', IDET,INUC,IMAX,IUNT,Zin,EMINS,EMAXS,EMINP,EMAXP,NPTSP,EMINE,EMAXE,NPTSE,JSMAX,JPMAX,JEMAX,EUNIT,DURATN,ESin,SFLUXin,EPin,PFLUXin,EEin,EFLUXin,SolDose,ProtDose,ElecDose,BremDose,TotDose,/f_value)
CALL shieldose2(IDET,INUC,IMAX,IUNT,Zin,EMINS,EMAXS,EMINP,EMAXP,NPTSP,EMINE,EMAXE,NPTSE,JSMAX,JPMAX,JEMAX,EUNIT,DURATN,ESin,SFLUXin,EPin,PFLUXin,EEin,EFLUXin,SolDose,ProtDose,ElecDose,BremDose,TotDose)