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 |
subroutine igrfc(me, v, year, xl, bbx) class(shellig_type), intent(inout) :: me real(wp), dimension(3), intent(in) :: 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(wp), intent(in) :: year !! decimal year for which geomagnetic field is to !! be calculated (e.g.:1995.5 for day 185 of 1995) real(wp), intent(out) :: xl !! l-value real(wp), intent(out) :: bbx !! b_total / b_equatorial ratio real(wp) :: bab1, bdel, beq, bequ, dimo, rr0 integer :: icode logical :: val real(wp), dimension(3) :: b real(wp), parameter :: stps = 0.05_wp ! JW : do we need to reset some or all of these ? me%sp = 0.0_wp me%xi = 0.0_wp me%h = 0.0_wp me%step = 0.20_wp me%steq = 0.03_wp call me%feldcof(year, dimo) call me%feldc(v, b) call me%shellc(v, dimo, xl, icode, bab1) bequ = dimo / (xl * xl * xl) if (icode == 1) then bdel = 1.0e-3_wp call me%findb0(stps, bdel, val, beq, rr0) if (val) bequ = beq end if bbx = norm2(b) / bequ end subroutine igrfc