/[MITgcm]/MITgcm/verification/hs94.1x64x5/code_ad/cost_test.F
ViewVC logotype

Annotation of /MITgcm/verification/hs94.1x64x5/code_ad/cost_test.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Tue Oct 9 02:36:42 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.1: +2 -1 lines
add missing cvs $Header:$ or $Name:$

1 jmc 1.2 C $Header: $
2     C $Name: $
3 heimbach 1.1
4     #include "CPP_OPTIONS.h"
5    
6     subroutine cost_test( myThid )
7     C /==========================================================\
8     C | subroutine cost_test |
9     C | o this routine computes the cost function for the tiles |
10     C | of this processor |
11     C |==========================================================|
12     C | |
13     C | Notes |
14     C | ===== |
15     C \==========================================================/
16     IMPLICIT NONE
17    
18     C == Global variables ===
19     #include "SIZE.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "DYNVARS.h"
23     #include "GRID.h"
24     #ifdef ALLOW_PASSIVE_TRACER
25     # include "TR1.h"
26     #endif
27    
28     #include "cost.h"
29    
30     C == Routine arguments ==
31     C myThid - Thread number for this instance of the routine.
32     integer bi, bj
33     integer myThid
34    
35     #ifdef ALLOW_COST_TEST
36     C == Local variables
37     _RL thetaRef
38    
39     integer i, j, k
40     integer ig, jg
41     integer itlo,ithi
42     integer jtlo,jthi
43    
44     jtlo = mybylo(mythid)
45     jthi = mybyhi(mythid)
46     itlo = mybxlo(mythid)
47     ithi = mybxhi(mythid)
48    
49     iLocOut = 1
50     jLocOut = 32
51     kLocOut = 1
52    
53     do bj = jtlo,jthi
54     do bi = itlo,ithi
55     objf_test(bi,bj)= 0. _d 0
56     enddo
57     enddo
58    
59     ce some reference temperature
60     thetaRef = 24.0D0
61     C-- Calculate mask for tracer cells (0 => land, 1 => water)
62     k=1
63    
64     C-- Calculate cost function on tile of this instance
65     do bj = jtlo,jthi
66     do bi = itlo,ithi
67     c
68     do j=1,sNy
69     jg = myYGlobalLo-1+(bj-1)*sNy+j
70     do i=1,sNx
71     ig = myXGlobalLo-1+(bi-1)*sNx+i
72    
73     if ((jg .gt.30) .and. (jg .lt.40)) then
74     objf_test(bi,bj) = objf_test(bi,bj) +
75     & theta(i,j,kLocOut,bi,bj)
76     write(*,'(a,F10.1,3(x,i4),a,4(x,i4))')
77     & 'objf_test ', objf_test(bi,bj),
78     & ig,jg,kLocOut,' TILE ',i,j,bi,bj
79     endif
80    
81     end do
82     end do
83     c
84     objf_test(bi,bj) = objf_test(bi,bj) / 9. _d 0
85     c
86     end do
87     end do
88    
89     #endif
90    
91     END

  ViewVC Help
Powered by ViewVC 1.1.22