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

Contents of /MITgcm/verification/hs94.1x64x5/adcode/cost_test.F

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


Revision 1.2 - (show annotations) (download)
Sun Oct 26 01:53:57 2003 UTC (20 years, 6 months ago) by heimbach
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
moving and updaing adcode to code_ad

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

  ViewVC Help
Powered by ViewVC 1.1.22