-
Notifications
You must be signed in to change notification settings - Fork 237
/
cost_tracer.F
69 lines (57 loc) · 1.79 KB
/
cost_tracer.F
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "COST_OPTIONS.h"
subroutine cost_tracer( bi, bj, myThid )
C /==========================================================\
C | subroutine cost_tracer |
C | o this routine computes the cost function for the tiles |
C | of this processor |
C |==========================================================|
C | |
C | Notes |
C | ===== |
C \==========================================================/
IMPLICIT NONE
C == Global variables ===
#include "SIZE.h"
#include "EEPARAMS.h"
#include "PARAMS.h"
#include "DYNVARS.h"
#include "GRID.h"
#ifdef ALLOW_COST_TRACER
# ifdef ALLOW_PTRACERS
# include "PTRACERS_SIZE.h"
# include "PTRACERS_PARAMS.h"
# include "PTRACERS_FIELDS.h"
# endif
#endif
#include "cost.h"
C == Routine arguments ==
C myThid - Thread number for this instance of the routine.
integer bi, bj
integer myThid
#ifdef ALLOW_COST_TRACER
C == Local variables
_RL thetaRef
_RL locfc
integer i, j, k
integer ig, jg
ce some reference temperature
thetaRef = 24.0D0
locfc = 0. _d 0
k=1
DO j=1,sNy
DO i=1,sNx
#ifdef ALLOW_PTRACERS
locfc = locfc + maskC(i,j,k,bi,bj)*
& ptracer(i,j,k,bi,bj,6)*
& rA(i,j,bi,bj)*drF(k)
#endif
ENDDO
ENDDO
objf_tracer(bi,bj) = objf_tracer(bi,bj) + locfc
#ifdef ALLOW_PTRACERS
print *, 'COST TRACER nach', objf_tracer(bi,bj),
& ptracer(83,33,1,1,1,1), ptracer(83,33,2,1,1,1)
#endif
#endif /* ALLOW_COST_TRACER */
RETURN
END