/[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.12 - (show annotations) (download)
Fri Oct 16 15:48:33 2009 UTC (14 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint63a, checkpoint62, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.11: +15 -71 lines
Change default cost function

1 C $Header: /u/gcmpack/MITgcm/pkg/dic/dic_cost.F,v 1.11 2008/09/09 19:58:26 jmc 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_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