/[MITgcm]/MITgcm/pkg/ecco/cost_averagesinit.F
ViewVC logotype

Annotation of /MITgcm/pkg/ecco/cost_averagesinit.F

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


Revision 1.2 - (hide annotations) (download)
Mon Oct 11 16:38:53 2004 UTC (19 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57o_post, checkpoint57m_post, checkpoint57k_post, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57e_post, checkpoint55h_post, checkpoint57g_pre, checkpoint56c_post, checkpoint57f_pre, checkpoint57a_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint57n_post, checkpoint57p_post, checkpoint57f_post, checkpoint57q_post, checkpoint57c_post, checkpoint55e_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +30 -16 lines
o ECCO specific cost function terms (up-to-date with 1x1 runs)
o ecco_cost_weights is modified to 1x1 runs
o modifs to allow observations to be read in as
  single file or yearly files

1 heimbach 1.2 C $Header: /u/gcmpack/MITgcm/pkg/cost/Attic/cost_averagesinit.F,v 1.1.2.3 2002/04/04 10:58:58 heimbach Exp $
2 heimbach 1.1
3     #include "COST_CPPOPTIONS.h"
4    
5    
6 heimbach 1.2 subroutine cost_AveragesInit(
7     I mythid
8     & )
9 heimbach 1.1
10     c ==================================================================
11 heimbach 1.2 c SUBROUTINE cost_AveragesInit
12 heimbach 1.1 c ==================================================================
13     c
14     c o Set average fields for temperature, salinity, surface pressure,
15     c and averaging counters to zero. The average fields are declared
16     c in the header file ecco_cost.h.
17     c
18     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
19     c
20     c changed: Christian Eckert eckert@mit.edu 11-Feb-2000
21     c
22     c - Restructured the code in order to create a package
23     c for the MITgcmUV.
24     c
25     c ==================================================================
26 heimbach 1.2 c SUBROUTINE cost_AveragesInit
27 heimbach 1.1 c ==================================================================
28    
29     implicit none
30    
31     c == global variables ==
32    
33     #include "EEPARAMS.h"
34     #include "SIZE.h"
35    
36     #include "ecco_cost.h"
37     #include "ctrl_dummy.h"
38    
39     c == routine arguments ==
40    
41     integer mythid
42    
43     c == local variables ==
44    
45     integer bi,bj
46     integer i,j,k
47     integer itlo,ithi
48     integer jtlo,jthi
49     integer jmin,jmax
50     integer imin,imax
51    
52     c == end of interface ==
53    
54     c-- Set the loop ranges.
55     jtlo = mybylo(mythid)
56     jthi = mybyhi(mythid)
57     itlo = mybxlo(mythid)
58     ithi = mybxhi(mythid)
59     jmin = 1
60     jmax = sny
61     imin = 1
62     imax = snx
63    
64     do bj = jtlo,jthi
65     do bi = itlo,ithi
66    
67     #ifdef ALLOW_SSH_COST_CONTRIBUTION
68     c-- Initialise surface pressure average.
69     do j = jmin,jmax
70     do i = imin,imax
71     psbar(i,j,bi,bj) = 0. _d 0
72     enddo
73     enddo
74    
75     xx_psbar_mean_dummy = 0. _d 0
76     #endif
77    
78     #if (defined (ALLOW_THETA_COST_CONTRIBUTION) || \
79     defined (ALLOW_CTDT_COST_CONTRIBUTION) || \
80     defined (ALLOW_XBT_COST_CONTRIBUTION) || \
81     defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
82     defined (ALLOW_OBCS_COST_CONTRIBUTION))
83     c-- Initialise temperature average (3d).
84     do k = 1,nr
85     do j = jmin,jmax
86     do i = imin,imax
87     tbar(i,j,k,bi,bj) = 0. _d 0
88     enddo
89     enddo
90     enddo
91     xx_tbar_mean_dummy = 0. _d 0
92 heimbach 1.2 #else
93     #ifdef ALLOW_SST_COST_CONTRIBUTION
94     c-- Initialise temperature average (2d).
95     k = 1
96     do j = jmin,jmax
97     do i = imin,imax
98     tbar(i,j,bi,bj) = 0. _d 0
99     enddo
100     enddo
101     xx_tbar_mean_dummy = 0. _d 0
102     #endif
103 heimbach 1.1 #endif
104    
105     #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \
106     defined (ALLOW_CTDS_COST_CONTRIBUTION) || \
107     defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
108     defined (ALLOW_OBCS_COST_CONTRIBUTION))
109     c-- Initialise salt average.
110     do k = 1,nr
111     do j = jmin,jmax
112     do i = imin,imax
113     sbar(i,j,k,bi,bj) = 0. _d 0
114     enddo
115     enddo
116     enddo
117     xx_sbar_mean_dummy = 0. _d 0
118 heimbach 1.2 #else
119     #ifdef ALLOW_SSS_COST_CONTRIBUTION
120     c-- Initialise salinity average (2d).
121     k = 1
122     do j = jmin,jmax
123     do i = imin,imax
124     sbar(i,j,bi,bj) = 0. _d 0
125     enddo
126     enddo
127     xx_sbar_mean_dummy = 0. _d 0
128     #endif
129 heimbach 1.1 #endif
130    
131     #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \
132 heimbach 1.2 defined (ALLOW_OBCS_COST_CONTRIBUTION))
133 heimbach 1.1 c-- Initialise uvel, vvel average.
134     do k = 1,nr
135     do j = jmin,jmax
136     do i = imin,imax
137     ubar(i,j,k,bi,bj) = 0. _d 0
138     vbar(i,j,k,bi,bj) = 0. _d 0
139     enddo
140     enddo
141     enddo
142     xx_ubar_mean_dummy = 0. _d 0
143     xx_vbar_mean_dummy = 0. _d 0
144     #endif
145    
146     #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
147     c-- Initialise uvel, vvel average.
148     do k = 1,nr
149     do j = jmin,jmax
150     do i = imin,imax
151     wbar(i,j,k,bi,bj) = 0. _d 0
152     enddo
153     enddo
154     enddo
155     xx_wbar_mean_dummy = 0. _d 0
156     #endif
157    
158     #ifdef ALLOW_SCAT_COST_CONTRIBUTION
159     c-- Initialise salinity average (2d).
160     do j = jmin,jmax
161     do i = imin,imax
162     tauxbar(i,j,bi,bj) = 0. _d 0
163     tauybar(i,j,bi,bj) = 0. _d 0
164     enddo
165     enddo
166     xx_taux_mean_dummy = 0. _d 0
167     xx_tauy_mean_dummy = 0. _d 0
168     #endif
169    
170     #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
171     c-- Initialise salinity average (2d).
172     do j = jmin,jmax
173     do i = imin,imax
174     hfluxbar(i,j,bi,bj) = 0. _d 0
175     enddo
176     enddo
177     xx_hflux_mean_dummy = 0. _d 0
178     #endif
179    
180     #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
181     c-- Initialise salinity average (2d).
182     do j = jmin,jmax
183     do i = imin,imax
184     sfluxbar(i,j,bi,bj) = 0. _d 0
185     enddo
186     enddo
187     xx_sflux_mean_dummy = 0. _d 0
188 heimbach 1.2 #endif
189 heimbach 1.1
190     enddo
191     enddo
192    
193     return
194     end
195    

  ViewVC Help
Powered by ViewVC 1.1.22