source: LMDZ6/trunk/libf/phylmd/ecrad/ifsrrtm/srtm_taumol26.F90 @ 5450

Last change on this file since 5450 was 4773, checked in by idelkadi, 13 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 2.9 KB
Line 
1SUBROUTINE SRTM_TAUMOL26 &
2 & ( KIDIA   , KFDIA    , KLEV,&
3 & P_COLMOL  ,K_LAYTROP,&
4 & P_SFLUXZEN, P_TAUG   , P_TAUR    , PRMU0   &
5 & ) 
6
7!     Written by Eli J. Mlawer, Atmospheric & Environmental Research.
8
9!     BAND 26:  22650-29000 cm-1 (low - nothing; high - nothing)
10
11!      PARAMETER (MG=16, MXLAY=203, NBANDS=14)
12
13! Modifications
14!        M.Hamrud      01-Oct-2003 CY28 Cleaning
15
16!     JJMorcrette 2003-02-24 adapted to ECMWF environment
17!        D.Salmond  31-Oct-2007 Vector version in the style of RRTM from Meteo France & NEC
18!     JJMorcrette 20110610 Flexible configuration for number of g-points
19
20USE PARKIND1 , ONLY : JPIM, JPRB
21USE YOMHOOK  , ONLY : LHOOK, DR_HOOK, JPHOOK
22USE PARSRTM  , ONLY : JPG
23USE YOESRTM  , ONLY : NG26
24USE YOESRTA26, ONLY : SFLUXREFC, RAYLC
25
26IMPLICIT NONE
27
28!-- Output
29INTEGER(KIND=JPIM),INTENT(IN)    :: KIDIA, KFDIA
30INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
31REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLMOL(KIDIA:KFDIA,KLEV)
32INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP(KIDIA:KFDIA)
33
34REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_SFLUXZEN(KIDIA:KFDIA,JPG)
35REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUG(KIDIA:KFDIA,KLEV,JPG)
36REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUR(KIDIA:KFDIA,KLEV,JPG)
37REAL(KIND=JPRB)   ,INTENT(IN)    :: PRMU0(KIDIA:KFDIA)
38!- from AER
39!- from INTFAC     
40!- from INTIND
41!- from PRECISE             
42!- from PROFDATA             
43!- from SELF             
44INTEGER(KIND=JPIM) :: IG, I_LAY, I_LAYSOLFR(KIDIA:KFDIA), I_NLAYERS, IPLON
45
46REAL(KIND=JPHOOK) :: ZHOOK_HANDLE
47
48IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL26',0,ZHOOK_HANDLE)
49
50I_NLAYERS = KLEV
51
52!     Compute the optical depth by interpolating in ln(pressure),
53!     temperature, and appropriate species.  Below LAYTROP, the water
54!     vapor self-continuum is interpolated (in temperature) separately. 
55
56I_LAYSOLFR(KIDIA:KFDIA) = K_LAYTROP(KIDIA:KFDIA)
57
58DO I_LAY = 1, I_NLAYERS
59  DO IPLON = KIDIA, KFDIA
60    IF (PRMU0(IPLON) > 0.0_JPRB) THEN
61      IF (I_LAY <= K_LAYTROP(IPLON)) THEN
62        !  DO IG = 1, NG(26)
63!CDIR UNROLL=NG26
64        DO IG = 1 , NG26
65          !    TAUG(LAY,IG) = COLMOL(LAY) * RAYLC(IG)
66          !    SSA(LAY,IG) = 1.0
67          IF (I_LAY == I_LAYSOLFR(IPLON)) P_SFLUXZEN(IPLON,IG) = SFLUXREFC(IG)
68          P_TAUG(IPLON,I_LAY,IG) = 0.0_JPRB
69          P_TAUR(IPLON,I_LAY,IG) = P_COLMOL(IPLON,I_LAY) * RAYLC(IG)
70        ENDDO
71      ENDIF
72    ENDIF
73  ENDDO
74ENDDO
75
76DO I_LAY = 1, I_NLAYERS
77  DO IPLON = KIDIA, KFDIA
78    IF (PRMU0(IPLON) > 0.0_JPRB) THEN
79      IF (I_LAY >= K_LAYTROP(IPLON)+1) THEN
80        !  DO IG = 1, NG(26)
81!CDIR UNROLL=NG26
82        DO IG = 1 , NG26
83          !    TAUG(LAY,IG) = COLMOL(LAY) * RAYLC(IG)
84          !    SSA(LAY,IG) = 1.0
85          P_TAUG(IPLON,I_LAY,IG) = 0.0_JPRB
86          P_TAUR(IPLON,I_LAY,IG) = P_COLMOL(IPLON,I_LAY) * RAYLC(IG)
87        ENDDO
88      ENDIF
89    ENDIF
90  ENDDO
91ENDDO
92
93!-----------------------------------------------------------------------
94IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL26',1,ZHOOK_HANDLE)
95
96END SUBROUTINE SRTM_TAUMOL26
Note: See TracBrowser for help on using the repository browser.