32 SUBROUTINE d2c_setup_tlm(u, u_tl, v, v_tl, ua, va, uc, uc_tl, vc, &
33 & vc_tl, dord4, isd, ied, jsd, jed, is, ie, js, je, npx, npy, &
34 & grid_type, nested, se_corner, sw_corner, ne_corner, nw_corner, &
35 & rsin_u, rsin_v, cosa_s, rsin2)
37 LOGICAL,
INTENT(IN) :: dord4
38 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed, is, ie, js, je, npx, npy&
40 REAL,
INTENT(IN) :: u(isd:ied, jsd:jed+1)
41 REAL,
INTENT(IN) :: u_tl(isd:ied, jsd:jed+1)
42 REAL,
INTENT(IN) :: v(isd:ied+1, jsd:jed)
43 REAL,
INTENT(IN) :: v_tl(isd:ied+1, jsd:jed)
44 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: ua
45 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: va
46 REAL,
DIMENSION(isd:ied+1, jsd:jed),
INTENT(OUT) :: uc
47 REAL,
DIMENSION(isd:ied+1, jsd:jed),
INTENT(OUT) :: uc_tl
48 REAL,
DIMENSION(isd:ied, jsd:jed+1),
INTENT(OUT) :: vc
49 REAL,
DIMENSION(isd:ied, jsd:jed+1),
INTENT(OUT) :: vc_tl
50 LOGICAL,
INTENT(IN) :: nested, se_corner, sw_corner, ne_corner, &
52 REAL,
INTENT(IN) :: rsin_u(isd:ied+1, jsd:jed)
53 REAL,
INTENT(IN) :: rsin_v(isd:ied, jsd:jed+1)
54 REAL,
INTENT(IN) :: cosa_s(isd:ied, jsd:jed)
55 REAL,
INTENT(IN) :: rsin2(isd:ied, jsd:jed)
57 REAL,
DIMENSION(isd:ied, jsd:jed) :: utmp, vtmp
58 REAL,
DIMENSION(isd:ied, jsd:jed) :: utmp_tl, vtmp_tl
59 REAL,
PARAMETER :: t11=27./28., t12=-(13./28.), t13=3./7., t14=6./7.&
61 REAL,
PARAMETER :: a1=0.5625
62 REAL,
PARAMETER :: a2=-0.0625
63 REAL,
PARAMETER :: c1=-(2./14.)
64 REAL,
PARAMETER :: c2=11./14.
65 REAL,
PARAMETER :: c3=5./14.
66 INTEGER :: npt, i, j, ifirst, ilast, id
86 IF (
grid_type .LT. 3 .AND. (.NOT.nested))
THEN 95 utmp_tl(i, j) = a2*(u_tl(i, j-1)+u_tl(i, j+2)) + a1*(u_tl(i, j&
97 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
102 utmp_tl(i, jsd) = 0.5*(u_tl(i, jsd)+u_tl(i, jsd+1))
103 utmp(i, jsd) = 0.5*(u(i, jsd)+u(i, jsd+1))
105 utmp_tl(i, jed) = 0.5*(u_tl(i, jed)+u_tl(i, jed+1))
106 utmp(i, jed) = 0.5*(u(i, jed)+u(i, jed+1))
111 vtmp_tl(i, j) = a2*(v_tl(i-1, j)+v_tl(i+2, j)) + a1*(v_tl(i, j&
113 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
116 vtmp_tl(isd, j) = 0.5*(v_tl(isd, j)+v_tl(isd+1, j))
117 vtmp(isd, j) = 0.5*(v(isd, j)+v(isd+1, j))
119 vtmp_tl(ied, j) = 0.5*(v_tl(ied, j)+v_tl(ied+1, j))
120 vtmp(ied, j) = 0.5*(v(ied, j)+v(ied+1, j))
124 ua(i, j) = (utmp(i, j)-vtmp(i, j)*cosa_s(i, j))*rsin2(i, j)
125 va(i, j) = (vtmp(i, j)-utmp(i, j)*cosa_s(i, j))*rsin2(i, j)
134 IF (npt .LT. js - 1)
THEN 139 IF (npy - npt .GT. je + 1)
THEN 147 IF (npt .LT. isd)
THEN 152 IF (npx - npt .GT. ied)
THEN 158 utmp_tl(i, j) = a2*(u_tl(i, j-1)+u_tl(i, j+2)) + a1*(u_tl(i, j&
160 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
163 IF (npt .LT. jsd)
THEN 168 IF (npy - npt .GT. jed)
THEN 176 IF (npt .LT. is - 1)
THEN 181 IF (npx - npt .GT. ie + 1)
THEN 187 vtmp_tl(i, j) = a2*(v_tl(i-1, j)+v_tl(i+2, j)) + a1*(v_tl(i, j&
189 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
196 IF (js .EQ. 1 .OR. jsd .LT. npt)
THEN 199 utmp_tl(i, j) = 0.5*(u_tl(i, j)+u_tl(i, j+1))
200 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
201 vtmp_tl(i, j) = 0.5*(v_tl(i, j)+v_tl(i+1, j))
202 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
206 IF (je + 1 .EQ. npy .OR. jed .GE. npy - npt)
THEN 209 utmp_tl(i, j) = 0.5*(u_tl(i, j)+u_tl(i, j+1))
210 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
211 vtmp_tl(i, j) = 0.5*(v_tl(i, j)+v_tl(i+1, j))
212 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
216 IF (is .EQ. 1 .OR. isd .LT. npt)
THEN 217 IF (npt .LT. jsd)
THEN 222 IF (npy - npt .GT. jed)
THEN 229 utmp_tl(i, j) = 0.5*(u_tl(i, j)+u_tl(i, j+1))
230 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
231 vtmp_tl(i, j) = 0.5*(v_tl(i, j)+v_tl(i+1, j))
232 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
236 IF (ie + 1 .EQ. npx .OR. ied .GE. npx - npt)
THEN 237 IF (npt .LT. jsd)
THEN 242 IF (npy - npt .GT. jed)
THEN 249 utmp_tl(i, j) = 0.5*(u_tl(i, j)+u_tl(i, j+1))
250 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
251 vtmp_tl(i, j) = 0.5*(v_tl(i, j)+v_tl(i+1, j))
252 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
259 ua(i, j) = (utmp(i, j)-vtmp(i, j)*cosa_s(i, j))*rsin2(i, j)
260 va(i, j) = (vtmp(i, j)-utmp(i, j)*cosa_s(i, j))*rsin2(i, j)
271 utmp_tl(i, 0) = -vtmp_tl(0, 1-i)
272 utmp(i, 0) = -vtmp(0, 1-i)
277 utmp_tl(npx+i, 0) = vtmp_tl(npx, i+1)
278 utmp(npx+i, 0) = vtmp(npx, i+1)
283 utmp_tl(npx+i, npy) = -vtmp_tl(npx, je-i)
284 utmp(npx+i, npy) = -vtmp(npx, je-i)
289 utmp_tl(i, npy) = vtmp_tl(0, je+i)
290 utmp(i, npy) = vtmp(0, je+i)
293 IF (
grid_type .LT. 3 .AND. (.NOT.nested))
THEN 294 IF (3 .LT. is - 1)
THEN 299 IF (npx - 2 .GT. ie + 2)
THEN 313 uc_tl(i, j) = a1*(utmp_tl(i-1, j)+utmp_tl(i, j)) + a2*(utmp_tl(i&
314 & -2, j)+utmp_tl(i+1, j))
315 uc(i, j) = a1*(utmp(i-1, j)+utmp(i, j)) + a2*(utmp(i-2, j)+utmp(&
321 IF (is .EQ. 1 .AND. (.NOT.nested))
THEN 323 uc_tl(0, j) = c1*utmp_tl(-2, j) + c2*utmp_tl(-1, j) + c3*&
325 uc(0, j) = c1*utmp(-2, j) + c2*utmp(-1, j) + c3*utmp(0, j)
326 uc_tl(1, j) = rsin_u(1, j)*(t14*(utmp_tl(0, j)+utmp_tl(1, j))+&
327 & t12*(utmp_tl(-1, j)+utmp_tl(2, j))+t15*(utmp_tl(-2, j)+&
329 uc(1, j) = (t14*(utmp(0, j)+utmp(1, j))+t12*(utmp(-1, j)+utmp(&
330 & 2, j))+t15*(utmp(-2, j)+utmp(3, j)))*rsin_u(1, j)
331 uc_tl(2, j) = c1*utmp_tl(3, j) + c2*utmp_tl(2, j) + c3*utmp_tl&
333 uc(2, j) = c1*utmp(3, j) + c2*utmp(2, j) + c3*utmp(1, j)
336 IF (ie + 1 .EQ. npx .AND. (.NOT.nested))
THEN 338 uc_tl(npx-1, j) = c1*utmp_tl(npx-3, j) + c2*utmp_tl(npx-2, j) &
339 & + c3*utmp_tl(npx-1, j)
340 uc(npx-1, j) = c1*utmp(npx-3, j) + c2*utmp(npx-2, j) + c3*utmp&
342 uc_tl(npx, j) = rsin_u(npx, j)*(t14*(utmp_tl(npx-1, j)+utmp_tl&
343 & (npx, j))+t12*(utmp_tl(npx-2, j)+utmp_tl(npx+1, j))+t15*(&
344 & utmp_tl(npx-3, j)+utmp_tl(npx+2, j)))
345 uc(npx, j) = (t14*(utmp(npx-1, j)+utmp(npx, j))+t12*(utmp(npx-&
346 & 2, j)+utmp(npx+1, j))+t15*(utmp(npx-3, j)+utmp(npx+2, j)))*&
348 uc_tl(npx+1, j) = c3*utmp_tl(npx, j) + c2*utmp_tl(npx+1, j) + &
349 & c1*utmp_tl(npx+2, j)
350 uc(npx+1, j) = c3*utmp(npx, j) + c2*utmp(npx+1, j) + c1*utmp(&
360 vtmp_tl(0, j) = -utmp_tl(1-j, 0)
361 vtmp(0, j) = -utmp(1-j, 0)
366 vtmp_tl(0, npy+j) = utmp_tl(j+1, npy)
367 vtmp(0, npy+j) = utmp(j+1, npy)
372 vtmp_tl(npx, j) = utmp_tl(ie+j, 0)
373 vtmp(npx, j) = utmp(ie+j, 0)
378 vtmp_tl(npx, npy+j) = -utmp_tl(ie-j, npy)
379 vtmp(npx, npy+j) = -utmp(ie-j, npy)
384 IF (j .EQ. 1 .AND. (.NOT.nested))
THEN 386 vc_tl(i, 1) = rsin_v(i, 1)*(t14*(vtmp_tl(i, 0)+vtmp_tl(i, 1)&
387 & )+t12*(vtmp_tl(i, -1)+vtmp_tl(i, 2))+t15*(vtmp_tl(i, -2)+&
389 vc(i, 1) = (t14*(vtmp(i, 0)+vtmp(i, 1))+t12*(vtmp(i, -1)+&
390 & vtmp(i, 2))+t15*(vtmp(i, -2)+vtmp(i, 3)))*rsin_v(i, 1)
392 ELSE IF ((j .EQ. 0 .OR. j .EQ. npy - 1) .AND. (.NOT.nested)) &
395 vc_tl(i, j) = c1*vtmp_tl(i, j-2) + c2*vtmp_tl(i, j-1) + c3*&
397 vc(i, j) = c1*vtmp(i, j-2) + c2*vtmp(i, j-1) + c3*vtmp(i, j)
399 ELSE IF ((j .EQ. 2 .OR. j .EQ. npy + 1) .AND. (.NOT.nested)) &
402 vc_tl(i, j) = c1*vtmp_tl(i, j+1) + c2*vtmp_tl(i, j) + c3*&
404 vc(i, j) = c1*vtmp(i, j+1) + c2*vtmp(i, j) + c3*vtmp(i, j-1)
406 ELSE IF (j .EQ. npy .AND. (.NOT.nested))
THEN 408 vc_tl(i, npy) = rsin_v(i, npy)*(t14*(vtmp_tl(i, npy-1)+&
409 & vtmp_tl(i, npy))+t12*(vtmp_tl(i, npy-2)+vtmp_tl(i, npy+1))&
410 & +t15*(vtmp_tl(i, npy-3)+vtmp_tl(i, npy+2)))
411 vc(i, npy) = (t14*(vtmp(i, npy-1)+vtmp(i, npy))+t12*(vtmp(i&
412 & , npy-2)+vtmp(i, npy+1))+t15*(vtmp(i, npy-3)+vtmp(i, npy+2&
418 vc_tl(i, j) = a2*(vtmp_tl(i, j-2)+vtmp_tl(i, j+1)) + a1*(&
419 & vtmp_tl(i, j-1)+vtmp_tl(i, j))
420 vc(i, j) = a2*(vtmp(i, j-2)+vtmp(i, j+1)) + a1*(vtmp(i, j-1)&
429 vc_tl(i, j) = a2*(vtmp_tl(i, j-2)+vtmp_tl(i, j+1)) + a1*(&
430 & vtmp_tl(i, j-1)+vtmp_tl(i, j))
431 vc(i, j) = a2*(vtmp(i, j-2)+vtmp(i, j+1)) + a1*(vtmp(i, j-1)+&
437 SUBROUTINE d2c_setup(u, v, ua, va, uc, vc, dord4, isd, ied, jsd, jed, &
438 & is, ie, js, je, npx, npy, grid_type, nested, se_corner, sw_corner, &
439 & ne_corner, nw_corner, rsin_u, rsin_v, cosa_s, rsin2)
441 LOGICAL,
INTENT(IN) :: dord4
442 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed, is, ie, js, je, npx, npy&
444 REAL,
INTENT(IN) :: u(isd:ied, jsd:jed+1)
445 REAL,
INTENT(IN) :: v(isd:ied+1, jsd:jed)
446 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: ua
447 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: va
448 REAL,
DIMENSION(isd:ied+1, jsd:jed),
INTENT(OUT) :: uc
449 REAL,
DIMENSION(isd:ied, jsd:jed+1),
INTENT(OUT) :: vc
450 LOGICAL,
INTENT(IN) :: nested, se_corner, sw_corner, ne_corner, &
452 REAL,
INTENT(IN) :: rsin_u(isd:ied+1, jsd:jed)
453 REAL,
INTENT(IN) :: rsin_v(isd:ied, jsd:jed+1)
454 REAL,
INTENT(IN) :: cosa_s(isd:ied, jsd:jed)
455 REAL,
INTENT(IN) :: rsin2(isd:ied, jsd:jed)
457 REAL,
DIMENSION(isd:ied, jsd:jed) :: utmp, vtmp
458 REAL,
PARAMETER :: t11=27./28., t12=-(13./28.), t13=3./7., t14=6./7.&
460 REAL,
PARAMETER :: a1=0.5625
461 REAL,
PARAMETER :: a2=-0.0625
462 REAL,
PARAMETER :: c1=-(2./14.)
463 REAL,
PARAMETER :: c2=11./14.
464 REAL,
PARAMETER :: c3=5./14.
465 INTEGER :: npt, i, j, ifirst, ilast, id
485 IF (
grid_type .LT. 3 .AND. (.NOT.nested))
THEN 493 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
498 utmp(i, jsd) = 0.5*(u(i, jsd)+u(i, jsd+1))
500 utmp(i, jed) = 0.5*(u(i, jed)+u(i, jed+1))
504 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
507 vtmp(isd, j) = 0.5*(v(isd, j)+v(isd+1, j))
509 vtmp(ied, j) = 0.5*(v(ied, j)+v(ied+1, j))
513 ua(i, j) = (utmp(i, j)-vtmp(i, j)*cosa_s(i, j))*rsin2(i, j)
514 va(i, j) = (vtmp(i, j)-utmp(i, j)*cosa_s(i, j))*rsin2(i, j)
523 IF (npt .LT. js - 1)
THEN 528 IF (npy - npt .GT. je + 1)
THEN 534 IF (npt .LT. isd)
THEN 539 IF (npx - npt .GT. ied)
THEN 545 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
548 IF (npt .LT. jsd)
THEN 553 IF (npy - npt .GT. jed)
THEN 559 IF (npt .LT. is - 1)
THEN 564 IF (npx - npt .GT. ie + 1)
THEN 570 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
577 IF (js .EQ. 1 .OR. jsd .LT. npt)
THEN 580 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
581 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
585 IF (je + 1 .EQ. npy .OR. jed .GE. npy - npt)
THEN 588 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
589 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
593 IF (is .EQ. 1 .OR. isd .LT. npt)
THEN 594 IF (npt .LT. jsd)
THEN 599 IF (npy - npt .GT. jed)
THEN 606 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
607 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
611 IF (ie + 1 .EQ. npx .OR. ied .GE. npx - npt)
THEN 612 IF (npt .LT. jsd)
THEN 617 IF (npy - npt .GT. jed)
THEN 624 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
625 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
632 ua(i, j) = (utmp(i, j)-vtmp(i, j)*cosa_s(i, j))*rsin2(i, j)
633 va(i, j) = (vtmp(i, j)-utmp(i, j)*cosa_s(i, j))*rsin2(i, j)
644 utmp(i, 0) = -vtmp(0, 1-i)
649 utmp(npx+i, 0) = vtmp(npx, i+1)
654 utmp(npx+i, npy) = -vtmp(npx, je-i)
659 utmp(i, npy) = vtmp(0, je+i)
662 IF (
grid_type .LT. 3 .AND. (.NOT.nested))
THEN 663 IF (3 .LT. is - 1)
THEN 668 IF (npx - 2 .GT. ie + 2)
THEN 682 uc(i, j) = a1*(utmp(i-1, j)+utmp(i, j)) + a2*(utmp(i-2, j)+utmp(&
688 IF (is .EQ. 1 .AND. (.NOT.nested))
THEN 690 uc(0, j) = c1*utmp(-2, j) + c2*utmp(-1, j) + c3*utmp(0, j)
691 uc(1, j) = (t14*(utmp(0, j)+utmp(1, j))+t12*(utmp(-1, j)+utmp(&
692 & 2, j))+t15*(utmp(-2, j)+utmp(3, j)))*rsin_u(1, j)
693 uc(2, j) = c1*utmp(3, j) + c2*utmp(2, j) + c3*utmp(1, j)
696 IF (ie + 1 .EQ. npx .AND. (.NOT.nested))
THEN 698 uc(npx-1, j) = c1*utmp(npx-3, j) + c2*utmp(npx-2, j) + c3*utmp&
700 uc(npx, j) = (t14*(utmp(npx-1, j)+utmp(npx, j))+t12*(utmp(npx-&
701 & 2, j)+utmp(npx+1, j))+t15*(utmp(npx-3, j)+utmp(npx+2, j)))*&
703 uc(npx+1, j) = c3*utmp(npx, j) + c2*utmp(npx+1, j) + c1*utmp(&
713 vtmp(0, j) = -utmp(1-j, 0)
718 vtmp(0, npy+j) = utmp(j+1, npy)
723 vtmp(npx, j) = utmp(ie+j, 0)
728 vtmp(npx, npy+j) = -utmp(ie-j, npy)
733 IF (j .EQ. 1 .AND. (.NOT.nested))
THEN 735 vc(i, 1) = (t14*(vtmp(i, 0)+vtmp(i, 1))+t12*(vtmp(i, -1)+&
736 & vtmp(i, 2))+t15*(vtmp(i, -2)+vtmp(i, 3)))*rsin_v(i, 1)
738 ELSE IF ((j .EQ. 0 .OR. j .EQ. npy - 1) .AND. (.NOT.nested)) &
741 vc(i, j) = c1*vtmp(i, j-2) + c2*vtmp(i, j-1) + c3*vtmp(i, j)
743 ELSE IF ((j .EQ. 2 .OR. j .EQ. npy + 1) .AND. (.NOT.nested)) &
746 vc(i, j) = c1*vtmp(i, j+1) + c2*vtmp(i, j) + c3*vtmp(i, j-1)
748 ELSE IF (j .EQ. npy .AND. (.NOT.nested))
THEN 750 vc(i, npy) = (t14*(vtmp(i, npy-1)+vtmp(i, npy))+t12*(vtmp(i&
751 & , npy-2)+vtmp(i, npy+1))+t15*(vtmp(i, npy-3)+vtmp(i, npy+2&
757 vc(i, j) = a2*(vtmp(i, j-2)+vtmp(i, j+1)) + a1*(vtmp(i, j-1)&
766 vc(i, j) = a2*(vtmp(i, j-2)+vtmp(i, j+1)) + a1*(vtmp(i, j-1)+&
772 SUBROUTINE d2a_setup(u, v, ua, va, dord4, isd, ied, jsd, jed, is, ie, &
773 & js, je, npx, npy, grid_type, nested, cosa_s, rsin2)
775 LOGICAL,
INTENT(IN) :: dord4
776 INTEGER,
INTENT(IN) :: isd, ied, jsd, jed, is, ie, js, je, npx, npy&
778 REAL,
INTENT(IN) :: u(isd:ied, jsd:jed+1)
779 REAL,
INTENT(IN) :: v(isd:ied+1, jsd:jed)
780 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: ua
781 REAL,
DIMENSION(isd:ied, jsd:jed),
INTENT(OUT) :: va
782 REAL,
INTENT(IN) :: cosa_s(isd:ied, jsd:jed)
783 REAL,
INTENT(IN) :: rsin2(isd:ied, jsd:jed)
784 LOGICAL,
INTENT(IN) :: nested
786 REAL,
DIMENSION(isd:ied, jsd:jed) :: utmp, vtmp
787 REAL,
PARAMETER :: t11=27./28., t12=-(13./28.), t13=3./7., t14=6./7.&
789 REAL,
PARAMETER :: a1=0.5625
790 REAL,
PARAMETER :: a2=-0.0625
791 REAL,
PARAMETER :: c1=-(2./14.)
792 REAL,
PARAMETER :: c2=11./14.
793 REAL,
PARAMETER :: c3=5./14.
794 INTEGER :: npt, i, j, ifirst, ilast, id
814 IF (
grid_type .LT. 3 .AND. (.NOT.nested))
THEN 822 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
827 utmp(i, jsd) = 0.5*(u(i, jsd)+u(i, jsd+1))
829 utmp(i, jed) = 0.5*(u(i, jed)+u(i, jed+1))
833 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
836 vtmp(isd, j) = 0.5*(v(isd, j)+v(isd+1, j))
838 vtmp(ied, j) = 0.5*(v(ied, j)+v(ied+1, j))
841 IF (npt .LT. js - 1)
THEN 846 IF (npy - npt .GT. je + 1)
THEN 855 IF (npt .LT. isd)
THEN 860 IF (npx - npt .GT. ied)
THEN 866 utmp(i, j) = a2*(u(i, j-1)+u(i, j+2)) + a1*(u(i, j)+u(i, j+1))
869 IF (npt .LT. jsd)
THEN 874 IF (npy - npt .GT. jed)
THEN 880 IF (npt .LT. is - 1)
THEN 885 IF (npx - npt .GT. ie + 1)
THEN 891 vtmp(i, j) = a2*(v(i-1, j)+v(i+2, j)) + a1*(v(i, j)+v(i+1, j))
898 IF (js .EQ. 1 .OR. jsd .LT. npt)
THEN 901 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
902 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
906 IF (je + 1 .EQ. npy .OR. jed .GE. npy - npt)
THEN 909 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
910 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
914 IF (is .EQ. 1 .OR. isd .LT. npt)
THEN 915 IF (npt .LT. jsd)
THEN 920 IF (npy - npt .GT. jed)
THEN 927 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
928 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
932 IF (ie + 1 .EQ. npx .OR. ied .GE. npx - npt)
THEN 933 IF (npt .LT. jsd)
THEN 938 IF (npy - npt .GT. jed)
THEN 945 utmp(i, j) = 0.5*(u(i, j)+u(i, j+1))
946 vtmp(i, j) = 0.5*(v(i, j)+v(i+1, j))
954 ua(i, j) = (utmp(i, j)-vtmp(i, j)*cosa_s(i, j))*rsin2(i, j)
955 va(i, j) = (vtmp(i, j)-utmp(i, j)*cosa_s(i, j))*rsin2(i, j)
subroutine, public d2c_setup(u, v, ua, va, uc, vc, dord4, isd, ied, jsd, jed, is, ie, js, je, npx, npy, grid_type, nested, se_corner, sw_corner, ne_corner, nw_corner, rsin_u, rsin_v, cosa_s, rsin2)
subroutine, public d2a_setup(u, v, ua, va, dord4, isd, ied, jsd, jed, is, ie, js, je, npx, npy, grid_type, nested, cosa_s, rsin2)
subroutine, public d2c_setup_tlm(u, u_tl, v, v_tl, ua, va, uc, uc_tl, vc, vc_tl, dord4, isd, ied, jsd, jed, is, ie, js, je, npx, npy, grid_type, nested, se_corner, sw_corner, ne_corner, nw_corner, rsin_u, rsin_v, cosa_s, rsin2)
Derived type containing the data.