1 |
C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_cost_init_varia.F,v 1.7 2012/03/06 16:45:20 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "SEAICE_OPTIONS.h" |
5 |
|
6 |
subroutine seaice_cost_init_varia( mythid ) |
7 |
|
8 |
c ================================================================== |
9 |
c SUBROUTINE seaice_cost_init_varia |
10 |
c ================================================================== |
11 |
c |
12 |
c o Initialise the variable cost function part. |
13 |
c added sea-ice term: menemenlis@jpl.nasa.gov 26-Feb-2003 |
14 |
c |
15 |
c ================================================================== |
16 |
c SUBROUTINE seaice_cost_init_varia |
17 |
c ================================================================== |
18 |
|
19 |
implicit none |
20 |
|
21 |
c == global variables == |
22 |
|
23 |
#include "EEPARAMS.h" |
24 |
#include "SIZE.h" |
25 |
#include "GRID.h" |
26 |
#ifdef ALLOW_COST |
27 |
# include "SEAICE_SIZE.h" |
28 |
# include "SEAICE.h" |
29 |
# include "SEAICE_COST.h" |
30 |
#endif |
31 |
|
32 |
c == routine arguments == |
33 |
|
34 |
integer mythid |
35 |
|
36 |
#ifdef ALLOW_COST |
37 |
c == local variables == |
38 |
|
39 |
integer bi,bj |
40 |
integer itlo,ithi |
41 |
integer jtlo,jthi |
42 |
integer imin, imax |
43 |
integer jmin, jmax |
44 |
integer i,j,k |
45 |
|
46 |
logical exst |
47 |
|
48 |
c == external functions == |
49 |
|
50 |
c == end of interface == |
51 |
jtlo = myByLo(mythid) |
52 |
jthi = myByHi(mythid) |
53 |
itlo = myBxLo(mythid) |
54 |
ithi = myBxHi(mythid) |
55 |
jmin = 1-OLy |
56 |
jmax = sNy+OLy |
57 |
imin = 1-OLx |
58 |
imax = sNx+OLx |
59 |
|
60 |
c-- Initialize the tiled cost function contributions. |
61 |
do bj = jtlo,jthi |
62 |
do bi = itlo,ithi |
63 |
objf_ice(bi,bj) = 0. _d 0 |
64 |
objf_smrarea(bi,bj) = 0. _d 0 |
65 |
objf_smrsst(bi,bj) = 0. _d 0 |
66 |
objf_smrsss(bi,bj) = 0. _d 0 |
67 |
objf_ice_export(bi,bj) = 0. _d 0 |
68 |
c |
69 |
num_ice(bi,bj) = 0. _d 0 |
70 |
num_smrarea(bi,bj) = 0. _d 0 |
71 |
num_smrsst(bi,bj) = 0. _d 0 |
72 |
num_smrsss(bi,bj) = 0. _d 0 |
73 |
enddo |
74 |
enddo |
75 |
|
76 |
k = 1 |
77 |
do bj = jtlo,jthi |
78 |
do bi = itlo,ithi |
79 |
do j = jmin,jmax |
80 |
do i = imin,imax |
81 |
#ifdef ALLOW_SEAICE_COST_EXPORT |
82 |
uHeffExportCell(i,j,bi,bj) = 0. _d 0 |
83 |
vHeffExportCell(i,j,bi,bj) = 0. _d 0 |
84 |
#endif |
85 |
enddo |
86 |
enddo |
87 |
enddo |
88 |
enddo |
89 |
|
90 |
_BARRIER |
91 |
|
92 |
#endif |
93 |
|
94 |
return |
95 |
end |