source: LMDZ6/branches/DYNAMICO-conv-GC/libf/phymar/rrtm_taumol15.F90 @ 5434

Last change on this file since 5434 was 2089, checked in by Laurent Fairhead, 10 years ago

Inclusion de la physique de MAR


Integration of MAR physics

File size: 4.6 KB
Line 
1!----------------------------------------------------------------------------
2SUBROUTINE RRTM_TAUMOL15 (KLEV,TAU,&
3  &TAUAERL,FAC00,FAC01,FAC10,FAC11,JP,JT,JT1,ONEMINUS,&
4  &COLH2O,COLCO2,COLN2O,LAYTROP,SELFFAC,SELFFRAC,INDSELF,PFRAC)
5
6!     BAND 15:  2380-2600 cm-1 (low - N2O,CO2; high - nothing)
7
8! Modifications
9!
10!     D Salmond 1999-07-14 speed-up
11
12
13#include "tsmbkind.h"
14
15USE PARRRTM  , ONLY : JPLAY  ,JPBAND ,JPGPT   ,JPXSEC ,NGS14
16USE YOERRTWN , ONLY : NG     ,NSPA   ,NSPB
17USE YOERRTA15, ONLY : NG15   ,ABSA   ,FRACREFA,KA     ,SELFREF,STRRAT
18
19
20IMPLICIT NONE
21
22!  Output
23REAL_B :: TAU   (JPGPT,JPLAY)
24
25!     DUMMY INTEGER SCALARS
26INTEGER_M :: KLEV
27
28!- from AER
29REAL_B :: TAUAERL(JPLAY,JPBAND)
30
31!- from INTFAC     
32REAL_B :: FAC00(JPLAY)
33REAL_B :: FAC01(JPLAY)
34REAL_B :: FAC10(JPLAY)
35REAL_B :: FAC11(JPLAY)
36
37!- from INTIND
38INTEGER_M :: JP(JPLAY)
39INTEGER_M :: JT(JPLAY)
40INTEGER_M :: JT1(JPLAY)
41
42!- from PRECISE             
43REAL_B :: ONEMINUS
44
45!- from PROFDATA             
46REAL_B :: COLH2O(JPLAY)
47REAL_B :: COLCO2(JPLAY)
48REAL_B :: COLN2O(JPLAY)
49INTEGER_M :: LAYTROP
50
51!- from SELF             
52REAL_B :: SELFFAC(JPLAY)
53REAL_B :: SELFFRAC(JPLAY)
54INTEGER_M :: INDSELF(JPLAY)
55
56!- from SP             
57REAL_B :: PFRAC(JPGPT,JPLAY)
58
59
60!     LOCAL INTEGER SCALARS
61INTEGER_M :: IG, IND0, IND1, INDS, JS, LAY
62
63!     LOCAL REAL SCALARS
64REAL_B :: FAC000, FAC001, FAC010, FAC011, FAC100, FAC101,&
65          &FAC110, FAC111, FS, SPECCOMB, SPECMULT, SPECPARM
66
67
68!  Input
69!#include "yoeratm.h"
70
71!      REAL TAUAER(JPLAY)
72!      EQUIVALENCE (TAUAERL(1,15),TAUAER)
73
74!     Compute the optical depth by interpolating in ln(pressure),
75!     temperature, and appropriate species.  Below LAYTROP, the water
76!     vapor self-continuum is interpolated (in temperature) separately.
77 
78DO LAY = 1, LAYTROP
79  SPECCOMB = COLN2O(LAY) + STRRAT*COLCO2(LAY)
80  SPECPARM = COLN2O(LAY)/SPECCOMB
81  SPECPARM = MIN(SPECPARM,ONEMINUS)
82  SPECMULT = 8._JPRB*(SPECPARM)
83  JS = 1 + INT(SPECMULT)
84  FS = MOD(SPECMULT,_ONE_)
85!-----jjm       
86  FAC000 = (_ONE_ - FS) * FAC00(LAY)
87  FAC010 = (_ONE_ - FS) * FAC10(LAY)
88  FAC100 = FS * FAC00(LAY)
89  FAC110 = FS * FAC10(LAY)
90  FAC001 = (_ONE_ - FS) * FAC01(LAY)
91  FAC011 = (_ONE_ - FS) * FAC11(LAY)
92  FAC101 = FS * FAC01(LAY)
93  FAC111 = FS * FAC11(LAY)
94!------         
95  IND0 = ((JP(LAY)-1)*5+(JT(LAY)-1))*NSPA(15) + JS
96  IND1 = (JP(LAY)*5+(JT1(LAY)-1))*NSPA(15) + JS
97  INDS = INDSELF(LAY)
98!-- DS_990714 
99!         DO IG = 1, NG15
100  IG=1
101  TAU (NGS14+IG,LAY) = SPECCOMB *&
102!     &((1. - FS)*(FAC00(LAY) * ABSA(IND0,IG) +
103!     &            FAC10(LAY) * ABSA(IND0+9,IG) +
104!     &            FAC01(LAY) * ABSA(IND1,IG) +
105!     &            FAC11(LAY) * ABSA(IND1+9,IG)) +
106!     &     FS *  (FAC01(LAY) * ABSA(IND1+1,IG) +
107!     &            FAC10(LAY) * ABSA(IND0+10,IG) +
108!     &            FAC00(LAY) * ABSA(IND0+1,IG) +
109!     &            FAC11(LAY) * ABSA(IND1+10,IG))) +
110   &(FAC000 * ABSA(IND0   ,IG) +&
111   & FAC100 * ABSA(IND0+ 1,IG) +&
112   & FAC010 * ABSA(IND0+ 9,IG) +&
113   & FAC110 * ABSA(IND0+10,IG) +&
114   & FAC001 * ABSA(IND1   ,IG) +&
115   & FAC101 * ABSA(IND1+ 1,IG) +&
116   & FAC011 * ABSA(IND1+ 9,IG) +&
117   & FAC111 * ABSA(IND1+10,IG))+&
118   &COLH2O(LAY) * &
119   &SELFFAC(LAY) * (SELFREF(INDS,IG) + &
120   &SELFFRAC(LAY) *&
121   &(SELFREF(INDS+1,IG) - SELFREF(INDS,IG)))&
122   &+ TAUAERL(LAY,15)
123  PFRAC(NGS14+IG,LAY) = FRACREFA(IG,JS) + FS *&
124   &(FRACREFA(IG,JS+1) - FRACREFA(IG,JS))
125  IG=2
126  TAU (NGS14+IG,LAY) = SPECCOMB *&
127!     &((1. - FS)*(FAC00(LAY) * ABSA(IND0,IG) +
128!     &            FAC10(LAY) * ABSA(IND0+9,IG) +
129!     &            FAC01(LAY) * ABSA(IND1,IG) +
130!     &            FAC11(LAY) * ABSA(IND1+9,IG)) +
131!     &     FS *  (FAC01(LAY) * ABSA(IND1+1,IG) +
132!     &            FAC10(LAY) * ABSA(IND0+10,IG) +
133!     &            FAC00(LAY) * ABSA(IND0+1,IG) +
134!     &            FAC11(LAY) * ABSA(IND1+10,IG))) +
135   &(FAC000 * ABSA(IND0   ,IG) +&
136   & FAC100 * ABSA(IND0+ 1,IG) +&
137   & FAC010 * ABSA(IND0+ 9,IG) +&
138   & FAC110 * ABSA(IND0+10,IG) +&
139   & FAC001 * ABSA(IND1   ,IG) +&
140   & FAC101 * ABSA(IND1+ 1,IG) +&
141   & FAC011 * ABSA(IND1+ 9,IG) +&
142   & FAC111 * ABSA(IND1+10,IG))+&
143   &COLH2O(LAY) *&
144   &SELFFAC(LAY) * (SELFREF(INDS,IG) +&
145   &SELFFRAC(LAY) *&
146   &(SELFREF(INDS+1,IG) - SELFREF(INDS,IG)))&
147   &+ TAUAERL(LAY,15)
148  PFRAC(NGS14+IG,LAY) = FRACREFA(IG,JS) + FS *&
149   &(FRACREFA(IG,JS+1) - FRACREFA(IG,JS))
150
151!         END DO
152!-- DS_990714 
153ENDDO
154
155DO LAY = LAYTROP+1, KLEV
156!         DO IG = 1, NG15
157!-- DS_990714 
158  IG=1
159  TAU (NGS14+IG,LAY) = TAUAERL(LAY,15)
160  PFRAC(NGS14+IG,LAY) = _ZERO_
161  IG=2
162  TAU (NGS14+IG,LAY) = TAUAERL(LAY,15)
163  PFRAC(NGS14+IG,LAY) = _ZERO_
164!-- DS_990714 
165!         END DO
166ENDDO
167
168RETURN
169END SUBROUTINE RRTM_TAUMOL15
Note: See TracBrowser for help on using the repository browser.