source: JEM-EUSO/esaf_lal/tags/v1_r0/esaf/packages/simulation/externals/lowtran/src/lwtrans.F @ 117

Last change on this file since 117 was 117, checked in by moretto, 11 years ago

ESAF version compilable on mac OS

File size: 2.5 KB
Line 
1      SUBROUTINE LWTRANS(INIT,USR_ALT,USR_ANGLE,TRANS)
2c**********************************************************************
3c     Subroutine to calcul the radiative transfert throw the atmosphere
4c     Based on the LOWTRAN7 program
5c
6c     Input parameters :
7c     ------------------
8c     INIT :  flag for initialisation of lowtran
9C             0 initialisation of atmosphere's parameters and conditions
10c                 ( defined in the lowtran.input file )
11c             1 initialisation of geometrical conditions only when
12c               atmosphere's parameters have already been defined
13c
14c     USR_ALT, USR_ANGLE : altitude of the point in km
15c                          angle theta compare to Nadir (0=vertical)
16c                        origine on ground at Nadir (EUSO = 0.,0.,400.)
17c
18c     Output parameters :
19c     -------------------
20c     TRANS(lambda) : total transmission from a point at alt usr_alt
21c     to a point above the atmosphere in the theta direction
22c     for differents wavelenghts (no more than 100 and defined in the
23c     lowtran.input file)
24c     Then, the transmission can be multiplied.
25c
26c     Author : Anne Stutz
27c     Last revised by Corinne Berat, August 2002
28c
29c***********************************************************************
30#include "lwtrn7.common"
31#include "userlun.common"
32#include "tuple.common"
33
34      INTEGER INIT
35      REAL USR_ALT,USR_ANGLE
36      REAL TRANS(100)
37      CHARACTER*10 OUTFILE,SAVEFILE
38      CHARACTER*100 STR
39      CHARACTER*25 path/'config/RadiativeTransfer/'/
40      CHARACTER*19 dummy     
41      IFILE  = 8
42      ITAPE5 = 9
43      IPRNT  = 10
44      IFILE2 = 18
45     
46c     Atmosphere Model Initialisation
47      IF(INIT.EQ.0) THEN
48         NEVT=1
49         ILAMBDA=0
50c*******************************************************************
51c     creation of the TAPE5 init file for lwtrn7
52
53         OPEN(66,FILE=path//'LowtranFiles.dat')
54         READ(66,66) dummy, TAPE5
55         READ(66,66) dummy, TAPE6
56         READ(66,66) dummy, TAPE7
57         READ(66,66) dummy, TAPE8
58         CLOSE(66)
59 66      FORMAT(A,' ',A)
60
61         CALL INITCARD3(0.,0.)
62         CALL LWTRN7SUB
63         DO I=1,100
64            TRANS(I)=TRANSM(I)
65         ENDDO   
66      ENDIF   
67         
68c     Calcul the atmospheric transmission from xpos,ypos,zpos to EUSO
69      IF(INIT.EQ.1) THEN
70         NEVT = NEVT+1
71         ILAMBDA=0
72         CALL INITCARD3(USR_ALT,USR_ANGLE)
73         CALL LWTRN7SUB
74         DO I=1,100
75            TRANS(I) = TRANSM(I)
76         ENDDO   
77      ENDIF
78c
79      RETURN
80      END
81
82
83         
84
85
86
87
88
89
90
91
92
Note: See TracBrowser for help on using the repository browser.