File indexing completed on 2024-09-06 05:11:46 UTC
view on githubraw file Latest commit 0524b7d1 on 2024-09-05 13:50:30 UTC
0524b7d1ff Mart*0001 #include "PACKAGES_CONFIG.h"
0002
0003
0004 #define _RL Real*8
0005
0006
0007
0008
0009 subroutine cost_test_local ( &
0010 sNx, sNy, nSx, nSy, OLx, OLy, Nr, &
0011 myBxLo, myBxHi, myByLo, myByHi, &
0012 myXGlobalLo, myYGlobalLo, &
0013 theta, &
0014 objf_test, &
0015 myThid )
0016
0017
0018
0019
0020
0021
0022
0023 implicit none
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 integer, intent(in) :: sNx, sNy, nSx, nSy, OLx, OLy, Nr
0034 integer, intent(in) :: myBxLo, myBxHi, myByLo, myByHi
0035 integer, intent(in) :: myXGlobalLo, myYGlobalLo
0036 _RL, intent(in) :: theta(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
0037 _RL, intent(inout) :: objf_test(nSx,nSy)
0038 integer, intent(in) :: myThid
0039
0040 #ifdef ALLOW_COST
0041
0042
0043 integer :: i, j, k, ig, jg
0044 integer :: bi, bj
0045
0046
0047 do bj=myByLo,myByHi
0048 do bi=myBxLo,myBxHi
0049 objf_test(bi,bj)= 0. _d 0
0050 enddo
0051 enddo
0052
0053 k = 1
0054
0055
0056 do bj=myByLo,myByHi
0057 do bi=myBxLo,myBxHi
0058 do j=1,sNy
0059 jg = myYGlobalLo-1+(bj-1)*sNy+j
0060 do i=1,sNx
0061 ig = myXGlobalLo-1+(bi-1)*sNx+i
0062 if ((jg .gt.30) .and. (jg .lt.40)) then
0063 objf_test(bi,bj) = objf_test(bi,bj) + theta(i,j,k,bi,bj)
0064 write(*,'(a,F10.1,3(x,i4),a,4(x,i4))') &
0065 'objf_test ', objf_test(bi,bj), ig, jg, k, ' TILE ', i, j, bi, bj
0066 endif
0067 enddo
0068 enddo
0069
0070 objf_test(bi,bj) = objf_test(bi,bj) / 9. _d 0
0071
0072 enddo
0073 enddo
0074 #endif /* ALLOW_COST */
0075
0076 return
0077
0078 end subroutine cost_test_local