/[MITgcm]/MITgcm/pkg/cost/cost_init_varia.F
ViewVC logotype

Contents of /MITgcm/pkg/cost/cost_init_varia.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Dec 13 16:15:32 2005 UTC (18 years, 5 months ago) by heimbach
Branch: MAIN
Changes since 1.1: +2 -2 lines
Extend cMean fields to ALLOW_COST_TEST

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_init_varia.F,v 1.1 2005/08/25 16:10:42 heimbach Exp $
2
3 #include "PACKAGES_CONFIG.h"
4 #include "COST_CPPOPTIONS.h"
5
6 subroutine cost_init_varia( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_init_varia
10 c ==================================================================
11 c
12 c o Initialise the variable cost function part.
13 c
14 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
15 c
16 c changed: Christian Eckert eckert@mit.edu 18-Apr-2000
17 c
18 c - Restructured the code in order to create a package
19 c for the MITgcmUV.
20 c
21 c ==================================================================
22 c SUBROUTINE cost_init_varia
23 c ==================================================================
24
25 implicit none
26
27 c == global variables ==
28
29 #include "EEPARAMS.h"
30 #include "SIZE.h"
31
32 #include "cost.h"
33
34 c == routine arguments ==
35
36 integer mythid
37
38 c == local variables ==
39
40 integer i,j,k
41 integer bi,bj
42 integer itlo,ithi
43 integer jtlo,jthi
44
45 c == external functions ==
46
47 c == end of interface ==
48 jtlo = mybylo(mythid)
49 jthi = mybyhi(mythid)
50 itlo = mybxlo(mythid)
51 ithi = mybxhi(mythid)
52
53 c-- Initialize the tiled cost function contributions.
54 do bj = jtlo,jthi
55 do bi = itlo,ithi
56 objf_atl(bi,bj) = 0. _d 0
57 objf_test(bi,bj) = 0. _d 0
58 objf_tracer(bi,bj) = 0. _d 0
59 #ifdef ALLOW_COST_VECTOR
60 do i=1,sNx
61 objf_vector(i,bi,bj) = 0. _d 0
62 end do
63 #endif
64 c
65 #if (defined (ALLOW_COST_TEST) || defined (ALLOW_COST_ATLANTIC_HEAT))
66 do k=1,nr
67 do j=1,sNy
68 do i=1,sNx
69 cMeanTheta(i,j,k,bi,bj) = 0. _d 0
70 cMeanUVel(i,j,k,bi,bj) = 0. _d 0
71 cMeanVVel(i,j,k,bi,bj) = 0. _d 0
72 end do
73 end do
74 end do
75 #endif
76 c
77 #ifdef ALLOW_COST_STATE_FINAL
78 do j=1,sNy
79 do i=1,sNx
80 objf_state_final(i,j,bi,bj,1) = 0. _d 0
81 objf_state_final(i,j,bi,bj,2) = 0. _d 0
82 cph No init. of cost_state_final here,
83 cph because we need it in ADM*TLM
84 end do
85 end do
86 #endif
87 enddo
88 enddo
89
90 #ifdef ALLOW_SEAICE
91 call seaice_cost_init_varia( mythid )
92 #endif
93
94 #ifdef ALLOW_ECCO
95 call ecco_cost_init_varia( mythid )
96 #endif
97
98 c-- Initialise the "global" parts of the cost function.
99 _BEGIN_MASTER( mythid )
100 fc = 0. _d 0
101 _END_MASTER( mythid )
102
103 _BARRIER
104
105 return
106 end
107

  ViewVC Help
Powered by ViewVC 1.1.22