[3908] | 1 | SUBROUTINE SRTM_INIT(DIRECTORY) |
---|
| 2 | |
---|
| 3 | !-- read in the basic coefficients to configure RRTM_SW |
---|
| 4 | !- creates module YOESRTWN with BG, NSPA, NSPB, WAVENUM1, WAVENUM2, |
---|
| 5 | ! DELWAVE, PREF, PREFLOG, TREF |
---|
| 6 | |
---|
| 7 | USE PARKIND1 ,ONLY : JPIM , JPRB |
---|
| 8 | USE YOMHOOK ,ONLY : LHOOK, DR_HOOK |
---|
| 9 | |
---|
| 10 | USE PARSRTM , ONLY : JPG, JPSW |
---|
| 11 | USE YOESRTM , ONLY : NGN |
---|
| 12 | USE YOESRTWN , ONLY : NG, NGM, WT, NGC, RWGT, WTSM |
---|
| 13 | !USE YOESRTWN , ONLY : NG, NGM, WT, NGC, NGN, RWGT, WTSM |
---|
| 14 | !USE YOMLUN , ONLY : NULOUT |
---|
| 15 | |
---|
| 16 | IMPLICIT NONE |
---|
| 17 | |
---|
| 18 | CHARACTER(LEN=*), INTENT(IN) :: DIRECTORY |
---|
| 19 | |
---|
| 20 | ! Local variables |
---|
| 21 | INTEGER(KIND=JPIM) :: IGC, IGCSM, IBND, IG, IND, IPR, IPRSM |
---|
| 22 | REAL(KIND=JPRB) :: ZWTSUM |
---|
| 23 | |
---|
| 24 | REAL(KIND=JPRB) :: ZHOOK_HANDLE |
---|
| 25 | |
---|
| 26 | !#include "susrtmcf.intfb.h" |
---|
| 27 | #include "susrtm.intfb.h" |
---|
| 28 | #include "srtm_kgb16.intfb.h" |
---|
| 29 | #include "srtm_kgb17.intfb.h" |
---|
| 30 | #include "srtm_kgb18.intfb.h" |
---|
| 31 | #include "srtm_kgb19.intfb.h" |
---|
| 32 | #include "srtm_kgb20.intfb.h" |
---|
| 33 | #include "srtm_kgb21.intfb.h" |
---|
| 34 | #include "srtm_kgb22.intfb.h" |
---|
| 35 | #include "srtm_kgb23.intfb.h" |
---|
| 36 | #include "srtm_kgb24.intfb.h" |
---|
| 37 | #include "srtm_kgb25.intfb.h" |
---|
| 38 | #include "srtm_kgb26.intfb.h" |
---|
| 39 | #include "srtm_kgb27.intfb.h" |
---|
| 40 | #include "srtm_kgb28.intfb.h" |
---|
| 41 | #include "srtm_kgb29.intfb.h" |
---|
| 42 | !#include "susrtop.intfb.h" |
---|
| 43 | |
---|
| 44 | #include "srtm_cmbgb16.intfb.h" |
---|
| 45 | #include "srtm_cmbgb17.intfb.h" |
---|
| 46 | #include "srtm_cmbgb18.intfb.h" |
---|
| 47 | #include "srtm_cmbgb19.intfb.h" |
---|
| 48 | #include "srtm_cmbgb20.intfb.h" |
---|
| 49 | #include "srtm_cmbgb21.intfb.h" |
---|
| 50 | #include "srtm_cmbgb22.intfb.h" |
---|
| 51 | #include "srtm_cmbgb23.intfb.h" |
---|
| 52 | #include "srtm_cmbgb24.intfb.h" |
---|
| 53 | #include "srtm_cmbgb25.intfb.h" |
---|
| 54 | #include "srtm_cmbgb26.intfb.h" |
---|
| 55 | #include "srtm_cmbgb27.intfb.h" |
---|
| 56 | #include "srtm_cmbgb28.intfb.h" |
---|
| 57 | #include "srtm_cmbgb29.intfb.h" |
---|
| 58 | |
---|
| 59 | IF (LHOOK) CALL DR_HOOK('SRTM_INIT',0,ZHOOK_HANDLE) |
---|
| 60 | |
---|
| 61 | !CALL SUSRTMCF |
---|
| 62 | CALL SUSRTM |
---|
| 63 | |
---|
| 64 | !-- read in the molecular absorption coefficients |
---|
| 65 | |
---|
| 66 | CALL SRTM_KGB16(DIRECTORY) |
---|
| 67 | CALL SRTM_KGB17 |
---|
| 68 | CALL SRTM_KGB18 |
---|
| 69 | CALL SRTM_KGB19 |
---|
| 70 | CALL SRTM_KGB20 |
---|
| 71 | CALL SRTM_KGB21 |
---|
| 72 | CALL SRTM_KGB22 |
---|
| 73 | CALL SRTM_KGB23 |
---|
| 74 | CALL SRTM_KGB24 |
---|
| 75 | CALL SRTM_KGB25 |
---|
| 76 | CALL SRTM_KGB26 |
---|
| 77 | CALL SRTM_KGB27 |
---|
| 78 | CALL SRTM_KGB28 |
---|
| 79 | CALL SRTM_KGB29 |
---|
| 80 | |
---|
| 81 | !-- read in the cloud optical properties |
---|
| 82 | !- creates module YOESRTOP with EXTLIQ1, SSALIQ1, ASYLIQ1, |
---|
| 83 | ! EXTICE3, SSAICE3, ASYICE3, FDLICE3 |
---|
| 84 | |
---|
| 85 | !-- RRTM_SW cloud optical properties are not used |
---|
| 86 | ! SRTM_CLDPROP is not called |
---|
| 87 | ! no need to call SUSRTOP |
---|
| 88 | |
---|
| 89 | !CALL SUSRTOP ( -1 ) |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | !Mike Iacono 20050804 |
---|
| 93 | !-- Perform g-point reduction from 16 per band (224 total points) to |
---|
| 94 | !-- a band dependent number (112 total points) for all absorption |
---|
| 95 | !-- coefficient input data and Planck fraction input data. |
---|
| 96 | !-- Compute relative weighting for new g-point combinations. |
---|
| 97 | |
---|
| 98 | IGCSM = 0 |
---|
| 99 | !WRITE(NULOUT,9001) JPSW,JPG |
---|
| 100 | 9001 format(1x,'srtm_init JPSW=',I3,' JPG=',I3) |
---|
| 101 | DO IBND = 1,JPSW |
---|
| 102 | IPRSM = 0 |
---|
| 103 | ! WRITE(NULOUT,9002) IBND,NGC(IBND) |
---|
| 104 | 9002 format(1x,'srtm_init NGC(',I3,')=',I3) |
---|
| 105 | IF (NGC(IBND) < JPG) THEN |
---|
| 106 | DO IGC = 1,NGC(IBND) |
---|
| 107 | IGCSM = IGCSM + 1 |
---|
| 108 | ZWTSUM = 0. |
---|
| 109 | ! WRITE(NULOUT,9003) IGC,IGCSM,NGN(IGCSM) |
---|
| 110 | 9003 format(1x,'srtm_init IGC=',I3,' NGN(',I3,')=',I3) |
---|
| 111 | DO IPR = 1, NGN(IGCSM) |
---|
| 112 | IPRSM = IPRSM + 1 |
---|
| 113 | ! WRITE(NULOUT,9004) IPR,IPRSM,WT(IPRSM) |
---|
| 114 | 9004 format(1x,'srtm_init IPR=',I3,' WT(',I3,')=',E14.7) |
---|
| 115 | ZWTSUM = ZWTSUM + WT(IPRSM) |
---|
| 116 | ENDDO |
---|
| 117 | ! WRITE(NULOUT,9005) IGC,ZWTSUM |
---|
| 118 | 9005 format(1x,'srtm_init WTSM(',I3,')=',E14.7) |
---|
| 119 | WTSM(IGC) = ZWTSUM |
---|
| 120 | ENDDO |
---|
| 121 | |
---|
| 122 | ! WRITE(NULOUT,9006) IBND+15,NG(IBND+15) |
---|
| 123 | 9006 format(1x,'srtm_init NG(',I3,')=',I3) |
---|
| 124 | DO IG = 1,NG(IBND+15) |
---|
| 125 | IND = (IBND-1)*JPG + IG |
---|
| 126 | !! WRITE(NULOUT,9007) IND,NGM(IND), IG,WT(IG), WTSM(NGM(IND)), IND,RWGT(IND) |
---|
| 127 | 9007 format(1x,'srtm_init NGM(',I3,')=',I3,' WT(',I3,')=',E13.7,' WTSM=',E13.7,' RWGT(',I3,')=',E13.7) |
---|
| 128 | RWGT(IND) = WT(IG)/WTSM(NGM(IND)) |
---|
| 129 | ! WRITE(NULOUT,9007) IND,NGM(IND),IG,WT(IG),WTSM(NGM(IND)),IND,RWGT(IND) |
---|
| 130 | ENDDO |
---|
| 131 | ELSE |
---|
| 132 | DO IG = 1,NG(IBND+15) |
---|
| 133 | IGCSM = IGCSM + 1 |
---|
| 134 | IND = (IBND-1)*JPG + IG |
---|
| 135 | RWGT(IND) = 1.0 |
---|
| 136 | ENDDO |
---|
| 137 | ENDIF |
---|
| 138 | ENDDO |
---|
| 139 | |
---|
| 140 | CALL SRTM_CMBGB16 |
---|
| 141 | CALL SRTM_CMBGB17 |
---|
| 142 | CALL SRTM_CMBGB18 |
---|
| 143 | CALL SRTM_CMBGB19 |
---|
| 144 | CALL SRTM_CMBGB20 |
---|
| 145 | CALL SRTM_CMBGB21 |
---|
| 146 | CALL SRTM_CMBGB22 |
---|
| 147 | CALL SRTM_CMBGB23 |
---|
| 148 | CALL SRTM_CMBGB24 |
---|
| 149 | CALL SRTM_CMBGB25 |
---|
| 150 | CALL SRTM_CMBGB26 |
---|
| 151 | CALL SRTM_CMBGB27 |
---|
| 152 | CALL SRTM_CMBGB28 |
---|
| 153 | CALL SRTM_CMBGB29 |
---|
| 154 | |
---|
| 155 | !----------------------------------------------------------------------- |
---|
| 156 | IF (LHOOK) CALL DR_HOOK('SRTM_INIT',1,ZHOOK_HANDLE) |
---|
| 157 | END SUBROUTINE SRTM_INIT |
---|
| 158 | |
---|