1 |
heimbach |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "CPP_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_ATLANTIC_HEAT |
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 |
|
|
end do |
59 |
|
|
end do |
60 |
|
|
end do |
61 |
|
|
end do |
62 |
|
|
end do |
63 |
|
|
|
64 |
|
|
#endif /* ALLOW_COST_ATLANTIC_HEAT */ |
65 |
|
|
|
66 |
|
|
END |