File indexing completed on 2018-03-02 18:45:39 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
e9a88bebd8 Patr*0001 #include "COST_OPTIONS.h"
                0002 
                0003       subroutine cost_test( myThid )
                0004 
                0005 
                0006 
                0007 
                0008 
                0009 
                0010 
                0011       IMPLICIT NONE
                0012 
                0013 
                0014 #include "SIZE.h"
                0015 #include "EEPARAMS.h"
                0016 #include "PARAMS.h"
                0017 #include "DYNVARS.h"
                0018 #include "GRID.h"
                0019 
                0020 #include "cost.h"
                0021 
                0022 
                0023 
                0024       integer myThid
                0025 
                0026 #ifdef ALLOW_COST_TEST
                0027 
                0028       integer bi, bj
                0029       _RL thetaRef
                0030       integer i, j, k
                0031       integer ig, jg
                0032       integer itlo,ithi
                0033       integer jtlo,jthi
                0034 
                0035       jtlo = mybylo(mythid)
                0036       jthi = mybyhi(mythid)
                0037       itlo = mybxlo(mythid)
                0038       ithi = mybxhi(mythid)
                0039 
                0040       iLocOut =  1
                0041       jLocOut =  32
                0042       kLocOut =  1
                0043 
                0044       do bj = jtlo,jthi
                0045         do bi = itlo,ithi
                0046           objf_test(bi,bj)= 0. _d 0
                0047         enddo
                0048       enddo
                0049 
                0050 
                0051       thetaRef = 24.0 _d 0
                0052 
                0053       k=1
                0054 
                0055 
                0056       do bj = jtlo,jthi
                0057         do bi = itlo,ithi
                0058 
                0059           do j=1,sNy
                0060           jg = myYGlobalLo-1+(bj-1)*sNy+j
                0061             do i=1,sNx
                0062             ig = myXGlobalLo-1+(bi-1)*sNx+i
                0063 
                0064             if ((jg .gt.30) .and. (jg .lt.40)) then
                0065                objf_test(bi,bj) = objf_test(bi,bj) +
                0066      &              theta(i,j,kLocOut,bi,bj)
                0067                write(*,'(a,F10.1,3(x,i4),a,4(x,i4))')
                0068      &              'objf_test  ', objf_test(bi,bj),
                0069      &              ig,jg,kLocOut,' TILE ',i,j,bi,bj
                0070             endif
                0071 
                0072             enddo
                0073           enddo
                0074 
                0075           objf_test(bi,bj) = objf_test(bi,bj) / 9. _d 0
                0076 
                0077         enddo
                0078       enddo
                0079 
                0080 #endif  /* ALLOW_COST_TEST */
                0081 
                0082       RETURN
                0083       END