COSMOS v7.655  COSMOSv7655
(AirShowerMC)
drawGeomag.f
Go to the documentation of this file.
1 ! makes a table of
2 ! lat, long, horizontal, vertical, def. angle
3 !
4 ! for lat = -90 to 90 step 5 deg
5 ! long =-180 to 180 step 10 deg.
6 ! the resultant data can be drawn by, say, gnuplot.
7  program drawgeomag
8  implicit none
9 
10 #include "Zcoord.h"
11 #include "Zmagfield.h"
12  real*8 year, lat, long, h
13  type(coord):: llh
14  type(magfield):: b, hva
15  integer icon, ilat, ilong, igrf
16  character*64 file
17 !
18  year=2000.
19  h =0.
20  call cerrormsg(
21  * 'Enter year of geomagnetism (=2000) and height(=0 m)',
22  * 1)
23  read(*,*) year, h
24 
25  call cerrormsg(
26  * 'Enter 1, 2 or 3 for 1) igrf, 2) wmm or other data', 1)
27  read(*,*) igrf
28 
29  if(igrf .eq. 1) then
30  file = '../Data/Geomag/igrf'
31  elseif(igrf .eq. 2) then
32  file = '../Data/Geomag/wmm'
33  else
34  call cerrormsg('Enter file path for geomag data',1)
35  read(*,*) file
36  endif
37 
38  call crdgeomag(file, year)
39  write(*,'("# lat long H V (Tesla) Ang(deg) ")')
40  do ilat = -90, 90, 5
41  lat = ilat
42  do ilong = -180, 180, 10
43  long = ilong
44  call csetcoord('llh', lat, long, h, llh)
45  call cgeomag(year, llh, b, icon)
46  call cned2hva(b, hva)
47 ! call ctransMagTo('xyz', llh, b, b)
48 ! write(*,*) ' x=',b.x, ' y=', b.y, ' z=', b.z
49  write(*, *) float(ilat), float(ilong),
50 #ifdef UNIONMAP
51  * sngl(hva%h), sngl(hva%v), sngl(hva%a)
52 #else
53  * sngl(hva%x), sngl(hva%y), sngl(hva%z)
54 #endif
55 !c call cprintMagF(b)
56 !c call cprintMagF(hva)
57  enddo
58  write(*,*)
59  enddo
60  end
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
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 cned2hva(a, b)
Definition: ctransMagTo.f:210
subroutine csetcoord(sys, x, y, z, a)
Definition: csetCoord.f:2
program drawgeomag
Definition: drawGeomag.f:7
dE dx *! Nuc Int sampling table b
Definition: cblkMuInt.h:130
Definition: Zcoord.h:43