[3331] | 1 | !*************************************************************************** |
---|
| 2 | SUBROUTINE RRTM_INIT_140GP |
---|
| 3 | !*************************************************************************** |
---|
| 4 | ! Reformatted for F90 by JJMorcrette, ECMWF, 980714 |
---|
| 5 | |
---|
| 6 | ! Parameters |
---|
| 7 | USE PARKIND1 ,ONLY : JPIM ,JPRB |
---|
| 8 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 9 | |
---|
| 10 | USE PARRRTM , ONLY : JPBAND ,JPG ,JPGPT |
---|
| 11 | USE YOERRTWN , ONLY : NG |
---|
| 12 | USE YOERRTFTR, ONLY : NGC ,NGN ,NGM , WT |
---|
| 13 | ! Output |
---|
| 14 | USE YOERRTBG2, ONLY : CORR1 ,CORR2 |
---|
| 15 | USE YOERRTRWT, ONLY : FREFA ,FREFB ,FREFADF ,FREFBDF ,RWGT |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | IMPLICIT NONE |
---|
| 19 | REAL(KIND=JPRB) :: Z_WTSM(JPG) |
---|
| 20 | |
---|
| 21 | INTEGER(KIND=JPIM) :: I, IBND, IG, IGC, IGCSM, IND, IPR, IPRSM, IPT |
---|
| 22 | |
---|
| 23 | REAL(KIND=JPRB) :: Z_FP, Z_RTFP, Z_WTSUM |
---|
| 24 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 25 | |
---|
| 26 | #include "rrtm_kgb1.intfb.h" |
---|
| 27 | #include "rrtm_kgb10.intfb.h" |
---|
| 28 | #include "rrtm_kgb11.intfb.h" |
---|
| 29 | #include "rrtm_kgb12.intfb.h" |
---|
| 30 | #include "rrtm_kgb13.intfb.h" |
---|
| 31 | #include "rrtm_kgb14.intfb.h" |
---|
| 32 | #include "rrtm_kgb15.intfb.h" |
---|
| 33 | #include "rrtm_kgb16.intfb.h" |
---|
| 34 | #include "rrtm_kgb2.intfb.h" |
---|
| 35 | #include "rrtm_kgb3.intfb.h" |
---|
| 36 | #include "rrtm_kgb4.intfb.h" |
---|
| 37 | #include "rrtm_kgb5.intfb.h" |
---|
| 38 | #include "rrtm_kgb6.intfb.h" |
---|
| 39 | #include "rrtm_kgb7.intfb.h" |
---|
| 40 | #include "rrtm_kgb8.intfb.h" |
---|
| 41 | #include "rrtm_kgb9.intfb.h" |
---|
| 42 | |
---|
| 43 | #include "rrtm_cmbgb1.intfb.h" |
---|
| 44 | #include "rrtm_cmbgb10.intfb.h" |
---|
| 45 | #include "rrtm_cmbgb11.intfb.h" |
---|
| 46 | #include "rrtm_cmbgb12.intfb.h" |
---|
| 47 | #include "rrtm_cmbgb13.intfb.h" |
---|
| 48 | #include "rrtm_cmbgb14.intfb.h" |
---|
| 49 | #include "rrtm_cmbgb15.intfb.h" |
---|
| 50 | #include "rrtm_cmbgb16.intfb.h" |
---|
| 51 | #include "rrtm_cmbgb2.intfb.h" |
---|
| 52 | #include "rrtm_cmbgb3.intfb.h" |
---|
| 53 | #include "rrtm_cmbgb4.intfb.h" |
---|
| 54 | #include "rrtm_cmbgb5.intfb.h" |
---|
| 55 | #include "rrtm_cmbgb6.intfb.h" |
---|
| 56 | #include "rrtm_cmbgb7.intfb.h" |
---|
| 57 | #include "rrtm_cmbgb8.intfb.h" |
---|
| 58 | #include "rrtm_cmbgb9.intfb.h" |
---|
| 59 | |
---|
| 60 | IF (LHOOK) CALL DR_HOOK('RRTM_INIT_140GP',0,ZHOOK_HANDLE) |
---|
| 61 | |
---|
| 62 | ! Read the absorption-related coefficients over the 16 x 16 g-points |
---|
| 63 | |
---|
| 64 | CALL RRTM_KGB1 |
---|
| 65 | CALL RRTM_KGB2 |
---|
| 66 | CALL RRTM_KGB3 |
---|
| 67 | CALL RRTM_KGB4 |
---|
| 68 | CALL RRTM_KGB5 |
---|
| 69 | CALL RRTM_KGB6 |
---|
| 70 | CALL RRTM_KGB7 |
---|
| 71 | CALL RRTM_KGB8 |
---|
| 72 | CALL RRTM_KGB9 |
---|
| 73 | CALL RRTM_KGB10 |
---|
| 74 | CALL RRTM_KGB11 |
---|
| 75 | CALL RRTM_KGB12 |
---|
| 76 | CALL RRTM_KGB13 |
---|
| 77 | CALL RRTM_KGB14 |
---|
| 78 | CALL RRTM_KGB15 |
---|
| 79 | CALL RRTM_KGB16 |
---|
| 80 | |
---|
| 81 | ! Calculate lookup tables for functions needed in routine TAUMOL (TAUGB2) |
---|
| 82 | |
---|
| 83 | CORR1(0) = 1.0_JPRB |
---|
| 84 | CORR1(200) = 1.0_JPRB |
---|
| 85 | CORR2(0) = 1.0_JPRB |
---|
| 86 | CORR2(200) = 1.0_JPRB |
---|
| 87 | DO I = 1,199 |
---|
| 88 | Z_FP = 0.005_JPRB*REAL(I) |
---|
| 89 | Z_RTFP = SQRT(Z_FP) |
---|
| 90 | CORR1(I) = Z_RTFP/Z_FP |
---|
| 91 | CORR2(I) = (1.0_JPRB-Z_RTFP)/(1.0_JPRB-Z_FP) |
---|
| 92 | ENDDO |
---|
| 93 | |
---|
| 94 | ! Perform g-point reduction from 16 per band (256 total points) to |
---|
| 95 | ! a band dependant number (140 total points) for all absorption |
---|
| 96 | ! coefficient input data and Planck fraction input data. |
---|
| 97 | ! Compute relative weighting for new g-point combinations. |
---|
| 98 | |
---|
| 99 | IGCSM = 0 |
---|
| 100 | DO IBND = 1,JPBAND |
---|
| 101 | IPRSM = 0 |
---|
| 102 | IF (NGC(IBND) < 16) THEN |
---|
| 103 | DO IGC = 1,NGC(IBND) |
---|
| 104 | IGCSM = IGCSM + 1 |
---|
| 105 | Z_WTSUM = 0.0_JPRB |
---|
| 106 | DO IPR = 1, NGN(IGCSM) |
---|
| 107 | IPRSM = IPRSM + 1 |
---|
| 108 | Z_WTSUM = Z_WTSUM + WT(IPRSM) |
---|
| 109 | ENDDO |
---|
| 110 | Z_WTSM(IGC) = Z_WTSUM |
---|
| 111 | ENDDO |
---|
| 112 | DO IG = 1,NG(IBND) |
---|
| 113 | IND = (IBND-1)*16 + IG |
---|
| 114 | RWGT(IND) = WT(IG)/Z_WTSM(NGM(IND)) |
---|
| 115 | ENDDO |
---|
| 116 | ELSE |
---|
| 117 | DO IG = 1,NG(IBND) |
---|
| 118 | IGCSM = IGCSM + 1 |
---|
| 119 | IND = (IBND-1)*16 + IG |
---|
| 120 | RWGT(IND) = 1.0_JPRB |
---|
| 121 | ENDDO |
---|
| 122 | ENDIF |
---|
| 123 | ENDDO |
---|
| 124 | |
---|
| 125 | ! Initialize arrays for combined Planck fraction data. |
---|
| 126 | |
---|
| 127 | DO IPT = 1,13 |
---|
| 128 | DO IPR = 1, JPGPT |
---|
| 129 | FREFA(IPR,IPT) = 0.0_JPRB |
---|
| 130 | FREFADF(IPR,IPT) = 0.0_JPRB |
---|
| 131 | ENDDO |
---|
| 132 | ENDDO |
---|
| 133 | DO IPT = 1,6 |
---|
| 134 | DO IPR = 1, JPGPT |
---|
| 135 | FREFB(IPR,IPT) = 0.0_JPRB |
---|
| 136 | FREFBDF(IPR,IPT) = 0.0_JPRB |
---|
| 137 | ENDDO |
---|
| 138 | ENDDO |
---|
| 139 | |
---|
| 140 | ! Reduce g-points for relevant data in each LW spectral band. |
---|
| 141 | |
---|
| 142 | CALL RRTM_CMBGB1 |
---|
| 143 | CALL RRTM_CMBGB2 |
---|
| 144 | CALL RRTM_CMBGB3 |
---|
| 145 | CALL RRTM_CMBGB4 |
---|
| 146 | CALL RRTM_CMBGB5 |
---|
| 147 | CALL RRTM_CMBGB6 |
---|
| 148 | CALL RRTM_CMBGB7 |
---|
| 149 | CALL RRTM_CMBGB8 |
---|
| 150 | CALL RRTM_CMBGB9 |
---|
| 151 | CALL RRTM_CMBGB10 |
---|
| 152 | CALL RRTM_CMBGB11 |
---|
| 153 | CALL RRTM_CMBGB12 |
---|
| 154 | CALL RRTM_CMBGB13 |
---|
| 155 | CALL RRTM_CMBGB14 |
---|
| 156 | CALL RRTM_CMBGB15 |
---|
| 157 | CALL RRTM_CMBGB16 |
---|
| 158 | |
---|
| 159 | IF (LHOOK) CALL DR_HOOK('RRTM_INIT_140GP',1,ZHOOK_HANDLE) |
---|
| 160 | END SUBROUTINE RRTM_INIT_140GP |
---|