1 | !----------------------------------------------------------------------- |
---|
2 | ! |
---|
3 | !NCEP_MESO:MODEL_LAYER: HORIZONTAL DIFFUSION |
---|
4 | ! |
---|
5 | !----------------------------------------------------------------------- |
---|
6 | ! |
---|
7 | #include "nmm_loop_basemacros.h" |
---|
8 | #include "nmm_loop_macros.h" |
---|
9 | ! |
---|
10 | !----------------------------------------------------------------------- |
---|
11 | ! |
---|
12 | MODULE MODULE_DIFFUSION_NMM |
---|
13 | ! |
---|
14 | !----------------------------------------------------------------------- |
---|
15 | USE MODULE_MODEL_CONSTANTS |
---|
16 | !----------------------------------------------------------------------- |
---|
17 | ! |
---|
18 | LOGICAL :: SECOND=.TRUE. |
---|
19 | INTEGER :: KSMUD=1 |
---|
20 | ! |
---|
21 | !----------------------------------------------------------------------- |
---|
22 | ! |
---|
23 | CONTAINS |
---|
24 | ! |
---|
25 | !*********************************************************************** |
---|
26 | SUBROUTINE HDIFF(NTSD,DT,FIS,DY,HDAC,HDACV & |
---|
27 | & ,HBM2,DETA1,SIGMA & |
---|
28 | & ,T,Q,U,V,Q2,Z,W,SM,SICE & |
---|
29 | & ,IHE,IHW,IVE,IVW & |
---|
30 | & ,IDS,IDE,JDS,JDE,KDS,KDE & |
---|
31 | & ,IMS,IME,JMS,JME,KMS,KME & |
---|
32 | & ,ITS,ITE,JTS,JTE,KTS,KTE) |
---|
33 | !*********************************************************************** |
---|
34 | !$$$ SUBPROGRAM DOCUMENTATION BLOCK |
---|
35 | ! . . . |
---|
36 | ! SUBPROGRAM: HDIFF HORIZONTAL DIFFUSION |
---|
37 | ! PRGRMMR: JANJIC ORG: W/NP22 DATE: 93-11-17 |
---|
38 | ! |
---|
39 | ! ABSTRACT: |
---|
40 | ! HDIFF CALCULATES THE CONTRIBUTION OF THE HORIZONTAL DIFFUSION |
---|
41 | ! TO THE TENDENCIES OF TEMPERATURE, SPECIFIC HUMIDITY, WIND |
---|
42 | ! COMPONENTS, AND TURBULENT KINETIC ENERGY AND THEN UPDATES THOSE |
---|
43 | ! VARIABLES. A SECOND-ORDER NONLINEAR SCHEME SIMILAR TO |
---|
44 | ! SMAGORINSKY'S IS USED WHERE THE DIFFUSION COEFFICIENT IS |
---|
45 | ! A FUNCTION OF THE DEFORMATION FIELD AND OF THE TURBULENT |
---|
46 | ! KINETIC ENERGY. |
---|
47 | ! |
---|
48 | ! PROGRAM HISTORY LOG: |
---|
49 | ! 87-06-?? JANJIC - ORIGINATOR |
---|
50 | ! 95-03-25 BLACK - CONVERSION FROM 1-D TO 2-D IN HORIZONTAL |
---|
51 | ! 96-03-28 BLACK - ADDED EXTERNAL EDGE |
---|
52 | ! 98-10-30 BLACK - MODIFIED FOR DISTRIBUTED MEMORY |
---|
53 | ! 02-02-07 BLACK - CONVERTED TO WRF STRUCTURE |
---|
54 | ! 02-08-29 MICHALAKES - |
---|
55 | ! 02-09-06 WOLFE - |
---|
56 | ! 03-05-27 JANJIC - ADDED SLOPE ADJUSTMENT |
---|
57 | ! 04-11-18 BLACK - THREADED |
---|
58 | ! 05-12-12 BLACK - CONVERTED FROM IKJ TO IJK |
---|
59 | ! 06-08-15 JANJIC - ENHANCEMENT AT SLOPING SEA COAST |
---|
60 | ! |
---|
61 | ! USAGE: CALL HDIFF FROM SUBROUTINE SOLVE_RUNSTREAM |
---|
62 | ! |
---|
63 | ! INPUT ARGUMENT LIST: |
---|
64 | ! |
---|
65 | ! OUTPUT ARGUMENT LIST: |
---|
66 | ! |
---|
67 | ! OUTPUT FILES: |
---|
68 | ! NONE |
---|
69 | ! |
---|
70 | ! SUBPROGRAMS CALLED: |
---|
71 | ! |
---|
72 | ! UNIQUE: NONE |
---|
73 | ! |
---|
74 | ! LIBRARY: NONE |
---|
75 | ! |
---|
76 | ! ATTRIBUTES: |
---|
77 | ! LANGUAGE: FORTRAN 90 |
---|
78 | ! MACHINE : IBM SP |
---|
79 | !$$$ |
---|
80 | !*********************************************************************** |
---|
81 | !----------------------------------------------------------------------- |
---|
82 | ! |
---|
83 | IMPLICIT NONE |
---|
84 | ! |
---|
85 | !----------------------------------------------------------------------- |
---|
86 | ! |
---|
87 | INTEGER,INTENT(IN) :: IDS,IDE,JDS,JDE,KDS,KDE & |
---|
88 | & ,IMS,IME,JMS,JME,KMS,KME & |
---|
89 | & ,ITS,ITE,JTS,JTE,KTS,KTE |
---|
90 | ! |
---|
91 | INTEGER,INTENT(IN) :: NTSD |
---|
92 | ! |
---|
93 | REAL,INTENT(IN) :: DT,DY |
---|
94 | ! |
---|
95 | REAL,DIMENSION(KMS:KME),INTENT(IN) :: DETA1 |
---|
96 | ! |
---|
97 | REAL,DIMENSION(IMS:IME,JMS:JME),INTENT(IN) :: FIS,HBM2 & |
---|
98 | & ,HDAC,HDACV & |
---|
99 | & ,SM,SICE |
---|
100 | ! |
---|
101 | REAL,DIMENSION(IMS:IME,JMS:JME,KMS:KME),INTENT(IN) :: W,Z |
---|
102 | ! |
---|
103 | REAL,DIMENSION(IMS:IME,JMS:JME,KMS:KME),INTENT(INOUT) :: T,Q,Q2 & |
---|
104 | & ,U,V |
---|
105 | ! |
---|
106 | INTEGER, DIMENSION(JMS:JME), INTENT(IN) :: IHE,IHW,IVE,IVW |
---|
107 | ! |
---|
108 | !----------------------------------------------------------------------- |
---|
109 | ! |
---|
110 | INTEGER,INTENT(IN) :: SIGMA |
---|
111 | ! |
---|
112 | !----------------------------------------------------------------------- |
---|
113 | !*** LOCAL VARIABLES |
---|
114 | !----------------------------------------------------------------------- |
---|
115 | ! |
---|
116 | INTEGER :: I,J,K,KS |
---|
117 | ! |
---|
118 | REAL :: DEF_IJ,DEFSK,DEFTK,HKNE_IJ,HKSE_IJ,Q2L,RDY,SLOP,SLOPHC & |
---|
119 | & ,UTK,VKNE_IJ,VKSE_IJ,VTK,DEF1,DEF2,DEF3,DEF4 |
---|
120 | ! |
---|
121 | REAL,DIMENSION(ITS-5:ITE+5,JTS-5:JTE+5) :: DEF,HKNE,HKSE & |
---|
122 | & ,Q2DIF,Q2NE,Q2SE & |
---|
123 | & ,QDIF,QNE,QSE,SNE,SSE & |
---|
124 | & ,TDIF,TNE,TSE & |
---|
125 | & ,UDIF,UNE,USE & |
---|
126 | & ,VDIF,VKNE,VKSE,VNE,VSE |
---|
127 | ! |
---|
128 | LOGICAL :: CILINE,WATSLOP |
---|
129 | ! |
---|
130 | !----------------------------------------------------------------------- |
---|
131 | !*********************************************************************** |
---|
132 | !----------------------------------------------------------------------- |
---|
133 | ! |
---|
134 | SLOPHC=SLOPHT*SQRT(2.)*0.5*9. |
---|
135 | RDY=1./DY |
---|
136 | ! |
---|
137 | DO J=JTS-5,JTE+5 |
---|
138 | DO I=ITS-5,ITE+5 |
---|
139 | DEF(I,J)=0. |
---|
140 | TNE(I,J)=0. |
---|
141 | QNE(I,J)=0. |
---|
142 | Q2NE(I,J)=0. |
---|
143 | HKNE(I,J)=0. |
---|
144 | UNE(I,J)=0. |
---|
145 | VNE(I,J)=0. |
---|
146 | VKNE(I,J)=0. |
---|
147 | TSE(I,J)=0. |
---|
148 | QSE(I,J)=0. |
---|
149 | Q2SE(I,J)=0. |
---|
150 | HKSE(I,J)=0. |
---|
151 | USE(I,J)=0. |
---|
152 | VSE(I,J)=0. |
---|
153 | VKSE(I,J)=0. |
---|
154 | ENDDO |
---|
155 | ENDDO |
---|
156 | ! |
---|
157 | !----------------------------------------------------------------------- |
---|
158 | !*** |
---|
159 | !*** DIFFUSING Q2 AT GROUND LEVEL DOES NOT MATTER |
---|
160 | !*** BECAUSE USTAR2 IS RECALCULATED. |
---|
161 | !*** |
---|
162 | !----------------------------------------------------------------------- |
---|
163 | !*** ITERATION LOOP |
---|
164 | !----------------------------------------------------------------------- |
---|
165 | ! |
---|
166 | DO 600 KS=1,KSMUD |
---|
167 | ! |
---|
168 | !----------------------------------------------------------------------- |
---|
169 | !----------------------------------------------------------------------- |
---|
170 | !*** MAIN INTEGRATION LOOP |
---|
171 | !----------------------------------------------------------------------- |
---|
172 | !----------------------------------------------------------------------- |
---|
173 | !$omp parallel do & |
---|
174 | !$omp& private(def1,def2,def3,def4,def_ij,defsk,deftk,hkne_ij,hkse_ij & |
---|
175 | !$omp& ,i,j,k,q2dif,q2ne,q2se,qdif,qne,qse,slop,sne,sse & |
---|
176 | !$omp& ,tdif,tne,tse,udif,une,use,vdif,vkne,vkne_ij & |
---|
177 | !$omp& ,vkse,vkse_ij,vne,vse) |
---|
178 | !----------------------------------------------------------------------- |
---|
179 | ! |
---|
180 | main_integration : DO K=KTS,KTE |
---|
181 | ! |
---|
182 | !----------------------------------------------------------------------- |
---|
183 | !*** SLOPE SWITCHES FOR MOISTURE |
---|
184 | !----------------------------------------------------------------------- |
---|
185 | ! |
---|
186 | IF(SIGMA==1)THEN |
---|
187 | ! |
---|
188 | !----------------------------------------------------------------------- |
---|
189 | !*** PRESSURE DOMAIN |
---|
190 | !----------------------------------------------------------------------- |
---|
191 | ! |
---|
192 | IF(DETA1(K)>0.)THEN |
---|
193 | DO J=MYJS_P1,MYJE1_P2 |
---|
194 | DO I=MYIS_P1,MYIE1_P1 |
---|
195 | SNE(I,J)=1. |
---|
196 | ENDDO |
---|
197 | ENDDO |
---|
198 | ! |
---|
199 | DO J=MYJS1_P1,MYJE_P2 |
---|
200 | DO I=MYIS_P1,MYIE1_P1 |
---|
201 | SSE(I,J)=1. |
---|
202 | ENDDO |
---|
203 | ENDDO |
---|
204 | ! |
---|
205 | !----------------------------------------------------------------------- |
---|
206 | !*** SIGMA DOMAIN |
---|
207 | !----------------------------------------------------------------------- |
---|
208 | ! |
---|
209 | ELSE |
---|
210 | DO J=MYJS_P1,MYJE1_P1 |
---|
211 | DO I=MYIS_P1,MYIE1_P1 |
---|
212 | SLOP=ABS((Z(I+IHE(J),J+1,K)-Z(I,J,K))*RDY) |
---|
213 | ! |
---|
214 | CILINE=((SM(I+IHE(J),J+1)/=SM(I,J)).OR. & |
---|
215 | (SICE(I+IHE(J),J+1)/=SICE(I,J))) |
---|
216 | ! |
---|
217 | WATSLOP=(SM(I+IHE(J),J+1)==1.0.AND. & |
---|
218 | SM(I,J)==1.0.AND.SLOP/=0.) |
---|
219 | ! |
---|
220 | IF(SLOP<SLOPHC.OR.CILINE.OR.WATSLOP)THEN |
---|
221 | SNE(I,J)=1. |
---|
222 | ELSE |
---|
223 | SNE(I,J)=0. |
---|
224 | ENDIF |
---|
225 | ENDDO |
---|
226 | ENDDO |
---|
227 | ! |
---|
228 | DO J=MYJS1_P1,MYJE_P1 |
---|
229 | DO I=MYIS_P1,MYIE1_P1 |
---|
230 | SLOP=ABS((Z(I+IHE(J),J-1,K)-Z(I,J,K))*RDY) |
---|
231 | ! |
---|
232 | CILINE=((SM(I+IHE(J),J-1)/=SM(I,J)).OR. & |
---|
233 | (SICE(I+IHE(J),J-1)/=SICE(I,J))) |
---|
234 | ! |
---|
235 | WATSLOP=(SM(I+IHE(J),J-1)==1.0.AND. & |
---|
236 | SM(I,J)==1.0.AND.SLOP/=0.) |
---|
237 | ! |
---|
238 | IF(SLOP<SLOPHC.OR.CILINE.OR.WATSLOP)THEN |
---|
239 | SSE(I,J)=1. |
---|
240 | ELSE |
---|
241 | SSE(I,J)=0. |
---|
242 | ENDIF |
---|
243 | ENDDO |
---|
244 | ENDDO |
---|
245 | ENDIF |
---|
246 | ! |
---|
247 | ENDIF |
---|
248 | !----------------------------------------------------------------------- |
---|
249 | !*** DEFORMATIONS |
---|
250 | !----------------------------------------------------------------------- |
---|
251 | ! |
---|
252 | DO J=MYJS_P1,MYJE_P1 |
---|
253 | DO I=MYIS_P1,MYIE_P1 |
---|
254 | ! |
---|
255 | DEFTK=U(I+IHE(J),J,K)-U(I+IHW(J),J,K) & |
---|
256 | & -V(I,J+1,K)+V(I,J-1,K) |
---|
257 | DEFSK=U(I,J+1,K)-U(I,J-1,K) & |
---|
258 | & +V(I+IHE(J),J,K)-V(I+IHW(J),J,K) |
---|
259 | DEF1=W(I+IHW(J),J-1,K)-W(I,J,K) |
---|
260 | DEF2=W(I+IHE(J),J-1,K)-W(I,J,K) |
---|
261 | DEF3=W(I+IHW(J),J+1,K)-W(I,J,K) |
---|
262 | DEF4=W(I+IHE(J),J+1,K)-W(I,J,K) |
---|
263 | Q2L=Q2(I,J,K) |
---|
264 | IF(Q2L<=EPSQ2)Q2L=0. |
---|
265 | DEF_IJ=DEFTK*DEFTK+DEFSK*DEFSK+DEF1*DEF1+DEF2*DEF2 & |
---|
266 | & +DEF3*DEF3+DEF4*DEF4+SCQ2*Q2L |
---|
267 | DEF_IJ=SQRT(DEF_IJ+DEF_IJ)*HBM2(I,J) |
---|
268 | DEF_IJ=MAX(DEF_IJ,DEFC) |
---|
269 | DEF_IJ=MIN(DEF_IJ,DEFM) |
---|
270 | DEF_IJ=DEF_IJ*0.1 |
---|
271 | DEF(I,J)=DEF_IJ |
---|
272 | ENDDO |
---|
273 | ENDDO |
---|
274 | ! |
---|
275 | !----------------------------------------------------------------------- |
---|
276 | !*** DIAGONAL CONTRIBUTIONS |
---|
277 | !----------------------------------------------------------------------- |
---|
278 | ! |
---|
279 | DO J=MYJS_P1,MYJE1_P1 |
---|
280 | DO I=MYIS_P1,MYIE1_P1 |
---|
281 | HKNE_IJ=(DEF(I,J)+DEF(I+IHE(J),J+1))*SNE(I,J) |
---|
282 | TNE (I,J)=(T (I+IHE(J),J+1,K)-T (I,J,K))*HKNE_IJ |
---|
283 | QNE (I,J)=(Q (I+IHE(J),J+1,K)-Q (I,J,K))*HKNE_IJ |
---|
284 | Q2NE(I,J)=(Q2(I+IHE(J),J+1,K)-Q2(I,J,K))*HKNE_IJ |
---|
285 | HKNE(I,J)=HKNE_IJ |
---|
286 | ! |
---|
287 | VKNE_IJ=DEF(I+IVE(J),J)+DEF(I,J+1) |
---|
288 | UNE(I,J)=(U(I+IVE(J),J+1,K)-U(I,J,K))*VKNE_IJ |
---|
289 | VNE(I,J)=(V(I+IVE(J),J+1,K)-V(I,J,K))*VKNE_IJ |
---|
290 | VKNE(I,J)=VKNE_IJ |
---|
291 | ENDDO |
---|
292 | ENDDO |
---|
293 | ! |
---|
294 | DO J=MYJS1_P1,MYJE_P1 |
---|
295 | DO I=MYIS_P1,MYIE1_P1 |
---|
296 | HKSE_IJ=(DEF(I+IHE(J),J-1)+DEF(I,J))*SSE(I,J) |
---|
297 | TSE (I,J)=(T (I+IHE(J),J-1,K)-T (I,J,K))*HKSE_IJ |
---|
298 | QSE (I,J)=(Q (I+IHE(J),J-1,K)-Q (I,J,K))*HKSE_IJ |
---|
299 | Q2SE(I,J)=(Q2(I+IHE(J),J-1,K)-Q2(I,J,K))*HKSE_IJ |
---|
300 | HKSE(I,J)=HKSE_IJ |
---|
301 | ! |
---|
302 | VKSE_IJ=DEF(I,J-1)+DEF(I+IVE(J),J) |
---|
303 | USE(I,J)=(U(I+IVE(J),J-1,K)-U(I,J,K))*VKSE_IJ |
---|
304 | VSE(I,J)=(V(I+IVE(J),J-1,K)-V(I,J,K))*VKSE_IJ |
---|
305 | VKSE(I,J)=VKSE_IJ |
---|
306 | ENDDO |
---|
307 | ENDDO |
---|
308 | !----------------------------------------------------------------------- |
---|
309 | ! |
---|
310 | DO J=MYJS1,MYJE1 |
---|
311 | DO I=MYIS1,MYIE |
---|
312 | TDIF (I,J)=(TNE (I,J)-TNE (I+IHW(J),J-1) & |
---|
313 | & +TSE (I,J)-TSE (I+IHW(J),J+1))*HDAC(I,J) |
---|
314 | QDIF (I,J)=(QNE (I,J)-QNE (I+IHW(J),J-1) & |
---|
315 | & +QSE (I,J)-QSE (I+IHW(J),J+1))*HDAC(I,J)*FCDIF |
---|
316 | Q2DIF(I,J)=(Q2NE(I,J)-Q2NE(I+IHW(J),J-1) & |
---|
317 | & +Q2SE(I,J)-Q2SE(I+IHW(J),J+1))*HDAC(I,J) |
---|
318 | ! |
---|
319 | UDIF(I,J)=(UNE(I,J)-UNE(I+IVW(J),J-1) & |
---|
320 | & +USE(I,J)-USE(I+IVW(J),J+1))*HDACV(I,J) |
---|
321 | VDIF(I,J)=(VNE(I,J)-VNE(I+IVW(J),J-1) & |
---|
322 | & +VSE(I,J)-VSE(I+IVW(J),J+1))*HDACV(I,J) |
---|
323 | ENDDO |
---|
324 | ENDDO |
---|
325 | ! |
---|
326 | !----------------------------------------------------------------------- |
---|
327 | !*** 2ND ORDER DIFFUSION |
---|
328 | !----------------------------------------------------------------------- |
---|
329 | ! |
---|
330 | IF(SECOND)THEN |
---|
331 | DO J=MYJS2,MYJE2 |
---|
332 | DO I=MYIS1,MYIE1 |
---|
333 | T (I,J,K)=T (I,J,K)+TDIF (I,J) |
---|
334 | Q (I,J,K)=Q (I,J,K)+QDIF (I,J) |
---|
335 | ! |
---|
336 | U(I,J,K)=U(I,J,K)+UDIF(I,J) |
---|
337 | V(I,J,K)=V(I,J,K)+VDIF(I,J) |
---|
338 | ENDDO |
---|
339 | ENDDO |
---|
340 | ! |
---|
341 | !----------------------------------------------------------------------- |
---|
342 | IF(K>=KTS+1)THEN |
---|
343 | DO J=MYJS2,MYJE2 |
---|
344 | DO I=MYIS1,MYIE1 |
---|
345 | Q2(I,J,K)=Q2(I,J,K)+Q2DIF(I,J) |
---|
346 | ENDDO |
---|
347 | ENDDO |
---|
348 | ENDIF |
---|
349 | ! |
---|
350 | !----------------------------------------------------------------------- |
---|
351 | !*** 4TH ORDER DIAGONAL CONTRIBUTIONS |
---|
352 | !----------------------------------------------------------------------- |
---|
353 | ! |
---|
354 | ELSE |
---|
355 | ! |
---|
356 | DO J=MYJS,MYJE1 |
---|
357 | DO I=MYIS,MYIE1 |
---|
358 | HKNE_IJ=HKNE(I,J) |
---|
359 | TNE (I,J)=(TDIF (I+IHE(J),J+1)-TDIF (I,J))*HKNE_IJ |
---|
360 | QNE (I,J)=(QDIF (I+IHE(J),J+1)-QDIF (I,J))*HKNE_IJ |
---|
361 | Q2NE(I,J)=(Q2DIF(I+IHE(J),J+1)-Q2DIF(I,J))*HKNE_IJ |
---|
362 | ENDDO |
---|
363 | ENDDO |
---|
364 | ! |
---|
365 | DO J=MYJS1,MYJE |
---|
366 | DO I=MYIS,MYIE1 |
---|
367 | HKSE_IJ=HKSE(I,J) |
---|
368 | TSE (I,J)=(TDIF (I+IHE(J),J-1)-TDIF (I,J))*HKSE_IJ |
---|
369 | QSE (I,J)=(QDIF (I+IHE(J),J-1)-QDIF (I,J))*HKSE_IJ |
---|
370 | Q2SE(I,J)=(Q2DIF(I+IHE(J),J-1)-Q2DIF(I,J))*HKSE_IJ |
---|
371 | ENDDO |
---|
372 | ENDDO |
---|
373 | ! |
---|
374 | DO J=MYJS2,MYJE2 |
---|
375 | DO I=MYIS1,MYIE1 |
---|
376 | T(I,J,K)=T(I,J,K)-(TNE(I,J)-TNE(I+IHW(J),J-1) & |
---|
377 | & +TSE(I,J)-TSE(I+IHW(J),J+1))*HDAC(I,J) |
---|
378 | Q(I,J,K)=Q(I,J,K)-(QNE(I,J)-QNE(I+IHW(J),J-1) & |
---|
379 | & +QSE(I,J)-QSE(I+IHW(J),J+1))*HDAC(I,J) & |
---|
380 | & *FCDIF |
---|
381 | ENDDO |
---|
382 | ENDDO |
---|
383 | |
---|
384 | ! |
---|
385 | IF(K>=KTS+1)THEN |
---|
386 | DO J=MYJS2,MYJE2 |
---|
387 | DO I=MYIS1,MYIE1 |
---|
388 | Q2(I,J,K)=Q2(I,J,K)-(Q2NE(I,J)-Q2NE(I+IHW(J),J-1) & |
---|
389 | & +Q2SE(I,J)-Q2SE(I+IHW(J),J+1)) & |
---|
390 | & *HDAC(I,J) |
---|
391 | ENDDO |
---|
392 | ENDDO |
---|
393 | ENDIF |
---|
394 | ! |
---|
395 | !----------------------------------------------------------------------- |
---|
396 | ! |
---|
397 | DO J=MYJS,MYJE1 |
---|
398 | DO I=MYIS,MYIE1 |
---|
399 | UNE(I,J)=(UDIF(I+IVE(J),J+1)-UDIF(I,J))*VKNE(I,J) |
---|
400 | VNE(I,J)=(VDIF(I+IVE(J),J+1)-VDIF(I,J))*VKNE(I,J) |
---|
401 | ENDDO |
---|
402 | ENDDO |
---|
403 | ! |
---|
404 | DO J=MYJS1,MYJE |
---|
405 | DO I=MYIS,MYIE1 |
---|
406 | USE(I,J)=(UDIF(I+IVE(J),J-1)-UDIF(I,J))*VKSE(I,J) |
---|
407 | VSE(I,J)=(VDIF(I+IVE(J),J-1)-VDIF(I,J))*VKSE(I,J) |
---|
408 | ENDDO |
---|
409 | ENDDO |
---|
410 | ! |
---|
411 | DO J=MYJS2,MYJE2 |
---|
412 | DO I=MYIS1,MYIE1 |
---|
413 | U(I,J,K)=U(I,J,K)-(UNE(I,J)-UNE(I+IVW(J),J-1) & |
---|
414 | & +USE(I,J)-USE(I+IVW(J),J+1))*HDACV(I,J) |
---|
415 | V(I,J,K)=V(I,J,K)-(VNE(I,J)-VNE(I+IVW(J),J-1) & |
---|
416 | & +VSE(I,J)-VSE(I+IVW(J),J+1))*HDACV(I,J) |
---|
417 | ENDDO |
---|
418 | ENDDO |
---|
419 | ! |
---|
420 | !----------------------------------------------------------------------- |
---|
421 | ENDIF ! End 4th order diffusion |
---|
422 | !----------------------------------------------------------------------- |
---|
423 | ! |
---|
424 | ENDDO main_integration |
---|
425 | ! |
---|
426 | !----------------------------------------------------------------------- |
---|
427 | ! |
---|
428 | 600 CONTINUE |
---|
429 | ! |
---|
430 | !----------------------------------------------------------------------- |
---|
431 | ! |
---|
432 | END SUBROUTINE HDIFF |
---|
433 | ! |
---|
434 | !----------------------------------------------------------------------- |
---|
435 | ! |
---|
436 | END MODULE MODULE_DIFFUSION_NMM |
---|
437 | ! |
---|
438 | !----------------------------------------------------------------------- |
---|