/[MITgcm]/MITgcm/pkg/dic/dic_cost.F
ViewVC logotype

Contents of /MITgcm/pkg/dic/dic_cost.F

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


Revision 1.13 - (show annotations) (download)
Wed Aug 17 10:19:29 2011 UTC (12 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint64p, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63b, checkpoint63c, checkpoint64
Changes since 1.12: +2 -2 lines
Fix some flags.

1 C $Header: /u/gcmpack/MITgcm/pkg/dic/dic_cost.F,v 1.12 2009/10/16 15:48:33 heimbach Exp $
2 C $Name: $
3
4 #include "DIC_OPTIONS.h"
5
6 CStartOfInterFace
7 SUBROUTINE DIC_COST (
8 I myTime,myIter,myThid)
9
10 C /==========================================================\
11 C | SUBROUTINE DIC_COST |
12 C |==========================================================|
13 IMPLICIT NONE
14
15 C == GLobal variables ==
16 #include "SIZE.h"
17 #include "DYNVARS.h"
18 #include "EEPARAMS.h"
19 #include "PARAMS.h"
20 #include "GRID.h"
21 #include "DIC_VARS.h"
22 #ifdef DIC_BIOTIC
23 #include "DIC_DIAGS.h"
24 #include "DIC_COST.h"
25 #endif
26
27 C == Routine arguments ==
28 INTEGER myIter
29 _RL myTime
30 INTEGER myThid
31
32 #ifdef ALLOW_DIC_COST
33
34 C == Local variables ==
35 INTEGER i, j, bi, bj, k, it
36 _RL tmpcost
37 c
38 c
39 c calculate costfunction
40
41 tmpcost = 0. _d 0
42 DO bj=myByLo(myThid),myByHi(myThid)
43 DO bi=myBxLo(myThid),myBxHi(myThid)
44 DO i=1,sNx
45 DO j=1,sNy
46 tmpcost = tmpcost+FluxCO2(i,j,bi,bj)*rA(i,j,bi,bj)*
47 & maskC(i,j,1,bi,bj)*dTtracerLev(1)
48 ENDDO
49 ENDDO
50 ENDDO
51 ENDDO
52
53 _GLOBAL_SUM_RL(tmpcost,myThid)
54
55 totcost = totcost + tmpcost
56
57 print *, 'QQ myiter, totcost = ', myiter, totcost
58
59 #endif
60
61 RETURN
62 END
63 cswd -- end added subroutine --

  ViewVC Help
Powered by ViewVC 1.1.22