1 |
C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_depth.F,v 1.3 2012/06/15 20:34:53 heimbach Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "COST_OPTIONS.h" |
5 |
|
6 |
subroutine cost_depth( myThid ) |
7 |
C /==========================================================\ |
8 |
C | subroutine cost_depth | |
9 |
C | o this routine computes the cost function for the tiles | |
10 |
C | of this processor | |
11 |
C |==========================================================| |
12 |
C | | |
13 |
C | Notes | |
14 |
C | ===== | |
15 |
C \==========================================================/ |
16 |
IMPLICIT NONE |
17 |
|
18 |
C == Global variables === |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "DYNVARS.h" |
23 |
#include "GRID.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_DEPTH |
33 |
C == Local variables |
34 |
|
35 |
INTEGER I, J, K |
36 |
|
37 |
character*(max_len_mbuf) msgbuf |
38 |
|
39 |
C-- Calculate cost function on tile of this instance |
40 |
DO bj=myByLo(myThid), myByHi(myThid) |
41 |
DO bi=myBxLo(myThid), myBxHi(myThid) |
42 |
DO J=1,sNy |
43 |
DO I=1,sNx |
44 |
IF ( maskC(I,J,1,BI,BJ) .NE. 0. ) THEN |
45 |
objf_depth(BI,BJ) = objf_depth(BI,BJ) + R_low(I,J,BI,BJ) |
46 |
ENDIF |
47 |
END DO |
48 |
END DO |
49 |
END DO |
50 |
END DO |
51 |
#endif /* ALLOW_COST_DEPTH */ |
52 |
|
53 |
RETURN |
54 |
END |