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