1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_cost_accumulate_mean.F,v 1.6 2010/03/24 03:05:11 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE SEAICE_COST_ACCUMULATE_MEAN( |
7 |
& myTime, myIter, myThid ) |
8 |
C *==========================================================* |
9 |
C | subroutine seaice_cost_accumulate_mean | |
10 |
C | o accumulate time-mean state for cost evalualtion | |
11 |
C *==========================================================* |
12 |
IMPLICIT NONE |
13 |
|
14 |
C == Global variables === |
15 |
#include "SIZE.h" |
16 |
#include "EEPARAMS.h" |
17 |
#include "PARAMS.h" |
18 |
#include "DYNVARS.h" |
19 |
#include "GRID.h" |
20 |
#include "SEAICE_SIZE.h" |
21 |
#include "SEAICE.h" |
22 |
#ifdef ALLOW_COST |
23 |
# include "cost.h" |
24 |
#endif |
25 |
|
26 |
C == Routine arguments == |
27 |
C myThid - Thread number for this instance of the routine. |
28 |
_RL myTime |
29 |
INTEGER myIter |
30 |
INTEGER myThid |
31 |
|
32 |
#ifdef ALLOW_COST |
33 |
C == Local variables |
34 |
INTEGER bi, bj |
35 |
INTEGER i, j |
36 |
INTEGER itlo,ithi |
37 |
INTEGER jtlo,jthi |
38 |
|
39 |
jtlo = myByLo(myThid) |
40 |
jthi = myByHi(myThid) |
41 |
itlo = myBxLo(myThid) |
42 |
ithi = myBxHi(myThid) |
43 |
|
44 |
#ifdef ALLOW_SEAICE_COST_EXPORT |
45 |
|
46 |
IF ( myTime .GT. (EndTime - lastinterval) ) THEN |
47 |
|
48 |
C-- Calculate cost function on tile of this instance |
49 |
DO bj = jtlo,jthi |
50 |
DO bi = itlo,ithi |
51 |
DO j=1,sNy |
52 |
DO i=1,sNx |
53 |
uHeffExportCell(i,j,bi,bj) = uHeffExportCell(i,j,bi,bj) |
54 |
& + ( 0.92 _d 0*(HEFF(i,j,bi,bj)+HEFF(i-1,j,bi,bj))*0.5 _d 0 |
55 |
& + 0.33 _d 0*(HSNOW(i,j,bi,bj)+HSNOW(i-1,j,bi,bj))*0.5 _d 0 |
56 |
& )*UICE(i,j,bi,bj) |
57 |
& *_dyG(i,j,bi,bj)/lastinterval*deltaTClock |
58 |
vHeffExportCell(i,j,bi,bj) = vHeffExportCell(i,j,bi,bj) |
59 |
& + ( 0.92 _d 0*(HEFF(i,j,bi,bj)+HEFF(i,j-1,bi,bj))*0.5 _d 0 |
60 |
& + 0.33 _d 0*(HSNOW(i,j,bi,bj)+HSNOW(i,j-1,bi,bj))*0.5 _d 0 |
61 |
& )*VICE(i,j,bi,bj) |
62 |
& *_dxG(i,j,bi,bj)/lastinterval*deltaTClock |
63 |
ENDDO |
64 |
ENDDO |
65 |
ENDDO |
66 |
ENDDO |
67 |
|
68 |
ENDIF |
69 |
|
70 |
#endif /* ALLOW_SEAICE_COST_EXPORT */ |
71 |
|
72 |
#endif /* ALLOW_COST */ |
73 |
|
74 |
RETURN |
75 |
END |