[2089] | 1 | SUBROUTINE SWTT1 ( KIDIA,KFDIA,KLON,KNU,KABS,KIND, PU, PTR ) |
---|
| 2 | |
---|
| 3 | !**** *SWTT1* - COMPUTES THE SHORTWAVE TRANSMISSION FUNCTIONS |
---|
| 4 | |
---|
| 5 | ! PURPOSE. |
---|
| 6 | ! -------- |
---|
| 7 | ! THIS ROUTINE COMPUTES THE TRANSMISSION FUNCTIONS FOR ALL THE |
---|
| 8 | ! ABSORBERS (H2O, UNIFORMLY MIXED GASES, AND O3) IN THE TWO SPECTRAL |
---|
| 9 | ! INTERVALS. |
---|
| 10 | |
---|
| 11 | !** INTERFACE. |
---|
| 12 | ! ---------- |
---|
| 13 | ! *SWTT1* IS CALLED FROM *SW1S*. |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | ! EXPLICIT ARGUMENTS : |
---|
| 17 | ! -------------------- |
---|
| 18 | ! KNU : ; INDEX OF THE SPECTRAL INTERVAL |
---|
| 19 | ! KABS : ; NUMBER OF ABSORBERS |
---|
| 20 | ! KIND : (KABS) ; INDICES OF THE ABSORBERS |
---|
| 21 | ! PU : (KLON,KABS) ; ABSORBER AMOUNT |
---|
| 22 | ! ==== OUTPUTS === |
---|
| 23 | ! PTR : (KLON,KABS) ; TRANSMISSION FUNCTION |
---|
| 24 | |
---|
| 25 | ! IMPLICIT ARGUMENTS : NONE |
---|
| 26 | ! -------------------- |
---|
| 27 | |
---|
| 28 | ! METHOD. |
---|
| 29 | ! ------- |
---|
| 30 | |
---|
| 31 | ! TRANSMISSION FUNCTION ARE COMPUTED USING PADE APPROXIMANTS |
---|
| 32 | ! AND HORNER'S ALGORITHM. |
---|
| 33 | |
---|
| 34 | ! EXTERNALS. |
---|
| 35 | ! ---------- |
---|
| 36 | |
---|
| 37 | ! NONE |
---|
| 38 | |
---|
| 39 | ! REFERENCE. |
---|
| 40 | ! ---------- |
---|
| 41 | |
---|
| 42 | ! SEE RADIATION'S PART OF THE MODEL'S DOCUMENTATION AND |
---|
| 43 | ! ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE IFS |
---|
| 44 | |
---|
| 45 | ! AUTHOR. |
---|
| 46 | ! ------- |
---|
| 47 | ! JEAN-JACQUES MORCRETTE *ECMWF* |
---|
| 48 | |
---|
| 49 | ! MODIFICATIONS. |
---|
| 50 | ! -------------- |
---|
| 51 | ! ORIGINAL : 95-01-20 |
---|
| 52 | |
---|
| 53 | !----------------------------------------------------------------------- |
---|
| 54 | |
---|
| 55 | #include "tsmbkind.h" |
---|
| 56 | |
---|
| 57 | USE YOESW , ONLY : APAD ,BPAD ,D |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | IMPLICIT NONE |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | ! DUMMY INTEGER SCALARS |
---|
| 64 | INTEGER_M :: KABS |
---|
| 65 | INTEGER_M :: KFDIA |
---|
| 66 | INTEGER_M :: KIDIA |
---|
| 67 | INTEGER_M :: KLON |
---|
| 68 | INTEGER_M :: KNU |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | !----------------------------------------------------------------------- |
---|
| 73 | |
---|
| 74 | !* 0.1 ARGUMENTS |
---|
| 75 | ! --------- |
---|
| 76 | |
---|
| 77 | INTEGER_M :: KIND(KABS) |
---|
| 78 | REAL_B :: PU(KLON,KABS) |
---|
| 79 | REAL_B :: PTR(KLON,KABS) |
---|
| 80 | |
---|
| 81 | !----------------------------------------------------------------------- |
---|
| 82 | |
---|
| 83 | !* 0.2 LOCAL ARRAYS |
---|
| 84 | ! ------------ |
---|
| 85 | |
---|
| 86 | REAL_B :: ZR1(KLON), ZR2(KLON), ZU(KLON) |
---|
| 87 | |
---|
| 88 | ! LOCAL INTEGER SCALARS |
---|
| 89 | INTEGER_M :: IA, JA, JL |
---|
| 90 | |
---|
| 91 | |
---|
| 92 | !----------------------------------------------------------------------- |
---|
| 93 | |
---|
| 94 | !* 1. HORNER'S ALGORITHM TO COMPUTE TRANSMISSION FUNCTION |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | DO JA = 1,KABS |
---|
| 98 | IA=KIND(JA) |
---|
| 99 | DO JL = KIDIA,KFDIA |
---|
| 100 | ZU(JL) = PU(JL,JA) |
---|
| 101 | ZR1(JL) = APAD(KNU,IA,1) + ZU(JL) * (APAD(KNU,IA,2) + ZU(JL)& |
---|
| 102 | &* ( APAD(KNU,IA,3) + ZU(JL) * (APAD(KNU,IA,4) + ZU(JL)& |
---|
| 103 | &* ( APAD(KNU,IA,5) + ZU(JL) * (APAD(KNU,IA,6) + ZU(JL)& |
---|
| 104 | &* ( APAD(KNU,IA,7) )))))) |
---|
| 105 | |
---|
| 106 | ZR2(JL) = BPAD(KNU,IA,1) + ZU(JL) * (BPAD(KNU,IA,2) + ZU(JL)& |
---|
| 107 | &* ( BPAD(KNU,IA,3) + ZU(JL) * (BPAD(KNU,IA,4) + ZU(JL)& |
---|
| 108 | &* ( BPAD(KNU,IA,5) + ZU(JL) * (BPAD(KNU,IA,6) + ZU(JL)& |
---|
| 109 | &* ( BPAD(KNU,IA,7) )))))) |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | !* 2. ADD THE BACKGROUND TRANSMISSION |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | PTR(JL,JA) = (ZR1(JL)/ZR2(JL)) * (_ONE_-D(KNU,IA)) + D(KNU,IA) |
---|
| 116 | ENDDO |
---|
| 117 | ENDDO |
---|
| 118 | |
---|
| 119 | RETURN |
---|
| 120 | END SUBROUTINE SWTT1 |
---|