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

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

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


Revision 1.10 - (hide annotations) (download)
Tue May 24 22:14:36 2011 UTC (13 years ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint63, checkpoint62z, checkpoint62y
Changes since 1.9: +1 -3 lines
remove #include "PACKAGES_CONFIG.h" (now included from COST_CPPOPTIONS.h)

1 jmc 1.10 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_init_varia.F,v 1.9 2007/10/08 23:59:21 jmc Exp $
2 jmc 1.9 C $Name: $
3 heimbach 1.1
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 heimbach 1.6 #ifdef ALLOW_COST_TRANSPORT
60     objf_transport(bi,bj) = 0. _d 0
61     #endif
62     #ifdef ALLOW_COST_DEPTH
63     objf_depth(bi,bj) = 0. _d 0
64     #endif
65 heimbach 1.1 #ifdef ALLOW_COST_VECTOR
66     do i=1,sNx
67     objf_vector(i,bi,bj) = 0. _d 0
68     end do
69     #endif
70     c
71 dfer 1.7 #ifdef ALLOW_COST
72 heimbach 1.1 do k=1,nr
73     do j=1,sNy
74     do i=1,sNx
75     cMeanTheta(i,j,k,bi,bj) = 0. _d 0
76     cMeanUVel(i,j,k,bi,bj) = 0. _d 0
77     cMeanVVel(i,j,k,bi,bj) = 0. _d 0
78 heimbach 1.8 cMeanThetaUVel(i,j,k,bi,bj) = 0. _d 0
79     cMeanThetaVVel(i,j,k,bi,bj) = 0. _d 0
80 heimbach 1.1 end do
81     end do
82     end do
83     #endif
84     c
85     #ifdef ALLOW_COST_STATE_FINAL
86     do j=1,sNy
87 heimbach 1.3 do i=1,sNx
88     do k=1,4*Nr
89     objf_state_final(i,j,bi,bj,k) = 0. _d 0
90     enddo
91     objf_state_final(i,j,bi,bj,4*Nr+1) = 0. _d 0
92 heimbach 1.1 cph No init. of cost_state_final here,
93     cph because we need it in ADM*TLM
94     end do
95     end do
96     #endif
97     enddo
98     enddo
99    
100     #ifdef ALLOW_SEAICE
101     call seaice_cost_init_varia( mythid )
102     #endif
103    
104     #ifdef ALLOW_ECCO
105     call ecco_cost_init_varia( mythid )
106     #endif
107    
108     c-- Initialise the "global" parts of the cost function.
109     _BEGIN_MASTER( mythid )
110     fc = 0. _d 0
111     _END_MASTER( mythid )
112    
113     _BARRIER
114    
115     return
116     end

  ViewVC Help
Powered by ViewVC 1.1.22