main class for the aep8
model
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | private, | allocatable | :: | aep8_dir |
directory containing the data files |
||
character(len=:), | private, | allocatable | :: | file_loaded |
the file that has been loaded |
||
integer, | private, | dimension(8) | :: | ihead | = | 0 | |
integer, | private, | dimension(:), allocatable | :: | map | |||
real(kind=wp), | private | :: | fistep | = | 0.0_wp |
the stepsize for the parameterization of the logarithm of flux.
formerly stored in common block |
|
real(kind=wp), | private | :: | f1 | = | 1.001_wp | ||
real(kind=wp), | private | :: | f2 | = | 1.002_wp |
main routine
Main wrapper for the radiation model. Reads the coefficient file and calls the low-level routine.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(trm_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | e | |||
real(kind=wp), | intent(in) | :: | l | |||
real(kind=wp), | intent(in) | :: | bb0 | |||
integer, | intent(in) | :: | imname |
which model to load (index in |
||
real(kind=wp), | intent(out) | :: | flux |
low-level routine
trara2 interpolates linearly in l-b/b0-map to obtain the logarithm of integral flux at given l and b/b0.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(trm_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | map(*) |
is sub-map (for specific energy) of trapped radiation model map |
||
integer, | intent(in) | :: | il |
scaled l-value |
||
integer, | intent(in) | :: | ib |
scaled b/b0-1 |
scaled logarithm of particle flux
trara1 finds particle fluxes for given energies, magnetic field strength and l-value. function trara2 is used to interpolate in b-l-space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(trm_type), | intent(inout) | :: | me | |||
integer, | intent(in) | :: | descr(8) |
header of specified trapped radition model |
||
integer, | intent(in) | :: | map(*) |
map of trapped radition model (descr and map are explained at the begin of the main program model) |
||
real(kind=wp), | intent(in) | :: | fl |
l-value |
||
real(kind=wp), | intent(in) | :: | bb0 |
=b/b0 magnetic field strength normalized to field strength at magnetic equator |
||
real(kind=wp), | intent(in) | :: | e(n) |
array of energies in mev |
||
real(kind=wp), | intent(out) | :: | f(n) |
decadic logarithm of integral fluxes in particles/(cmcmsec) |
||
integer, | intent(in) | :: | n |
number of energies |
Get the directory containing the data files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(trm_type), | intent(in) | :: | me |
Set the directory containing the data files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(trm_type), | intent(inout) | :: | me | |||
character(len=*), | intent(in) | :: | dir |
type, public :: trm_type !! main class for the `aep8` model private character(len=:), allocatable :: aep8_dir !! directory containing the data files ! data read from the files: character(len=:), allocatable :: file_loaded !! the file that has been loaded integer, dimension(8) :: ihead = 0 integer, dimension(:), allocatable :: map real(wp) :: fistep = 0.0_wp !! the stepsize for the parameterization of the logarithm of flux. !! formerly stored in common block `tra2` ! formerly saved variables in trara1: real(wp) :: f1 = 1.001_wp real(wp) :: f2 = 1.002_wp contains private procedure, public :: aep8 !! main routine procedure, public :: trara1, trara2 !! low-level routine procedure, public :: set_data_file_dir, get_data_file_dir end type trm_type