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

Contents of /MITgcm/pkg/cost/cost_tracer.F

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


Revision 1.5 - (show annotations) (download)
Tue Jul 13 18:08:06 2004 UTC (19 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint54d_post, checkpoint54e_post, checkpoint54f_post, checkpoint54c_post
Changes since 1.4: +3 -4 lines
max number of passive tracers is now defined in PTRACERS_SIZE.h

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_tracer.F,v 1.4 2003/06/27 01:54:20 heimbach Exp $
2 C $Name: $
3
4 #include "COST_CPPOPTIONS.h"
5
6 subroutine cost_tracer( bi, bj, myThid )
7 C /==========================================================\
8 C | subroutine cost_tracer |
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_COST_TRACER
25 # if (defined (ALLOW_PASSIVE_TRACER))
26 # include "TR1.h"
27 # elif (defined (ALLOW_PTRACERS))
28 # include "PTRACERS_SIZE.h"
29 # include "PTRACERS.h"
30 # endif
31 #endif
32
33 #include "cost.h"
34
35 C == Routine arguments ==
36 C myThid - Thread number for this instance of the routine.
37 integer bi, bj
38 integer myThid
39
40 #ifdef ALLOW_COST_TRACER
41 C == Local variables
42 _RL thetaRef
43 _RL locfc
44
45 integer i, j, k
46 integer ig, jg
47 ce some reference temperature
48 thetaRef = 24.0D0
49
50 locfc = 0. _d 0
51
52 k=1
53 DO j=1,sNy
54 DO i=1,sNx
55 #if (defined (ALLOW_PASSIVE_TRACER))
56 locfc = locfc + maskC(i,j,k,bi,bj)*
57 & lambdaTr1ClimRelax*Tr1(i,j,k,bi,bj)*
58 & rA(i,j,bi,bj)*drF(k)*deltaTtracer
59 #elif (defined (ALLOW_PTRACERS))
60 locfc = locfc + maskC(i,j,k,bi,bj)*
61 & lambdaTr1ClimRelax*ptracer(i,j,k,bi,bj,1)*
62 & rA(i,j,bi,bj)*drF(k)*deltaTtracer
63 #endif
64 ENDDO
65 ENDDO
66
67 objf_tracer(bi,bj) = objf_tracer(bi,bj) + locfc
68
69 #if (defined (ALLOW_PASSIVE_TRACER))
70 print *, 'COST TRACER nach', objf_tracer(bi,bj),
71 & Tr1(83,33,1,1,1), Tr1(83,33,2,1,1)
72 #elif (defined (ALLOW_PTRACERS))
73 print *, 'COST TRACER nach', objf_tracer(bi,bj),
74 & ptracer(83,33,1,1,1,1), ptracer(83,33,2,1,1,1)
75 #endif
76
77 #endif /* ALLOW_COST_TRACER */
78
79 RETURN
80 END

  ViewVC Help
Powered by ViewVC 1.1.22