Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | private, | allocatable | :: | igrf_dir |
directory containing the data files |
||
real(kind=wp), | private, | dimension(3) | :: | sp | = | 0.0_wp | |
real(kind=wp), | private, | dimension(3) | :: | xi | = | 0.0_wp | |
real(kind=wp), | private, | dimension(144) | :: | h | = | 0.0_wp |
Field model coefficients adjusted for shellg |
integer, | private | :: | iyea | = | 0 |
the int year corresponding to the file |
|
character(len=:), | private, | allocatable | :: | name |
file name |
||
integer, | private | :: | nmax | = | 0 |
maximum order of spherical harmonics |
|
real(kind=wp), | private | :: | Time | = | 0.0_wp |
year (decimal: 1973.5) for which magnetic field is to be calculated |
|
real(kind=wp), | private, | dimension(144) | :: | g | = | 0.0_wp |
|
integer, | private | :: | nmax1 | = | 0 |
saved variables from the file |
|
integer, | private | :: | nmax2 | = | 0 |
saved variables from the file |
|
real(kind=wp), | private, | dimension(144) | :: | g_cache | = | 0.0_wp |
saved |
real(kind=wp), | private | :: | step | = | 0.20_wp |
step size for field line tracing |
|
real(kind=wp), | private | :: | steq | = | 0.03_wp |
step size for integration |
|
real(kind=wp), | private, | dimension(120) | :: | gh2 | = | 0.0_wp | |
real(kind=wp), | private, | dimension(:, :), allocatable | :: | p |
this was |
Alternate version of igrf for cartesian coordinates.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in), | dimension(3) | :: | v |
cartesian coordinates in earth radii (6371.2 km) x-axis pointing to equator at 0 longitude y-axis pointing to equator at 90 long. z-axis pointing to north pole |
|
real(kind=wp), | intent(in) | :: | year |
decimal year for which geomagnetic field is to be calculated (e.g.:1995.5 for day 185 of 1995) |
||
real(kind=wp), | intent(out) | :: | xl |
l-value |
||
real(kind=wp), | intent(out) | :: | bbx |
b_total / b_equatorial ratio |
Wrapper for IGRF functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | lon |
geodetic longitude in degrees (east) |
||
real(kind=wp), | intent(in) | :: | lat |
geodetic latitude in degrees (north) |
||
real(kind=wp), | intent(in) | :: | height |
altitude in km above sea level |
||
real(kind=wp), | intent(in) | :: | year |
decimal year for which geomagnetic field is to be calculated (e.g.:1995.5 for day 185 of 1995) |
||
real(kind=wp), | intent(out) | :: | xl |
l-value |
||
real(kind=wp), | intent(out) | :: | bbx |
b_total / b_equatorial ratio |
Determines coefficients and dipol moment from IGRF models
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | year |
decimal year for which geomagnetic field is to be calculated (e.g.:1995.5 for day 185 of 1995) |
||
real(kind=wp), | intent(out) | :: | dimo |
geomagnetic dipol moment in gauss (normalized to earth's radius) at the time (year) |
Alternate version of feldg to be used with cartesian coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in), | dimension(3) | :: | v |
cartesian coordinates in earth radii (6371.2 km) x-axis pointing to equator at 0 longitude y-axis pointing to equator at 90 long. z-axis pointing to north pole |
|
real(kind=wp), | intent(out) | :: | b(3) |
field components |
Calculates earth magnetic field from spherical harmonics model
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | glat |
geodetic latitude in degrees (north) |
||
real(kind=wp), | intent(in) | :: | glon |
geodetic longitude in degrees (east) |
||
real(kind=wp), | intent(in) | :: | alt |
altitude in km above sea level |
||
real(kind=wp), | intent(out) | :: | bnorth |
components of the field with respect to the local geodetic coordinate system, with axis pointing in the tangential plane to the north, east and downward. |
||
real(kind=wp), | intent(out) | :: | beast |
components of the field with respect to the local geodetic coordinate system, with axis pointing in the tangential plane to the north, east and downward. |
||
real(kind=wp), | intent(out) | :: | bdown |
components of the field with respect to the local geodetic coordinate system, with axis pointing in the tangential plane to the north, east and downward. |
||
real(kind=wp), | intent(out) | :: | Babs |
magnetic field strength in gauss |
Wrapper to shellg to be used with cartesian coordinates.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in), | dimension(3) | :: | v |
cartesian coordinates in earth radii (6371.2 km) * x-axis pointing to equator at 0 longitude * y-axis pointing to equator at 90 long. * z-axis pointing to north pole |
|
real(kind=wp), | intent(in) | :: | dimo |
dipol moment in gauss (normalized to earth radius) |
||
real(kind=wp), | intent(out) | :: | fl |
l-value |
||
integer, | intent(out) | :: | icode |
|
||
real(kind=wp), | intent(out) | :: | b0 |
magnetic field strength in gauss |
calculates l-value for specified geodaetic coordinates, altitude and gemagnetic field model.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | glat |
geodetic latitude in degrees (north) |
||
real(kind=wp), | intent(in) | :: | glon |
geodetic longitude in degrees (east) |
||
real(kind=wp), | intent(in) | :: | alt |
altitude in km above sea level |
||
real(kind=wp), | intent(in) | :: | dimo |
dipol moment in gauss (normalized to earth radius) |
||
real(kind=wp), | intent(out) | :: | fl |
l-value |
||
integer, | intent(out) | :: | icode |
|
||
real(kind=wp), | intent(out) | :: | b0 |
magnetic field strength in gauss |
||
real(kind=wp), | intent(in), | optional, | dimension(3) | :: | v |
cartesian coordinates in earth radii (6371.2 km) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(in) | :: | stps | |||
real(kind=wp), | intent(inout) | :: | bdel | |||
logical, | intent(out) | :: | value | |||
real(kind=wp), | intent(out) | :: | bequ | |||
real(kind=wp), | intent(out) | :: | rr0 |
Used for l
computation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me |
subroutine used for field line tracing in shellg. calls entry point feldi in geomagnetic field subroutine feldg
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
real(kind=wp), | intent(inout), | dimension(7) | :: | p | ||
real(kind=wp), | intent(out) | :: | bq | |||
real(kind=wp), | intent(out) | :: | r |
Get the directory containing the data files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(in) | :: | me |
Set the directory containing the data files.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(inout) | :: | me | |||
character(len=*), | intent(in) | :: | dir |
Destroy a shellig_type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(shellig_type), | intent(out) | :: | me |
type, public :: shellig_type private character(len=:), allocatable :: igrf_dir !! directory containing the data files ! formerly in the `fidb0` common block real(wp), dimension(3) :: sp = 0.0_wp ! formerly in blank common real(wp), dimension(3) :: xi = 0.0_wp real(wp), dimension(144) :: h = 0.0_wp !! Field model coefficients adjusted for [[shellg]] ! formerly in `model` common block integer :: iyea = 0 !! the int year corresponding to the file `name` that has been read character(len=:), allocatable :: name !! file name integer :: nmax = 0 !! maximum order of spherical harmonics real(wp) :: Time = 0.0_wp !! year (decimal: 1973.5) for which magnetic field is to be calculated real(wp), dimension(144) :: g = 0.0_wp !! `g(m)` -- normalized field coefficients (see [[feldcof]]) m=nmax*(nmax+2) integer :: nmax1 = 0 !! saved variables from the file integer :: nmax2 = 0 !! saved variables from the file real(wp), dimension(144) :: g_cache = 0.0_wp !! saved `g` from the file ! formerly saved vars in shellg: real(wp) :: step = 0.20_wp !! step size for field line tracing real(wp) :: steq = 0.03_wp !! step size for integration ! from feldcof, so we can cache the coefficients real(wp), dimension(120) :: gh2 = 0.0_wp ! JW : why is this 120 and g is 144 ??? real(wp), dimension(:, :), allocatable :: p !! this was `p(8,100)` in the original code. !! used for the field line integration loop. !! changed it to be allocatable since it was !! changed to be p(8,3334). contains private procedure, public :: igrf, igrfc procedure, public :: feldcof procedure, public :: feldg, feldc procedure, public :: shellg, shellc procedure, public :: findb0 procedure :: stoer, feldi procedure, public :: set_data_file_dir, get_data_file_dir procedure, public :: destroy => destroy_shellig_type end type shellig_type