[3908] | 1 | !****************************************************************************** |
---|
| 2 | SUBROUTINE RRTM_TAUMOL14 (KIDIA,KFDIA,KLEV,P_TAU,& |
---|
| 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_COLCO2,K_LAYTROP,P_SELFFAC,P_SELFFRAC,K_INDSELF,PFRAC) |
---|
| 5 | |
---|
| 6 | ! BAND 14: 2250-2380 cm-1 (low - CO2; high - CO2) |
---|
| 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 201306 updated to rrtmg v4.85 |
---|
| 18 | ! --------------------------------------------------------------------------- |
---|
| 19 | |
---|
| 20 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 21 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 22 | |
---|
| 23 | USE PARRRTM , ONLY : JPBAND |
---|
| 24 | USE YOERRTM , ONLY : JPGPT ,NGS13 ,NG14 |
---|
| 25 | USE YOERRTWN , ONLY : NSPA ,NSPB |
---|
| 26 | USE YOERRTA14, ONLY : ABSA ,ABSB ,FRACREFA, FRACREFB,SELFREF,FORREF |
---|
| 27 | |
---|
| 28 | IMPLICIT NONE |
---|
| 29 | |
---|
| 30 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA |
---|
| 31 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA |
---|
| 32 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV |
---|
| 33 | REAL(KIND=JPRB) ,INTENT(OUT) :: P_TAU(KIDIA:KFDIA,JPGPT,KLEV) |
---|
| 34 | REAL(KIND=JPRB) ,INTENT(IN) :: P_TAUAERL(KIDIA:KFDIA,KLEV,JPBAND) |
---|
| 35 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC00(KIDIA:KFDIA,KLEV) |
---|
| 36 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC01(KIDIA:KFDIA,KLEV) |
---|
| 37 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC10(KIDIA:KFDIA,KLEV) |
---|
| 38 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FAC11(KIDIA:KFDIA,KLEV) |
---|
| 39 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JP(KIDIA:KFDIA,KLEV) |
---|
| 40 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT(KIDIA:KFDIA,KLEV) |
---|
| 41 | INTEGER(KIND=JPIM),INTENT(IN) :: K_JT1(KIDIA:KFDIA,KLEV) |
---|
| 42 | REAL(KIND=JPRB) ,INTENT(IN) :: P_COLCO2(KIDIA:KFDIA,KLEV) |
---|
| 43 | INTEGER(KIND=JPIM),INTENT(IN) :: K_LAYTROP(KIDIA:KFDIA) |
---|
| 44 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFAC(KIDIA:KFDIA,KLEV) |
---|
| 45 | REAL(KIND=JPRB) ,INTENT(IN) :: P_SELFFRAC(KIDIA:KFDIA,KLEV) |
---|
| 46 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDSELF(KIDIA:KFDIA,KLEV) |
---|
| 47 | REAL(KIND=JPRB) ,INTENT(OUT) :: PFRAC(KIDIA:KFDIA,JPGPT,KLEV) |
---|
| 48 | |
---|
| 49 | INTEGER(KIND=JPIM),INTENT(IN) :: K_INDFOR(KIDIA:KFDIA,KLEV) |
---|
| 50 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFAC(KIDIA:KFDIA,KLEV) |
---|
| 51 | REAL(KIND=JPRB) ,INTENT(IN) :: P_FORFRAC(KIDIA:KFDIA,KLEV) |
---|
| 52 | ! --------------------------------------------------------------------------- |
---|
| 53 | |
---|
| 54 | INTEGER(KIND=JPIM) :: IG, IND0, IND1, INDS, INDF, JLAY |
---|
| 55 | INTEGER(KIND=JPIM) :: JLON |
---|
| 56 | REAL(KIND=JPRB) :: ZTAUFOR,ZTAUSELF |
---|
| 57 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 58 | |
---|
| 59 | ! Compute the optical depth by interpolating in ln(pressure) and |
---|
| 60 | ! temperature. Below laytrop, the water vapor self-continuum |
---|
| 61 | ! and foreign continuum is interpolated (in temperature) separately. |
---|
| 62 | |
---|
| 63 | ASSOCIATE(NFLEVG=>KLEV) |
---|
| 64 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',0,ZHOOK_HANDLE) |
---|
| 65 | |
---|
| 66 | DO JLAY = 1, KLEV |
---|
| 67 | DO JLON = KIDIA, KFDIA |
---|
| 68 | IF (JLAY <= K_LAYTROP(JLON)) THEN |
---|
| 69 | IND0 = ((K_JP(JLON,JLAY)-1)*5+(K_JT(JLON,JLAY)-1))*NSPA(14) + 1 |
---|
| 70 | IND1 = (K_JP(JLON,JLAY)*5+(K_JT1(JLON,JLAY)-1))*NSPA(14) + 1 |
---|
| 71 | INDS = K_INDSELF(JLON,JLAY) |
---|
| 72 | INDF = K_INDFOR(JLON,JLAY) |
---|
| 73 | |
---|
| 74 | !-- DS_990714 |
---|
| 75 | !-- jjm20110728 re-establishing the loop instead of specified IG to allow a flexible number of NG14 |
---|
| 76 | DO IG = 1, NG14 |
---|
| 77 | ! IG=1 |
---|
| 78 | ZTAUSELF = P_SELFFAC(JLON,JLAY)* (SELFREF(INDS,IG) + P_SELFFRAC(JLON,JLAY) * & |
---|
| 79 | & (SELFREF(INDS+1,IG) - SELFREF(INDS,IG))) |
---|
| 80 | ZTAUFOR = P_FORFAC(JLON,JLAY) * (FORREF(INDF,IG) + P_FORFRAC(JLON,JLAY) * & |
---|
| 81 | & (FORREF(INDF+1,IG) - FORREF(INDF,IG))) |
---|
| 82 | |
---|
| 83 | P_TAU(JLON,NGS13+IG,JLAY) = P_COLCO2(JLON,JLAY) *& |
---|
| 84 | & (P_FAC00(JLON,JLAY) * ABSA(IND0 ,IG) +& |
---|
| 85 | & P_FAC10(JLON,JLAY) * ABSA(IND0+1,IG) +& |
---|
| 86 | & P_FAC01(JLON,JLAY) * ABSA(IND1 ,IG) +& |
---|
| 87 | & P_FAC11(JLON,JLAY) * ABSA(IND1+1,IG)) & |
---|
| 88 | & + ZTAUSELF + ZTAUFOR & |
---|
| 89 | & + P_TAUAERL(JLON,JLAY,14) |
---|
| 90 | PFRAC(JLON,NGS13+IG,JLAY) = FRACREFA(IG) |
---|
| 91 | ENDDO |
---|
| 92 | !-- jjm20110728 |
---|
| 93 | !-- DS_990714 |
---|
| 94 | ENDIF |
---|
| 95 | |
---|
| 96 | IF (JLAY > K_LAYTROP(JLON)) THEN |
---|
| 97 | IND0 = ((K_JP(JLON,JLAY)-13)*5+(K_JT(JLON,JLAY)-1))*NSPB(14) + 1 |
---|
| 98 | IND1 = ((K_JP(JLON,JLAY)-12)*5+(K_JT1(JLON,JLAY)-1))*NSPB(14) + 1 |
---|
| 99 | !-- DS_990714 |
---|
| 100 | !-- jjm20110728 re-establishing the loop instead of specified IG to allow a flexible number of NG14 |
---|
| 101 | DO IG = 1, NG14 |
---|
| 102 | ! IG=1 |
---|
| 103 | P_TAU(JLON,NGS13+IG,JLAY) = P_COLCO2(JLON,JLAY) *& |
---|
| 104 | & (P_FAC00(JLON,JLAY) * ABSB(IND0 ,IG) +& |
---|
| 105 | & P_FAC10(JLON,JLAY) * ABSB(IND0+1,IG) +& |
---|
| 106 | & P_FAC01(JLON,JLAY) * ABSB(IND1 ,IG) +& |
---|
| 107 | & P_FAC11(JLON,JLAY) * ABSB(IND1+1,IG)) & |
---|
| 108 | & + P_TAUAERL(JLON,JLAY,14) |
---|
| 109 | PFRAC(JLON,NGS13+IG,JLAY) = FRACREFB(IG) |
---|
| 110 | ENDDO |
---|
| 111 | !-- jjm20110728 |
---|
| 112 | !-- DS_990714 |
---|
| 113 | ENDIF |
---|
| 114 | ENDDO |
---|
| 115 | ENDDO |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | IF (LHOOK) CALL DR_HOOK('RRTM_TAUMOL14',1,ZHOOK_HANDLE) |
---|
| 119 | |
---|
| 120 | END ASSOCIATE |
---|
| 121 | END SUBROUTINE RRTM_TAUMOL14 |
---|