source: LMDZ5/trunk/libf/phylmd/rrtm/rrtm_taumol14.F90 @ 5308

Last change on this file since 5308 was 1990, checked in by Laurent Fairhead, 11 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 3.9 KB
RevLine 
[1989]1!******************************************************************************
2SUBROUTINE RRTM_TAUMOL14 (KLEV,P_TAU,&
3 & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,K_JP,K_JT,K_JT1,&
4 & P_COLCO2,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) 
5
6!     BAND 14:  2250-2380 cm-1 (low - CO2; high - CO2)
7
8! Modifications
9!        M.Hamrud      01-Oct-2003 CY28 Cleaning
10
11!     D Salmond 1999-07-14 speed-up
12
13USE PARKIND1  ,ONLY : JPIM     ,JPRB
14USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
15
16USE PARRRTM  , ONLY : JPLAY  ,JPBAND ,JPGPT  ,NGS13
17USE YOERRTWN , ONLY :      NSPA   ,NSPB
18USE YOERRTA14, ONLY : ABSA   ,ABSB   ,FRACREFA, FRACREFB,SELFREF
19
20IMPLICIT NONE
21
22!  Output
23INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
24REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAU(JPGPT,JPLAY)
25REAL(KIND=JPRB)   ,INTENT(IN)    :: P_TAUAERL(JPLAY,JPBAND)
26REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(JPLAY)
27REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(JPLAY)
28REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(JPLAY)
29REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(JPLAY)
30INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(JPLAY)
31INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(JPLAY)
32INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(JPLAY)
33REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLCO2(JPLAY)
34INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP
35REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFAC(JPLAY)
36REAL(KIND=JPRB)   ,INTENT(IN)    :: P_SELFFRAC(JPLAY)
37INTEGER(KIND=JPIM),INTENT(IN)    :: K_INDSELF(JPLAY)
38REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFRAC(JPGPT,JPLAY)
39!- from AER
40!- from INTFAC     
41!- from INTIND
42!- from PROFDATA             
43!- from SELF             
44!- from SP             
45INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, I_LAY
46REAL(KIND=JPRB) :: ZHOOK_HANDLE
47
48!  Input
49!#include "yoeratm.h"
50
51!      REAL TAUAER(JPLAY)
52!      EQUIVALENCE (TAUAERL(1,14),TAUAER)
53
54!     Compute the optical depth by interpolating in ln(pressure) and
55!     temperature.  Below LAYTROP, the water vapor self-continuum
56!     is interpolated (in temperature) separately. 
57
58IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',0,ZHOOK_HANDLE)
59DO I_LAY = 1, K_LAYTROP
60  IND0 = ((K_JP(I_LAY)-1)*5+(K_JT(I_LAY)-1))*NSPA(14) + 1
61  IND1 = (K_JP(I_LAY)*5+(K_JT1(I_LAY)-1))*NSPA(14) + 1
62  INDS = K_INDSELF(I_LAY)
63!-- DS_990714 
64!         DO IG = 1, NG14
65  IG=1
66  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
67   & (P_FAC00(I_LAY) * ABSA(IND0  ,IG) +&
68   & P_FAC10(I_LAY) * ABSA(IND0+1,IG) +&
69   & P_FAC01(I_LAY) * ABSA(IND1  ,IG) +&
70   & P_FAC11(I_LAY) * ABSA(IND1+1,IG) +&
71   & P_SELFFAC(I_LAY) * (SELFREF(INDS,IG) + &
72   & P_SELFFRAC(I_LAY) *&
73   & (SELFREF(INDS+1,IG) - SELFREF(INDS,IG))))&
74   & + P_TAUAERL(I_LAY,14) 
75  PFRAC(NGS13+IG,I_LAY) = FRACREFA(IG)
76  IG=2
77  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
78   & (P_FAC00(I_LAY) * ABSA(IND0  ,IG) +&
79   & P_FAC10(I_LAY) * ABSA(IND0+1,IG) +&
80   & P_FAC01(I_LAY) * ABSA(IND1  ,IG) +&
81   & P_FAC11(I_LAY) * ABSA(IND1+1,IG) +&
82   & P_SELFFAC(I_LAY) * (SELFREF(INDS,IG) +&
83   & P_SELFFRAC(I_LAY) *&
84   & (SELFREF(INDS+1,IG) - SELFREF(INDS,IG))))&
85   & + P_TAUAERL(I_LAY,14) 
86  PFRAC(NGS13+IG,I_LAY) = FRACREFA(IG)
87!         END DO
88!-- DS_990714 
89ENDDO
90
91DO I_LAY = K_LAYTROP+1, KLEV
92  IND0 = ((K_JP(I_LAY)-13)*5+(K_JT(I_LAY)-1))*NSPB(14) + 1
93  IND1 = ((K_JP(I_LAY)-12)*5+(K_JT1(I_LAY)-1))*NSPB(14) + 1
94!-- DS_990714 
95!         DO IG = 1, NG14
96  IG=1
97  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
98   & (P_FAC00(I_LAY) * ABSB(IND0  ,IG) +&
99   & P_FAC10(I_LAY) * ABSB(IND0+1,IG) +&
100   & P_FAC01(I_LAY) * ABSB(IND1  ,IG) +&
101   & P_FAC11(I_LAY) * ABSB(IND1+1,IG)) &
102   & + P_TAUAERL(I_LAY,14) 
103  PFRAC(NGS13+IG,I_LAY) = FRACREFB(IG)
104  IG=2
105  P_TAU (NGS13+IG,I_LAY) = P_COLCO2(I_LAY) *&
106   & (P_FAC00(I_LAY) * ABSB(IND0  ,IG) +&
107   & P_FAC10(I_LAY) * ABSB(IND0+1,IG) +&
108   & P_FAC01(I_LAY) * ABSB(IND1  ,IG) +&
109   & P_FAC11(I_LAY) * ABSB(IND1+1,IG)) &
110   & + P_TAUAERL(I_LAY,14) 
111  PFRAC(NGS13+IG,I_LAY) = FRACREFB(IG)
112!         END DO
113!-- DS_990714 
114ENDDO
115
116IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',1,ZHOOK_HANDLE)
117END SUBROUTINE RRTM_TAUMOL14
Note: See TracBrowser for help on using the repository browser.