1 | C=======================================================================
|
---|
2 |
|
---|
3 | DOUBLE PRECISION FUNCTION HEIGH( ARG )
|
---|
4 |
|
---|
5 | C-----------------------------------------------------------------------
|
---|
6 | C HEIGH(T AS FUNCTION OF THICKNESS)
|
---|
7 | C
|
---|
8 | C CALCULATES HEIGHT DEPENDING ON THICKNESS OF ATMOSPHERE
|
---|
9 | C (US STANDARD ATMOSPHERE)
|
---|
10 | C THIS FUNCTION IS CALLED FROM MAIN, BOX2, BOX3, ININKG, INPRM,
|
---|
11 | C MUTRAC, AND UPDATE
|
---|
12 | C ARGUMENT:
|
---|
13 | C ARG = MASS OVERLAY IN G/CM**2
|
---|
14 | C-----------------------------------------------------------------------
|
---|
15 |
|
---|
16 | IMPLICIT NONE
|
---|
17 |
|
---|
18 | *KEEP,ATMOS.
|
---|
19 | COMMON /ATMOS/ AATM,BATM,CATM,DATM
|
---|
20 | DOUBLE PRECISION AATM(5),BATM(5),CATM(5),DATM(5)
|
---|
21 | *KEEP,RUNPAR.
|
---|
22 | COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
|
---|
23 | * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
|
---|
24 | * MONIOU,MDEBUG,NUCNUC,
|
---|
25 | * CETAPE,
|
---|
26 | * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
|
---|
27 | * N1STTR,MDBASE,
|
---|
28 | * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
|
---|
29 | * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
|
---|
30 | * ,GHEISH,GHESIG
|
---|
31 | COMMON /RUNPAC/ DSN,HOST,USER
|
---|
32 | DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
|
---|
33 | REAL STEPFC
|
---|
34 | INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
|
---|
35 | * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
|
---|
36 | * N1STTR,MDBASE
|
---|
37 | INTEGER CETAPE
|
---|
38 | CHARACTER*79 DSN
|
---|
39 | CHARACTER*20 HOST,USER
|
---|
40 |
|
---|
41 | LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
|
---|
42 | * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
|
---|
43 | * ,GHEISH,GHESIG
|
---|
44 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
45 | c Try
|
---|
46 | c------------------------------------------------------------
|
---|
47 | *KEEP,PARPAR.
|
---|
48 | COMMON /PARPAR/ CURPAR,SECPAR,PRMPAR,OUTPAR,C,
|
---|
49 | * E00,E00PN,PTOT0,PTOT0N,THICKH,ITYPE,LEVL
|
---|
50 | DOUBLE PRECISION CURPAR(14),SECPAR(14),PRMPAR(14),OUTPAR(14),
|
---|
51 | * C(50),E00,E00PN,PTOT0,PTOT0N,THICKH
|
---|
52 | INTEGER ITYPE,LEVL
|
---|
53 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
54 | *KEND.
|
---|
55 | C*******************************************************************
|
---|
56 | C Modificado por Aitor (5-febrero-98)
|
---|
57 |
|
---|
58 | common /aitor/ aitoth
|
---|
59 | double precision aitoth
|
---|
60 | C*******************************************************************
|
---|
61 |
|
---|
62 |
|
---|
63 | DOUBLE PRECISION ARG,H,R,RT
|
---|
64 | PARAMETER (RT=6348.0D5)
|
---|
65 |
|
---|
66 | C-----------------------------------------------------------------------
|
---|
67 |
|
---|
68 | CC IF ( DEBUG ) WRITE(MDEBUG,*) 'HEIGH : ARG=',SNGL(ARG)
|
---|
69 |
|
---|
70 |
|
---|
71 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
72 | c>> Modification (HZA trick) cancelled >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
73 | c>> JCG Wed Sep 21 10:49:14 MET DST 1998 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
74 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
75 | IF ( ARG .GT. 631.1D0 ) THEN
|
---|
76 | HEIGH = CATM(1) * LOG ( BATM(1) / (ARG - AATM(1)) )
|
---|
77 | ELSEIF ( ARG .GT. 271.7D0 ) THEN
|
---|
78 | HEIGH = CATM(2) * LOG ( BATM(2) / (ARG - AATM(2)) )
|
---|
79 | ELSEIF ( ARG .GT. 3.0395D0 ) THEN
|
---|
80 | HEIGH = CATM(3) * LOG ( BATM(3) / (ARG - AATM(3)) )
|
---|
81 | ELSEIF ( ARG .GT. 0.00128292D0 ) THEN
|
---|
82 | HEIGH = CATM(4) * LOG ( BATM(4) / (ARG - AATM(4)) )
|
---|
83 | ELSE
|
---|
84 | HEIGH = (AATM(5) - ARG) * DATM(5)
|
---|
85 | ENDIF
|
---|
86 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
87 | c IF ( ARG .GT. 631.1D0 ) THEN
|
---|
88 | c H = CATM(1) * LOG ( BATM(1) / (ARG - AATM(1)) )
|
---|
89 | c ELSEIF ( ARG .GT. 271.7D0 ) THEN
|
---|
90 | c H = CATM(2) * LOG ( BATM(2) / (ARG - AATM(2)) )
|
---|
91 | c ELSEIF ( ARG .GT. 3.0395D0 ) THEN
|
---|
92 | c H = CATM(3) * LOG ( BATM(3) / (ARG - AATM(3)) )
|
---|
93 | c ELSEIF ( ARG .GT. 0.00128292D0 ) THEN
|
---|
94 | c H = CATM(4) * LOG ( BATM(4) / (ARG - AATM(4)) )
|
---|
95 | c ELSE
|
---|
96 | c H = (AATM(5) - ARG) * DATM(5)
|
---|
97 | c ENDIF
|
---|
98 | c
|
---|
99 | cC************************************************************************
|
---|
100 | cC Modificacion hecha por Aitor (5-febrero-98)
|
---|
101 | c
|
---|
102 | c HEIGH = (COS(aitoth))**2 * (-RT + SQRT(RT**2 +
|
---|
103 | c * ((H**2 + (2.0D0*RT*H))/(COS(aitoth))**2)))
|
---|
104 | c>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
---|
105 |
|
---|
106 | C************************************************************************
|
---|
107 |
|
---|
108 | C R = SQRT(CURPAR(7)**2+CURPAR(8)**2)
|
---|
109 | C HEIGH = SQRT((RT+H)**2-R**2)-RT
|
---|
110 | c print *,'HEIGH>>',ARG,r,heigh,curpar(7),curpar(8)
|
---|
111 |
|
---|
112 | RETURN
|
---|
113 | END
|
---|