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

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

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


Revision 1.8 - (show annotations) (download)
Fri Aug 10 19:36:02 2012 UTC (11 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63r, checkpoint63s, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.7: +2 -2 lines
rename COST_CPPOPTIONS.h to COST_OPTIONS.h

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_accumulate_mean.F,v 1.7 2011/05/24 22:11:29 jmc Exp $
2 C $Name: $
3
4 #include "COST_OPTIONS.h"
5
6 subroutine cost_accumulate_mean( myThid )
7 C *==========================================================*
8 C | subroutine cost_accumulate_mean |
9 C | o accumulate mean state for cost evalualtion |
10 C *==========================================================*
11 C | |
12 C *==========================================================*
13 IMPLICIT NONE
14
15 C == Global variables ===
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "DYNVARS.h"
20 #include "GRID.h"
21
22 #include "cost.h"
23
24 C == Routine arguments ==
25 C myThid - Thread number for this instance of the routine.
26 integer bi, bj
27 integer myThid
28
29 #ifdef ALLOW_COST
30 C == Local variables
31 _RL thetaRef
32
33 integer i, j, k
34 integer ig, jg
35 integer itlo,ithi
36 integer jtlo,jthi
37
38 jtlo = mybylo(mythid)
39 jthi = mybyhi(mythid)
40 itlo = mybxlo(mythid)
41 ithi = mybxhi(mythid)
42
43 C-- Calculate cost function on tile of this instance
44 do bj = jtlo,jthi
45 do bi = itlo,ithi
46 do k = 1, Nr
47 do j=1,sNy
48 do i=1,sNx
49 cMeanTheta(i,j,k,bi,bj) = cMeanTheta(i,j,k,bi,bj)
50 & + theta(i,j,k,bi,bj)
51 & /lastinterval*deltaTClock
52 cMeanUVel(i,j,k,bi,bj) = cMeanUVel(i,j,k,bi,bj)
53 & + uVel(i,j,k,bi,bj)
54 & /lastinterval*deltaTClock
55 cMeanVVel(i,j,k,bi,bj) = cMeanVVel(i,j,k,bi,bj)
56 & + vVel(i,j,k,bi,bj)
57 & /lastinterval*deltaTClock
58
59 cMeanThetaUVel(i,j,k,bi,bj) =
60 & cMeanThetaUVel(i,j,k,bi,bj)
61 & + (theta(i,j,k,bi,bj)+theta(i-1,j,k,bi,bj))
62 & /2.*uvel(i,j,k,bi,bj)
63 & *maskW(i,j,k,bi,bj)*maskC(i,j,k,bi,bj)
64 & /lastinterval*deltaTClock
65 cMeanThetaVVel(i,j,k,bi,bj) =
66 & cMeanThetaVVel(i,j,k,bi,bj)
67 & + (theta(i,j,k,bi,bj)+theta(i,j-1,k,bi,bj))
68 & /2.*vvel(i,j,k,bi,bj)
69 & *maskS(i,j,k,bi,bj)*maskC(i,j,k,bi,bj)
70 & /lastinterval*deltaTClock
71 end do
72 end do
73 end do
74 end do
75 end do
76
77 #endif
78
79 RETURN
80 END

  ViewVC Help
Powered by ViewVC 1.1.22