source: LMDZ6/trunk/libf/phymar/rrtm_taumol13.F90 @ 3472

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

Inclusion de la physique de MAR


Integration of MAR physics

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