trmfun_module Module

Trapped radiation model.

History

  • Based on: trmfun.for 1987

Uses

  • module~~trmfun_module~~UsesGraph module~trmfun_module trmfun_module module~radbelt_kinds_module radbelt_kinds_module module~trmfun_module->module~radbelt_kinds_module iso_fortran_env iso_fortran_env module~radbelt_kinds_module->iso_fortran_env

Used by

  • module~~trmfun_module~~UsedByGraph module~trmfun_module trmfun_module module~radbelt_module radbelt_module module~radbelt_module->module~trmfun_module module~radbelt_c_module radbelt_c_module module~radbelt_c_module->module~radbelt_module

Variables

Type Visibility Attributes Name Initial
character(len=10), private, parameter, dimension(4) :: mname = ['ae8min.asc', 'ae8max.asc', 'ap8min.asc', 'ap8max.asc']

data files available


Derived Types

type, public ::  trm_type

main class for the aep8 model

Components

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 tra2

real(kind=wp), private :: f1 = 1.001_wp
real(kind=wp), private :: f2 = 1.002_wp

Type-Bound Procedures

procedure, public :: aep8 ../../

main routine

procedure, public :: trara2 ../../

low-level routine

procedure, public :: trara1
procedure, public :: get_data_file_dir
procedure, public :: set_data_file_dir

Functions

private function get_data_file_dir(me) result(dir)

Get the directory containing the data files.

Arguments

Type IntentOptional Attributes Name
class(trm_type), intent(in) :: me

Return Value character(len=:), allocatable

private function trara2(me, map, il, ib)

trara2 interpolates linearly in l-b/b0-map to obtain the logarithm of integral flux at given l and b/b0.

Read more…

Arguments

Type IntentOptional 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

Return Value real(kind=wp)

scaled logarithm of particle flux


Subroutines

private subroutine set_data_file_dir(me, dir)

Set the directory containing the data files.

Arguments

Type IntentOptional Attributes Name
class(trm_type), intent(inout) :: me
character(len=*), intent(in) :: dir

private subroutine aep8(me, e, l, bb0, imname, flux)

Main wrapper for the radiation model. Reads the coefficient file and calls the low-level routine.

Arguments

Type IntentOptional 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 mname array)

real(kind=wp), intent(out) :: flux

private subroutine trara1(me, descr, map, fl, bb0, e, f, n)

trara1 finds particle fluxes for given energies, magnetic field strength and l-value. function trara2 is used to interpolate in b-l-space.

Arguments

Type IntentOptional 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