[3880] | 1 | !---------------------------------------------------------------------------- |
---|
| 2 | SUBROUTINE RRTM_TAUMOL2 (KIDIA,KFDIA,KLEV,P_TAU,PAVEL,P_COLDRY,& |
---|
| 3 | & P_TAUAERL,P_FAC00,P_FAC01,P_FAC10,P_FAC11,P_FORFAC,P_FORFRAC,K_INDFOR,K_JP,K_JT,K_JT1,& |
---|
| 4 | & P_COLH2O,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) |
---|
| 5 | |
---|
| 6 | ! BAND 2: 250-500 cm-1 (low - H2O; high - H2O) |
---|
| 7 | |
---|
| 8 | ! AUTHOR. |
---|
| 9 | ! ------- |
---|
| 10 | ! JJMorcrette, ECMWF |
---|
| 11 | |
---|
| 12 | ! MODIFICATIONS. |
---|
| 13 | ! -------------- |
---|
| 14 | ! M.Hamrud 01-Oct-2003 CY28 Cleaning |
---|
| 15 | ! NEC 25-Oct-2007 Optimisations |
---|
| 16 | ! JJMorcrette 20110613 flexible number of g-points |
---|
| 17 | ! ABozzo 201305 updated to rrtmg_lw_v4.85: |
---|
| 18 | !********* |
---|
| 19 | ! band 2: 350-500 cm-1 (low key - h2o; high key - h2o) |
---|
| 20 | ! |
---|
| 21 | ! note: previous version of rrtm band 2: |
---|
| 22 | ! 250 - 500 cm-1 (low - h2o; high - h2o) |
---|
| 23 | ! |
---|
| 24 | ! --------------------------------------------------------------------------- |
---|
| 25 | |
---|
| 26 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 27 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 28 | |
---|
| 29 | USE PARRRTM , ONLY : JPBAND |
---|
| 30 | USE YOERRTM , ONLY : JPGPT ,NG2 ,NGS1 |
---|
| 31 | USE YOERRTWN , ONLY : NSPA ,NSPB |
---|
| 32 | USE YOERRTA2 , ONLY : ABSA ,ABSB ,FRACREFA, FRACREFB,& |
---|
| 33 | & FORREF ,SELFREF |
---|
| 34 | |
---|
| 35 | IMPLICIT NONE |
---|
| 36 | |
---|
| 37 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
| 38 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
| 39 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
| 40 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAU(KIDIA:KFDIA,JPGPT,KLEV) |
---|
| 41 | REAL(KIND=JPRB) ,INTENT(IN) :: PAVEL(KIDIA:KFDIA,KLEV) ! Layer pressures (hPa) |
---|
| 42 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLDRY(KIDIA:KFDIA,KLEV) |
---|
| 43 | REAL(KIND=JPRB) ,INTENT(IN) :: P_TAUAERL(KIDIA:KFDIA,KLEV,JPBAND) |
---|
| 44 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
| 45 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
| 46 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
| 47 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
| 48 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFRAC(KIDIA:KFDIA,KLEV) |
---|
| 49 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFAC(KIDIA:KFDIA,KLEV) |
---|
| 50 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
| 51 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
| 52 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
| 53 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLH2O(KIDIA:KFDIA,KLEV) |
---|
| 54 | INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP(KIDIA:KFDIA) |
---|
| 55 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(KIDIA:KFDIA,KLEV) |
---|
| 56 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(KIDIA:KFDIA,KLEV) |
---|
| 57 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(KIDIA:KFDIA,KLEV) |
---|
| 58 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDFOR(KIDIA:KFDIA,KLEV) |
---|
| 59 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFRAC(KIDIA:KFDIA,JPGPT,KLEV) |
---|
| 60 | |
---|
| 61 | ! --------------------------------------------------------------------------- |
---|
| 62 | |
---|
| 63 | INTEGER(KIND=JPIM) :: IND0(KLEV),IND1(KLEV),INDS(KLEV), INDF(KLEV) |
---|
| 64 | |
---|
| 65 | INTEGER(KIND=JPIM) :: IG, JLAY |
---|
| 66 | INTEGER(KIND=JPIM) :: JLON |
---|
| 67 | |
---|
| 68 | REAL(KIND=JPRB) :: ZTAUFOR,ZTAUSELF,ZCORRADJ,ZPP |
---|
| 69 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 70 | |
---|
| 71 | ! Compute the optical depth by interpolating in ln(pressure) and |
---|
| 72 | ! temperature. Below LAYTROP, the water vapor self-continuum is |
---|
| 73 | ! interpolated (in temperature) separately. |
---|
| 74 | |
---|
| 75 | ASSOCIATE(NFLEVG=>KLEV) |
---|
| 76 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL2',0,ZHOOK_HANDLE) |
---|
| 77 | |
---|
| 78 | DO JLAY = 1, KLEV |
---|
| 79 | DO JLON = KIDIA, KFDIA |
---|
| 80 | IF (JLAY <= K_LAYTROP(JLON)) THEN |
---|
| 81 | IND0(JLAY) = ((K_JP(JLON,JLAY)-1)*5+(K_JT(JLON,JLAY)-1))*NSPA(2) + 1 |
---|
| 82 | IND1(JLAY) = (K_JP(JLON,JLAY)*5+(K_JT1(JLON,JLAY)-1))*NSPA(2) + 1 |
---|
| 83 | INDS(JLAY) = K_INDSELF(JLON,JLAY) |
---|
| 84 | INDF(JLAY) = K_INDFOR(JLON,JLAY) |
---|
| 85 | ZPP = PAVEL(JLON,JLAY) !hPa(mb) |
---|
| 86 | ZCORRADJ = 1._JPRB - .05_JPRB * (ZPP - 100._JPRB) / 900._JPRB |
---|
| 87 | !-- DS_000515 |
---|
| 88 | !CDIR UNROLL=NG2 |
---|
| 89 | DO IG = 1, NG2 |
---|
| 90 | !-- DS_000515 |
---|
| 91 | ZTAUSELF = P_SELFFAC(JLON,JLAY) * (SELFREF(INDS(JLAY),IG) + P_SELFFRAC(JLON,JLAY) * & |
---|
| 92 | & (SELFREF(INDS(JLAY)+1,IG) - SELFREF(INDS(JLAY),IG))) |
---|
| 93 | ZTAUFOR = P_FORFAC(JLON,JLAY) * (FORREF(INDF(JLAY),IG) + P_FORFRAC(JLON,JLAY) * & |
---|
| 94 | & (FORREF(INDF(JLAY)+1,IG) - FORREF(INDF(JLAY),IG))) |
---|
| 95 | P_TAU(JLON,NGS1+IG,JLAY) = ZCORRADJ * (P_COLH2O(JLON,JLAY) * & |
---|
| 96 | & (P_FAC00(JLON,JLAY) * ABSA(IND0(JLAY),IG) + & |
---|
| 97 | & P_FAC10(JLON,JLAY) * ABSA(IND0(JLAY)+1,IG) + & |
---|
| 98 | & P_FAC01(JLON,JLAY) * ABSA(IND1(JLAY),IG) + & |
---|
| 99 | & P_FAC11(JLON,JLAY) * ABSA(IND1(JLAY)+1,IG)) & |
---|
| 100 | & + ZTAUSELF + ZTAUFOR)+ P_TAUAERL(JLON,JLAY,2) |
---|
| 101 | PFRAC(JLON,NGS1+IG,JLAY) = FRACREFA(IG) |
---|
| 102 | |
---|
| 103 | ENDDO |
---|
| 104 | ENDIF |
---|
| 105 | IF (JLAY > K_LAYTROP(JLON)) THEN |
---|
| 106 | |
---|
| 107 | IND0(JLAY) = ((K_JP(JLON,JLAY)-13)*5+(K_JT(JLON,JLAY)-1))*NSPB(2) + 1 |
---|
| 108 | IND1(JLAY) = ((K_JP(JLON,JLAY)-12)*5+(K_JT1(JLON,JLAY)-1))*NSPB(2) + 1 |
---|
| 109 | INDF(JLAY) = K_INDFOR(JLON,JLAY) |
---|
| 110 | !-- JJM_000517 |
---|
| 111 | !CDIR UNROLL=NG2 |
---|
| 112 | DO IG = 1, NG2 |
---|
| 113 | !-- JJM_000517 |
---|
| 114 | ZTAUFOR = P_FORFAC(JLON,JLAY) * (FORREF(INDF(JLAY),IG) + & |
---|
| 115 | & P_FORFRAC(JLON,JLAY) * (FORREF(INDF(JLAY)+1,IG) - FORREF(INDF(JLAY),IG))) |
---|
| 116 | P_TAU(JLON,NGS1+IG,JLAY) = P_COLH2O(JLON,JLAY) * & |
---|
| 117 | & (P_FAC00(JLON,JLAY) * ABSB(IND0(JLAY),IG) + & |
---|
| 118 | & P_FAC10(JLON,JLAY) * ABSB(IND0(JLAY)+1,IG) + & |
---|
| 119 | & P_FAC01(JLON,JLAY) * ABSB(IND1(JLAY),IG) + & |
---|
| 120 | & P_FAC11(JLON,JLAY) * ABSB(IND1(JLAY)+1,IG)) & |
---|
| 121 | & + ZTAUFOR + P_TAUAERL(JLON,JLAY,2) |
---|
| 122 | PFRAC(JLON,NGS1+IG,JLAY) = FRACREFB(IG) |
---|
| 123 | |
---|
| 124 | ENDDO |
---|
| 125 | ENDIF |
---|
| 126 | ENDDO |
---|
| 127 | ENDDO |
---|
| 128 | |
---|
| 129 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL2',1,ZHOOK_HANDLE) |
---|
| 130 | |
---|
| 131 | END ASSOCIATE |
---|
| 132 | END SUBROUTINE RRTM_TAUMOL2 |
---|