COSMOS v7.655  COSMOSv7655
(AirShowerMC)
interface2.f
Go to the documentation of this file.
1  integer leng, lengn, lengid
2  integer kgetenv2
3  character*5 numb
4  character*64 execid
5  character*128 msg
6  data kd/' g', ' e', ' m'/
7  save kd
8 
9  do i= 1, nsites
10  histdep(i) = 0
11  indivdep(i) = 0
12  enddo
13 
14  leng = kgetenv2("HISTDEP", input)
15  read(input, *) histdep
16 
17  leng = kgetenv2("INDIVDEP", input)
18  read(input, *) indivdep
19 
20  leng = kgetenv2("OUTPUT", input)
21  read(input, *) recxy, tklat, tkelosslat, tkrespec,
22  * tkrzspec, tkzfspec, tkrfspec, tkefspec,
23  * tkretspec, tkrtspec,
24  * tkrezspec, tkrzfspec, tkrefspec, tkarspec
25 
26  binw = 2
27 
28 
29  input = ' '
30  lengn = kgetenv2("NUMB", numb)
31  leng = kgetenv2("OUTDIR", input)
32  lengid = kgetenv2("EXECID", execid)
33 
34  if(observeas) then
35  msg =input(1:leng)//"/"//execid(1:lengid)//
36  * "-@."//numb(1:lengn)//".hyb"
37  call copenfw2(fnob, msg, 1, icon)
38  if(icon .gt. 1) then
39  write(0,*) ' icon=', icon
40  call cerrormsg(msg, 1)
41  call cerrormsg('could not be opened', 0)
42  endif
43  endif
44 
45  msg =input(1:leng)//"/"//execid(1:lengid)//
46  * "-@."//numb(1:lengn)//".nrfai"
47  call copenfw2(fnonrfai, msg, 1, icon)
48  if(icon .gt. 1) then
49  write(0,*) ' icon=', icon
50  call cerrormsg(msg, 1)
51  call cerrormsg('could not be opened', 0)
52  endif
53 #if FNODATDEF > 0
54 ! if(fnodat .gt. 0) then
55  msg =input(1:leng)//"/"//execid(1:lengid)//
56  * "-@."//numb(1:lengn)//".dat"
57  call copenfw2(fnodat, msg, 2, icon)
58  if(icon .gt. 1) then
59  write(0,*) ' icon=', icon
60  call cerrormsg(msg, 1)
61  call cerrormsg('could not be opened', 0)
62  endif
63 ! endif
64 #endif
65 
66  msg =input(1:leng)//
67  * "/"//execid(1:lengid)//"-@."//numb(1:lengn)//".hist"
68  call copenfw2(fno, msg, binw, icon) ! binary write
69  if(icon .gt. 1) then
70  write(0,*) ' icon=', icon
71  call cerrormsg(msg, 1)
72  call cerrormsg('could not be opened', 0)
73  endif
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
integer lengid integer lengdir character *dir integer kgetenv2 character *numb character *execid character *msg logical takehist save do nsites histdep(i)=0indivdep(i)=0enddo leng
integer function kgetenv2(envname, envresult)
Definition: cgetLoginN.f:77
nodes i
integer lengn
Definition: interface2.h:1
integer leng
Definition: interface2.h:1
logical KeepWeight ! see setupenv sh logical tkarspec ! get lateral histo in a web fai bin logical tkrtspec ! get time histo in each web bin logical SeeLowdE common Zprivatec2 tkrtspec
Definition: Zprivate4.h:7
subroutine copenfw2(io, fnin, form, icon)
Definition: copenf.f:205
logical KeepWeight ! see setupenv sh logical tkarspec ! get lateral histo in a web fai bin logical tkrtspec ! get time histo in each web bin logical SeeLowdE common Zprivatec2 tkarspec
Definition: Zprivate4.h:7