COSMOS v7.655  COSMOSv7655
(AirShowerMC)
Geomag.f
Go to the documentation of this file.
1 ! lat, long, horizontal, vertical, def. angle
2 !
3  program geomag
4  implicit none
5 
6 #include "Zcoord.h"
7 #include "Zmagfield.h"
8  real*8 year, lat, long, h
9  type(coord):: llh
10  type(magfield):: b, hva
11  integer icon, igrf
12  real*8 tand
13 !
14  write(*,*)
15  * 'Enter year(1996.5) lat(-90~90) long(-180~180) height(0)'
16  read(*, *) year, lat, long, h
17  write(*,*)
18  * "Enter 1 or 2 for 1) IGRF data 2) Dod WMM data"
19  read(*,*) igrf
20  call csetcoord('llh', lat, long, h, llh)
21  if(igrf .eq. 1) then
22  call crdgeomag('../Data/Geomag/igrf', year)
23  else
24  call crdgeomag('../Data/Geomag/wmm', year)
25  endif
26 
27  call cprgeomag
28 
29  call cgeomag(year, llh, b, icon)
30  write(*,*) ' icon=',icon
31  write(*,*) ' ned=', b%n, b%e, b%d
32  call cned2hva(b, hva)
33  tand = atan( hva%v/hva%h) * 180./3.141592
34  call ctransmagto('xyz', llh, b, b)
35  write(*,*) ' x=',b%x, ' y=', b%y, ' z=', b%z
36  write(*, *)
37 #ifdef UNIONMAP
38  * sngl(hva%h), sngl(hva%v), sngl(hva%a)
39 #else
40  * sngl(hva%x), sngl(hva%y), sngl(hva%z)
41 #endif
42  write(*,*) ' fukaku =', tand, ' deg'
43  call cprintmagf(b)
44  call cprintmagf(hva)
45  end
subroutine cprgeomag
Definition: cgeomag.f:477
subroutine crdgeomag(filepath, yearin)
Definition: cgeomag.f:133
latitude latitude this system is used *****************************************************************! type coord sequence union map real z z in m endmap xyz map real ! latitude in deg is to the north ! longitude in deg is to the east *h ! height in m endmap llh map real ! polar angle ! azimuthal angle *radius ! radial distance endmap sph endunion character *sys ! which system llh
Definition: Zcoord.h:25
subroutine cgeomag(yearin, llh, h, icon)
Definition: cgeomag.f:25
subroutine cprintmagf(b)
Definition: cprintMagF.f:2
subroutine cned2hva(a, b)
Definition: ctransMagTo.f:210
subroutine csetcoord(sys, x, y, z, a)
Definition: csetCoord.f:2
dE dx *! Nuc Int sampling table b
Definition: cblkMuInt.h:130
subroutine ctransmagto(sys, pos, a, b)
Definition: ctransMagTo.f:11
Definition: Zcoord.h:43
program geomag
Definition: Geomag.f:3