/[MITgcm]/MITgcm/pkg/cost/cost_test.F
ViewVC logotype

Annotation of /MITgcm/pkg/cost/cost_test.F

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


Revision 1.7 - (hide annotations) (download)
Mon Oct 8 23:59:21 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint59i, checkpoint59j
Changes since 1.6: +2 -1 lines
add missing cvs $Header:$ or $Name:$

1 jmc 1.7 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    
25     #include "cost.h"
26    
27     C == Routine arguments ==
28     C myThid - Thread number for this instance of the routine.
29     integer bi, bj
30     integer myThid
31    
32     #ifdef ALLOW_COST_TEST
33     C == Local variables
34     _RL thetaRef
35    
36     integer i, j, k
37     integer ig, jg
38     integer itlo,ithi
39     integer jtlo,jthi
40    
41     jtlo = mybylo(mythid)
42     jthi = mybyhi(mythid)
43     itlo = mybxlo(mythid)
44     ithi = mybxhi(mythid)
45    
46 heimbach 1.6 if ( useCubedSphereExchange) then
47     iLocOut = 7
48     jLocOut = 28
49     kLocOut = 1
50     else
51     iLocOut = 80
52     jLocOut = 30
53     kLocOut = 1
54     endif
55 heimbach 1.1
56     ce some reference temperature
57     thetaRef = 24.0D0
58    
59     C-- Calculate mask for tracer cells (0 => land, 1 => water)
60     k=1
61    
62     C-- Calculate cost function on tile of this instance
63     do bj = jtlo,jthi
64     do bi = itlo,ithi
65     do j=1,sNy
66     jg = myYGlobalLo-1+(bj-1)*sNy+j
67     do i=1,sNx
68     ig = myXGlobalLo-1+(bi-1)*sNx+i
69    
70     if ((ig .eq. iLocOut) .and. (jg .eq. jLocOut)) then
71 heimbach 1.2 write(*,'(a,3(x,i4),a,4(x,i4))')
72     & 'COST ',ig,jg,kLocOut,' TILE ',i,j,bi,bj
73 heimbach 1.1 objf_test(bi,bj) = theta(i,j,kLocOut,bi,bj)
74 heimbach 1.4 cph(
75     print *, 'ph-cost ', ig, jg, kLocOut,
76     & theta(i,j,kLocOut,bi,bj)
77     cph)
78 heimbach 1.1 endif
79    
80     end do
81     end do
82     end do
83     end do
84    
85     #endif
86    
87     END

  ViewVC Help
Powered by ViewVC 1.1.22