506 character(len=*),
intent(in) :: mesg
507 type(ocean_grid_type),
intent(inout) :: g
508 real,
dimension(G%isd:,G%jsd:),
intent(in) :: u_comp
509 real,
dimension(G%isd:,G%jsd:),
intent(in) :: v_comp
510 integer,
optional,
intent(in) :: is, ie, js, je
511 integer,
optional,
intent(in) :: direction
519 real :: u_nonsym(g%isd:g%ied,g%jsd:g%jed)
520 real :: v_nonsym(g%isd:g%ied,g%jsd:g%jed)
521 character(len=128) :: mesg2
523 integer :: i, j, is_ch, ie_ch, js_ch, je_ch
524 integer :: isq, ieq, jsq, jeq, isd, ied, jsd, jed, isdb, iedb, jsdb, jedb
525 isq = g%IscB ; ieq = g%IecB ; jsq = g%JscB ; jeq = g%JecB
526 isd = g%isd ; ied = g%ied ; jsd = g%jsd ; jed = g%jed
527 isdb = g%IsdB ; iedb = g%IedB ; jsdb = g%JsdB ; jedb = g%JedB
529 is_ch = g%isc ; ie_ch = g%iec ; js_ch = g%jsc ; je_ch = g%jec
530 if (
present(is)) is_ch = is ;
if (
present(ie)) ie_ch = ie
531 if (
present(js)) js_ch = js ;
if (
present(js)) je_ch = je
534 if ((is_ch == g%isc) .and. (ie_ch == g%iec) .and. &
535 (js_ch == g%jsc) .and. (je_ch == g%jec))
return 537 do i=isd,ied ;
do j=jsd,jed
538 u_nonsym(i,j) = u_comp(i,j) ; v_nonsym(i,j) = v_comp(i,j)
541 call pass_vector(u_nonsym, v_nonsym, g%Domain, direction, stagger=agrid)
543 do i=is_ch,ie_ch ;
do j=js_ch+1,je_ch
544 if (u_nonsym(i,j) /= u_comp(i,j) .and. &
545 redundant_prints(1) < max_redundant_prints)
then 546 write(mesg2,
'(" redundant u-components",2(1pe12.4)," differ by ", & 547 & 1pe12.4," at i,j = ",2i4," on pe ",i4)') &
548 u_comp(i,j), u_nonsym(i,j),u_comp(i,j)-u_nonsym(i,j),i,j,pe_here()
549 write(0,
'(A130)') trim(mesg)//trim(mesg2)
550 redundant_prints(1) = redundant_prints(1) + 1
553 do i=is_ch+1,ie_ch ;
do j=js_ch,je_ch
554 if (v_nonsym(i,j) /= v_comp(i,j) .and. &
555 redundant_prints(1) < max_redundant_prints)
then 556 write(mesg2,
'(" redundant v-comps",2(1pe12.4)," differ by ", & 557 & 1pe12.4," at i,j = ",2i4," x,y = ",2(1pe12.4)" on pe ",i4)') &
558 v_comp(i,j), v_nonsym(i,j),v_comp(i,j)-v_nonsym(i,j),i,j, &
559 g%geoLonBu(i,j), g%geoLatBu(i,j), pe_here()
560 write(0,
'(A155)') trim(mesg)//trim(mesg2)
561 redundant_prints(1) = redundant_prints(1) + 1