COSMOS v7.655
COSMOSv7655
(AirShowerMC)
csetMagField.f
Go to the documentation of this file.
1
5
subroutine
csetmagfield
(sys, b1, b2, b3, b)
6
! set magnetic field strength in b
7
! sys: character*3. input. which system. 'xyz', 'hva', 'ned' etc
8
! b1,b2,b3:real*8 input. 3 components of mag. in the system 'sys'
9
! b: /magfield/ . output.
10
!
11
implicit none
12
#include "Zmagfield.h"
13
character*(*)
sys
14
real*8
b1, b2, b3
15
type
(
magfield
)::b
16
!
17
character*70
msg
18
integer
i
19
#include "Zmagfieldtp.h"
20
21
do
i=1, max_mag_types
22
if
(sys .eq.
mag_types
(i))
then
23
b%x = b1
24
b%y = b2
25
b%z = b3
26
b%sys = sys
27
goto
10
28
endif
29
enddo
30
write
(msg, *)
' error sys='
,sys,
'to csetMagField'
31
call
cerrormsg
(msg, 0)
32
10
continue
33
end
cerrormsg
subroutine cerrormsg(msg, needrtn)
Definition:
cerrorMsg.f:4
csetmagfield
subroutine csetmagfield(sys, b1, b2, b3, b)
brief set Calculated magnetic field to /magfield/ b
Definition:
csetMagField.f:6
magfield
Definition:
Zmagfield.h:39
mag_types
! magnetic field component expressions ! this should be placed at last part of the declaration integer max_mag_types * mag_types(2)/'hva'/
Tracking
Geomag
csetMagField.f
Generated by
1.8.13