/[MITgcm]/MITgcm_contrib/bling/pkg/bling_cost.F
ViewVC logotype

Annotation of /MITgcm_contrib/bling/pkg/bling_cost.F

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


Revision 1.2 - (hide annotations) (download)
Sun Feb 28 21:49:24 2016 UTC (9 years, 4 months ago) by mmazloff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Update to BLING version 2

1 mmazloff 1.1 C $Header: $
2     C $Name: $
3    
4     #include "BLING_OPTIONS.h"
5    
6     CBOP
7     subroutine BLING_COST (
8     I myTime,myIter,myThid)
9    
10     C =================================================================
11     C | subroutine bling_cost
12     C | o
13     C =================================================================
14    
15     implicit none
16    
17     C == GLobal variables ==
18     #include "SIZE.h"
19     #include "DYNVARS.h"
20     #include "EEPARAMS.h"
21     #include "PARAMS.h"
22     #include "GRID.h"
23     #include "BLING_VARS.h"
24     #include "BLING_COST.h"
25    
26     C == Routine arguments ==
27     INTEGER myIter
28     _RL myTime
29     INTEGER myThid
30    
31     #ifdef ALLOW_BLING_COST
32    
33     C == Local variables ==
34     INTEGER i, j, bi, bj, k, it
35     _RL tmpcost
36     CEOP
37    
38     c calculate costfunction
39    
40     tmpcost = 0. _d 0
41     DO bj=myByLo(myThid),myByHi(myThid)
42     DO bi=myBxLo(myThid),myBxHi(myThid)
43     DO i=1,sNx
44     DO j=1,sNy
45     tmpcost = tmpcost+FluxCO2(i,j,bi,bj)*rA(i,j,bi,bj)*
46     & maskC(i,j,1,bi,bj)*dTtracerLev(1)
47     ENDDO
48     ENDDO
49     ENDDO
50     ENDDO
51    
52     _GLOBAL_SUM_RL(tmpcost,myThid)
53    
54     totcost = totcost + tmpcost
55    
56     print *, 'QQ myiter, totcost = ', myiter, totcost
57    
58     #endif /* ALLOW_BLING_COST */
59    
60     RETURN
61     END

  ViewVC Help
Powered by ViewVC 1.1.22