1 |
heimbach |
1.2 |
C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_tracer.F,v 1.1 2001/07/13 13:37:45 heimbach Exp $ |
2 |
heimbach |
1.1 |
|
3 |
heimbach |
1.2 |
#include "COST_CPPOPTIONS.h" |
4 |
heimbach |
1.1 |
|
5 |
|
|
subroutine cost_tracer( bi, bj, myThid ) |
6 |
|
|
C /==========================================================\ |
7 |
|
|
C | subroutine cost_tracer | |
8 |
|
|
C | o this routine computes the cost function for the tiles | |
9 |
|
|
C | of this processor | |
10 |
|
|
C |==========================================================| |
11 |
|
|
C | | |
12 |
|
|
C | Notes | |
13 |
|
|
C | ===== | |
14 |
|
|
C \==========================================================/ |
15 |
|
|
IMPLICIT NONE |
16 |
|
|
|
17 |
|
|
C == Global variables === |
18 |
|
|
#include "SIZE.h" |
19 |
|
|
#include "EEPARAMS.h" |
20 |
|
|
#include "PARAMS.h" |
21 |
|
|
#include "DYNVARS.h" |
22 |
|
|
#include "GRID.h" |
23 |
|
|
#include "TR1.h" |
24 |
|
|
|
25 |
|
|
#include "cost.h" |
26 |
|
|
|
27 |
|
|
C == Routine arguments == |
28 |
|
|
C myThid - Thread number for this instance of the routine. |
29 |
|
|
integer bi, bj |
30 |
|
|
integer myThid |
31 |
|
|
|
32 |
|
|
#ifdef ALLOW_COST_TRACER |
33 |
|
|
C == Local variables |
34 |
|
|
_RL thetaRef |
35 |
|
|
_RL locfc |
36 |
|
|
|
37 |
|
|
integer i, j, k |
38 |
|
|
integer ig, jg |
39 |
|
|
ce some reference temperature |
40 |
|
|
thetaRef = 24.0D0 |
41 |
|
|
|
42 |
|
|
locfc = 0. _d 0 |
43 |
|
|
|
44 |
|
|
k=1 |
45 |
|
|
DO j=1,sNy |
46 |
|
|
DO i=1,sNx |
47 |
|
|
locfc = locfc + maskC(i,j,k,bi,bj)* |
48 |
|
|
& lambdaTr1ClimRelax*Tr1(i,j,k,bi,bj)* |
49 |
|
|
& rA(i,j,bi,bj)*drF(k)*deltaTtracer |
50 |
|
|
ENDDO |
51 |
|
|
ENDDO |
52 |
|
|
|
53 |
|
|
cph( |
54 |
|
|
print *, 'COST TRACER vor ', objf_tracer(bi,bj) |
55 |
|
|
cph) |
56 |
|
|
|
57 |
|
|
objf_tracer(bi,bj) = objf_tracer(bi,bj) + locfc |
58 |
|
|
|
59 |
|
|
cph( |
60 |
|
|
print *, 'COST TRACER nach', objf_tracer(bi,bj) |
61 |
|
|
cph) |
62 |
|
|
|
63 |
|
|
#endif /* ALLOW_COST_TRACER */ |
64 |
|
|
|
65 |
|
|
RETURN |
66 |
|
|
END |