[38] | 1 | SUBROUTINE GWSTRESS |
---|
| 2 | * ( klon , klev |
---|
| 3 | * , KKCRIT, KSECT, KKHLIM, KTEST, KKCRITH, KCRIT, kkenvh |
---|
| 4 | * , kknu |
---|
| 5 | * , PRHO , PSTAB, PVPH , PVAR ,PVARor, psig |
---|
| 6 | * , PTFR , PTAU |
---|
| 7 | * ,pgeom1 , pgamma, pd1 , pd2 ,pdmod ,pnu ) |
---|
| 8 | C |
---|
| 9 | C**** *GWSTRESS* |
---|
| 10 | C |
---|
| 11 | C PURPOSE. |
---|
| 12 | C -------- |
---|
| 13 | C |
---|
| 14 | C** INTERFACE. |
---|
| 15 | C ---------- |
---|
| 16 | C CALL *GWSTRESS* FROM *GWDRAG* |
---|
| 17 | C |
---|
| 18 | C EXPLICIT ARGUMENTS : |
---|
| 19 | C -------------------- |
---|
| 20 | C ==== INPUTS === |
---|
| 21 | C ==== OUTPUTS === |
---|
| 22 | C |
---|
| 23 | C IMPLICIT ARGUMENTS : NONE |
---|
| 24 | C -------------------- |
---|
| 25 | C |
---|
| 26 | C METHOD. |
---|
| 27 | C ------- |
---|
| 28 | C |
---|
| 29 | C |
---|
| 30 | C EXTERNALS. |
---|
| 31 | C ---------- |
---|
| 32 | C |
---|
| 33 | C |
---|
| 34 | C REFERENCE. |
---|
| 35 | C ---------- |
---|
| 36 | C |
---|
| 37 | C SEE ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE "I.F.S." |
---|
| 38 | C |
---|
| 39 | C AUTHOR. |
---|
| 40 | C ------- |
---|
| 41 | C |
---|
| 42 | C MODIFICATIONS. |
---|
| 43 | C -------------- |
---|
| 44 | C F. LOTT PUT THE NEW GWD ON IFS 22/11/93 |
---|
| 45 | C |
---|
| 46 | C----------------------------------------------------------------------- |
---|
[1047] | 47 | use dimradmars_mod, only: ndlo2 |
---|
[38] | 48 | implicit none |
---|
| 49 | integer klon,klev,kidia,kfdia |
---|
| 50 | |
---|
| 51 | #include "yoegwd.h" |
---|
| 52 | |
---|
| 53 | C----------------------------------------------------------------------- |
---|
| 54 | C |
---|
| 55 | C* 0.1 ARGUMENTS |
---|
| 56 | C --------- |
---|
| 57 | C |
---|
| 58 | INTEGER KKCRIT(NDLO2),KKCRITH(NDLO2),KCRIT(NDLO2),KSECT(NDLO2), |
---|
| 59 | * KKHLIM(NDLO2),KTEST(NDLO2),KKENVH(NDLO2),KKNU(NDLO2) |
---|
| 60 | C |
---|
| 61 | REAL PRHO(NDLO2,klev+1),PSTAB(NDLO2,klev+1),PTAU(NDLO2,klev+1), |
---|
| 62 | * PVPH(NDLO2,klev+1),PVAR(NDLO2,4),PTFR(NDLO2), |
---|
| 63 | * pgeom1(NDLO2,klev),PVARor(NDLO2) |
---|
| 64 | C |
---|
| 65 | real pd1(NDLO2),pd2(NDLO2),pnu(NDLO2),psig(NDLO2),pgamma(NDLO2) |
---|
| 66 | real pdmod(NDLO2) |
---|
| 67 | C |
---|
| 68 | C----------------------------------------------------------------------- |
---|
| 69 | C |
---|
| 70 | C* 0.2 LOCAL ARRAYS |
---|
| 71 | C ------------ |
---|
| 72 | integer jl |
---|
| 73 | real zblock,zvar,zeff |
---|
| 74 | logical lo |
---|
| 75 | |
---|
| 76 | C |
---|
| 77 | C----------------------------------------------------------------------- |
---|
| 78 | C |
---|
| 79 | C* 0.3 FUNCTIONS |
---|
| 80 | C --------- |
---|
| 81 | C ------------------------------------------------------------------ |
---|
| 82 | C |
---|
| 83 | C* 1. INITIALIZATION |
---|
| 84 | C -------------- |
---|
| 85 | |
---|
| 86 | |
---|
| 87 | kidia=1 |
---|
| 88 | kfdia=klon |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | C |
---|
| 92 | 100 CONTINUE |
---|
| 93 | C |
---|
| 94 | C* 3.1 GRAVITY WAVE STRESS. |
---|
| 95 | C |
---|
| 96 | 300 CONTINUE |
---|
| 97 | C |
---|
| 98 | C |
---|
| 99 | DO 301 JL=kidia,kfdia |
---|
| 100 | IF(KTEST(JL).EQ.1) THEN |
---|
| 101 | |
---|
| 102 | C EFFECTIVE MOUNTAIN HEIGHT ABOVE THE BLOCKED FLOW |
---|
| 103 | |
---|
| 104 | c IF(KKENVH(JL).EQ.KLEV)THEN |
---|
| 105 | ZBLOCK=0.0 |
---|
| 106 | c ELSE |
---|
| 107 | c ZBLOCK=(PGEOM1(JL,KKENVH(JL))+PGEOM1(JL,KKENVH(JL)+1))/2./RG |
---|
| 108 | c ENDIF |
---|
| 109 | |
---|
| 110 | ZVAR=PVAROR(JL) |
---|
| 111 | ZEFF=AMAX1(0.,2.*ZVAR-ZBLOCK) |
---|
| 112 | |
---|
| 113 | PTAU(JL,KLEV+1)=PRHO(JL,KLEV+1)*GKDRAG*psig(jl)*ZEFF**2 |
---|
| 114 | * /4./ZVAR*PVPH(JL,KLEV+1)*pdmod(jl)*sqrt(pstab(jl,klev+1)) |
---|
| 115 | |
---|
| 116 | C TOO SMALL VALUE OF STRESS OR LOW LEVEL FLOW INCLUDE CRITICAL LEVEL |
---|
| 117 | C OR LOW LEVEL FLOW: GRAVITY WAVE STRESS NUL. |
---|
| 118 | |
---|
| 119 | LO=(PTAU(JL,KLEV+1).LT.GTSEC).OR.(KCRIT(JL).GE.KKNU(JL)) |
---|
| 120 | * .OR.(PVPH(JL,KLEV+1).LT.GVCRIT) |
---|
| 121 | c IF(LO) PTAU(JL,KLEV+1)=0.0 |
---|
| 122 | |
---|
| 123 | ELSE |
---|
| 124 | |
---|
| 125 | PTAU(JL,KLEV+1)=0.0 |
---|
| 126 | |
---|
| 127 | ENDIF |
---|
| 128 | |
---|
| 129 | 301 CONTINUE |
---|
| 130 | C |
---|
| 131 | RETURN |
---|
| 132 | END |
---|