source: LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad.v1.5.1/srtm_taumol25.F90 @ 5157

Last change on this file since 5157 was 3908, checked in by idelkadi, 3 years ago

Online implementation of the radiative transfer code ECRAD in the LMDZ model.

  • Inclusion of the ecrad directory containing the sources of the ECRAD code
    • interface routine : radiation_scheme.F90
  • Adaptation of compilation scripts :
    • compilation under CPP key CPP_ECRAD
    • compilation with option "-rad ecard" or "-ecard true"
    • The "-rad old/rtm/ecran" build option will need to replace the "-rrtm true" and "-ecrad true" options in the future.
  • Runing LMDZ simulations with ecrad, you need :
    • logical key iflag_rrtm = 2 in physiq.def
    • namelist_ecrad (DefLists?)
    • the directory "data" containing the configuration files is temporarily placed in ../libfphylmd/ecrad/
  • Compilation and execution are tested in the 1D case. The repository under svn would allow to continue the implementation work: tests, verification of the results, ...
File size: 4.4 KB
Line 
1SUBROUTINE SRTM_TAUMOL25 &
2 & ( KIDIA   , KFDIA    , KLEV,&
3 & P_FAC00   , P_FAC01  , P_FAC10   , P_FAC11,&
4 & K_JP      , K_JT     , K_JT1,&
5 & P_COLH2O  , P_COLMOL , P_COLO3,&
6 & K_LAYTROP,&
7 & P_SFLUXZEN, P_TAUG   , P_TAUR    , PRMU0   &
8 & ) 
9
10!     Written by Eli J. Mlawer, Atmospheric & Environmental Research.
11
12!     BAND 25:  16000-22650 cm-1 (low - H2O; high - nothing)
13
14!      PARAMETER (MG=16, MXLAY=203, NBANDS=14)
15
16! Modifications
17!        M.Hamrud      01-Oct-2003 CY28 Cleaning
18
19!     JJMorcrette 2003-02-24 adapted to ECMWF environment
20!        D.Salmond  31-Oct-2007 Vector version in the style of RRTM from Meteo France & NEC
21!     JJMorcrette 20110610 Flexible configuration for number of g-points
22
23USE PARKIND1 , ONLY : JPIM, JPRB
24USE YOMHOOK  , ONLY : LHOOK, DR_HOOK
25USE PARSRTM  , ONLY : JPG
26USE YOESRTM  , ONLY : NG25
27USE YOESRTA25, ONLY : ABSA, SFLUXREFC, ABSO3AC, ABSO3BC, RAYLC, LAYREFFR 
28USE YOESRTWN , ONLY : NSPA
29
30IMPLICIT NONE
31
32!-- Output
33INTEGER(KIND=JPIM),INTENT(IN)    :: KIDIA, KFDIA
34INTEGER(KIND=JPIM),INTENT(IN)    :: KLEV
35REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC00(KIDIA:KFDIA,KLEV)
36REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC01(KIDIA:KFDIA,KLEV)
37REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC10(KIDIA:KFDIA,KLEV)
38REAL(KIND=JPRB)   ,INTENT(IN)    :: P_FAC11(KIDIA:KFDIA,KLEV)
39INTEGER(KIND=JPIM),INTENT(IN)    :: K_JP(KIDIA:KFDIA,KLEV)
40INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT(KIDIA:KFDIA,KLEV)
41INTEGER(KIND=JPIM),INTENT(IN)    :: K_JT1(KIDIA:KFDIA,KLEV)
42REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLH2O(KIDIA:KFDIA,KLEV)
43REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLMOL(KIDIA:KFDIA,KLEV)
44REAL(KIND=JPRB)   ,INTENT(IN)    :: P_COLO3(KIDIA:KFDIA,KLEV)
45INTEGER(KIND=JPIM),INTENT(IN)    :: K_LAYTROP(KIDIA:KFDIA)
46
47REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_SFLUXZEN(KIDIA:KFDIA,JPG)
48REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUG(KIDIA:KFDIA,KLEV,JPG)
49REAL(KIND=JPRB)   ,INTENT(OUT)   :: P_TAUR(KIDIA:KFDIA,KLEV,JPG)
50REAL(KIND=JPRB)   ,INTENT(IN)    :: PRMU0(KIDIA:KFDIA)
51!- from INTFAC     
52!- from INTIND
53!- from PRECISE             
54!- from PROFDATA             
55!- from SELF             
56INTEGER(KIND=JPIM) :: IG, IND0, IND1, I_LAY, I_LAYSOLFR(KIDIA:KFDIA), I_NLAYERS, IPLON
57
58INTEGER(KIND=JPIM) :: I_LAY_NEXT
59
60REAL(KIND=JPRB) ::  &
61 & Z_TAURAY 
62REAL(KIND=JPRB) :: ZHOOK_HANDLE
63
64ASSOCIATE(NFLEVG=>KLEV)
65IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL25',0,ZHOOK_HANDLE)
66
67I_NLAYERS = KLEV
68
69!     Compute the optical depth by interpolating in ln(pressure),
70!     temperature, and appropriate species.  Below LAYTROP, the water
71!     vapor self-continuum is interpolated (in temperature) separately. 
72
73I_LAYSOLFR(KIDIA:KFDIA) = K_LAYTROP(KIDIA:KFDIA)
74
75DO I_LAY = 1, I_NLAYERS
76  I_LAY_NEXT = MIN(I_NLAYERS, I_LAY+1)
77  DO IPLON = KIDIA, KFDIA
78    IF (PRMU0(IPLON) > 0.0_JPRB) THEN
79      IF (I_LAY <= K_LAYTROP(IPLON)) THEN
80        IF (K_JP(IPLON,I_LAY) < LAYREFFR .AND. K_JP(IPLON,I_LAY_NEXT) >= LAYREFFR) &
81         & I_LAYSOLFR(IPLON) = MIN(I_LAY+1,K_LAYTROP(IPLON)) 
82        IND0 = ((K_JP(IPLON,I_LAY)-1)*5+(K_JT(IPLON,I_LAY)-1))*NSPA(25) + 1
83        IND1 = (K_JP(IPLON,I_LAY)*5+(K_JT1(IPLON,I_LAY)-1))*NSPA(25) + 1
84
85        !  DO IG = 1, NG(25)
86!CDIR UNROLL=NG25
87        DO IG = 1 , NG25
88          Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYLC(IG)
89          P_TAUG(IPLON,I_LAY,IG) = P_COLH2O(IPLON,I_LAY) * &
90           & (P_FAC00(IPLON,I_LAY) * ABSA(IND0,IG) + &
91           & P_FAC10(IPLON,I_LAY) * ABSA(IND0+1,IG) + &
92           & P_FAC01(IPLON,I_LAY) * ABSA(IND1,IG) + &
93           & P_FAC11(IPLON,I_LAY) * ABSA(IND1+1,IG)) + &
94           & P_COLO3(IPLON,I_LAY) * ABSO3AC(IG)   
95          !     &          + TAURAY
96          !    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
97          IF (I_LAY == I_LAYSOLFR(IPLON)) P_SFLUXZEN(IPLON,IG) = SFLUXREFC(IG)
98          P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY
99        ENDDO
100      ENDIF
101    ENDIF
102  ENDDO
103ENDDO
104
105DO I_LAY = 1, I_NLAYERS
106  DO IPLON = KIDIA, KFDIA
107    IF (PRMU0(IPLON) > 0.0_JPRB) THEN
108      IF (I_LAY >= K_LAYTROP(IPLON)+1) THEN
109        !  DO IG = 1, NG(25)
110!CDIR UNROLL=NG25
111        DO IG = 1 , NG25
112          Z_TAURAY = P_COLMOL(IPLON,I_LAY) * RAYLC(IG)
113          P_TAUG(IPLON,I_LAY,IG) = P_COLO3(IPLON,I_LAY) * ABSO3BC(IG)
114          !     &          + TAURAY
115          !    SSA(LAY,IG) = TAURAY/TAUG(LAY,IG)
116          P_TAUR(IPLON,I_LAY,IG) = Z_TAURAY
117        ENDDO
118      ENDIF
119    ENDIF
120  ENDDO
121ENDDO
122
123!-----------------------------------------------------------------------
124IF (LHOOK) CALL DR_HOOK('SRTM_TAUMOL25',1,ZHOOK_HANDLE)
125END ASSOCIATE
126END SUBROUTINE SRTM_TAUMOL25
Note: See TracBrowser for help on using the repository browser.