/[MITgcm]/MITgcm/verification/OpenAD/code_ad_singlelayer/cost_test.F
ViewVC logotype

Annotation of /MITgcm/verification/OpenAD/code_ad_singlelayer/cost_test.F

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


Revision 1.1 - (hide annotations) (download)
Thu May 10 16:29:15 2007 UTC (17 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59d, checkpoint59c, checkpoint59b
Move single-layer OpenAD test case to a different dir.
and replace it by full baroclinic setup including GM/Redi.
Baroclinic setup will now be tested via testreport.

1 heimbach 1.1 C $Header: /u/gcmpack/MITgcm/verification/OpenAD/code_ad/cost_test.F,v 1.1 2006/07/13 19:35:46 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    
24     #include "cost.h"
25    
26     C == Routine arguments ==
27     C myThid - Thread number for this instance of the routine.
28     integer bi, bj
29     integer myThid
30    
31     #ifdef ALLOW_COST_TEST
32     C == Local variables
33     _RL thetaRef
34    
35     integer i, j, k
36     integer ig, jg
37     integer itlo,ithi
38     integer jtlo,jthi
39    
40     jtlo = mybylo(mythid)
41     jthi = mybyhi(mythid)
42     itlo = mybxlo(mythid)
43     ithi = mybxhi(mythid)
44    
45     if ( useCubedSphereExchange) then
46     iLocOut = 7
47     jLocOut = 28
48     kLocOut = 1
49     else
50     iLocOut = 80
51     jLocOut = 30
52     kLocOut = 1
53     endif
54    
55     ce some reference temperature
56     thetaRef = 20.0D0
57    
58     C-- Calculate mask for tracer cells (0 => land, 1 => water)
59     k=1
60    
61     C-- Calculate cost function on tile of this instance
62     do bj = jtlo,jthi
63     do bi = itlo,ithi
64     do j=1,sNy
65     jg = myYGlobalLo-1+(bj-1)*sNy+j
66     do i=1,sNx
67     ig = myXGlobalLo-1+(bi-1)*sNx+i
68     c
69     objf_test(bi,bj) = objf_test(bi,bj) + maskW(i,j,k,bi,bj)
70     & *( uVel(i,j,k,bi,bj) )
71     & *( uVel(i,j,k,bi,bj) )
72     cph(
73     print *, 'ph-cost: objf_test ',
74     & objf_test(bi,bj)
75     cph)
76     c
77     end do
78     end do
79     end do
80     end do
81    
82     #endif
83    
84     END

  ViewVC Help
Powered by ViewVC 1.1.22