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

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

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


Revision 1.4 - (show annotations) (download)
Wed Sep 7 03:02:11 2005 UTC (18 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57s_post, checkpoint58r_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.3: +5 -1 lines
Introduce nnztbar, nnzsbar to distinguish btw 2d/3d bar files
at initialisation time.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_averagesinit.F,v 1.3 2005/09/01 05:32:56 heimbach Exp $
2
3 #include "COST_CPPOPTIONS.h"
4
5 subroutine cost_averagesinit( mythid )
6
7 c ==================================================================
8 c SUBROUTINE cost_averagesinit
9 c ==================================================================
10 c
11 c o Set average fields for temperature, salinity, surface pressure,
12 c and averaging counters to zero. The average fields are declared
13 c in the header file ecco_cost.h.
14 c
15 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
16 c
17 c changed: Christian Eckert eckert@mit.edu 11-Feb-2000
18 c
19 c - Restructured the code in order to create a package
20 c for the MITgcmUV.
21 c
22 c ==================================================================
23 c SUBROUTINE cost_averagesinit
24 c ==================================================================
25
26 implicit none
27
28 c == global variables ==
29
30 #include "EEPARAMS.h"
31 #include "SIZE.h"
32
33 #include "ecco_cost.h"
34 #include "ctrl_dummy.h"
35 #ifdef ALLOW_SEAICE
36 # include "SEAICE_COST.h"
37 #endif
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 nnztbar = nr
93 #else
94 #ifdef ALLOW_SST_COST_CONTRIBUTION
95 c-- Initialise temperature average (2d).
96 k = 1
97 do j = jmin,jmax
98 do i = imin,imax
99 tbar(i,j,bi,bj) = 0. _d 0
100 enddo
101 enddo
102 xx_tbar_mean_dummy = 0. _d 0
103 nnztbar = 1
104 #endif
105 #endif
106
107 #if (defined (ALLOW_SALT_COST_CONTRIBUTION) || \
108 defined (ALLOW_CTDS_COST_CONTRIBUTION) || \
109 defined (ALLOW_DRIFT_COST_CONTRIBUTION) || \
110 defined (ALLOW_OBCS_COST_CONTRIBUTION))
111 c-- Initialise salt average.
112 do k = 1,nr
113 do j = jmin,jmax
114 do i = imin,imax
115 sbar(i,j,k,bi,bj) = 0. _d 0
116 enddo
117 enddo
118 enddo
119 xx_sbar_mean_dummy = 0. _d 0
120 nnzsbar = nr
121 #else
122 #ifdef ALLOW_SSS_COST_CONTRIBUTION
123 c-- Initialise salinity average (2d).
124 k = 1
125 do j = jmin,jmax
126 do i = imin,imax
127 sbar(i,j,bi,bj) = 0. _d 0
128 enddo
129 enddo
130 xx_sbar_mean_dummy = 0. _d 0
131 nnzsbar = 1
132 #endif
133 #endif
134
135 #if (defined (ALLOW_DRIFTER_COST_CONTRIBUTION) || \
136 defined (ALLOW_OBCS_COST_CONTRIBUTION))
137 c-- Initialise uvel, vvel average.
138 do k = 1,nr
139 do j = jmin,jmax
140 do i = imin,imax
141 ubar(i,j,k,bi,bj) = 0. _d 0
142 vbar(i,j,k,bi,bj) = 0. _d 0
143 enddo
144 enddo
145 enddo
146 xx_ubar_mean_dummy = 0. _d 0
147 xx_vbar_mean_dummy = 0. _d 0
148 #endif
149
150 #ifdef ALLOW_DRIFTW_COST_CONTRIBUTION
151 c-- Initialise uvel, vvel average.
152 do k = 1,nr
153 do j = jmin,jmax
154 do i = imin,imax
155 wbar(i,j,k,bi,bj) = 0. _d 0
156 enddo
157 enddo
158 enddo
159 xx_wbar_mean_dummy = 0. _d 0
160 #endif
161
162 #ifdef ALLOW_SCAT_COST_CONTRIBUTION
163 c-- Initialise salinity average (2d).
164 do j = jmin,jmax
165 do i = imin,imax
166 tauxbar(i,j,bi,bj) = 0. _d 0
167 tauybar(i,j,bi,bj) = 0. _d 0
168 enddo
169 enddo
170 xx_taux_mean_dummy = 0. _d 0
171 xx_tauy_mean_dummy = 0. _d 0
172 #endif
173
174 #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
175 c-- Initialise salinity average (2d).
176 do j = jmin,jmax
177 do i = imin,imax
178 hfluxbar(i,j,bi,bj) = 0. _d 0
179 enddo
180 enddo
181 xx_hflux_mean_dummy = 0. _d 0
182 #endif
183
184 #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
185 c-- Initialise salinity average (2d).
186 do j = jmin,jmax
187 do i = imin,imax
188 sfluxbar(i,j,bi,bj) = 0. _d 0
189 enddo
190 enddo
191 xx_sflux_mean_dummy = 0. _d 0
192 #endif
193
194 #ifdef ALLOW_SEAICE
195
196 # ifdef ALLOW_SEAICE_COST_SMR_AREA
197 c-- Initialise salinity average (2d).
198 do j = jmin,jmax
199 do i = imin,imax
200 smrareabar(i,j,bi,bj) = 0. _d 0
201 enddo
202 enddo
203 xx_smrareabar_mean_dummy = 0. _d 0
204 # endif
205
206 #endif
207
208 enddo
209 enddo
210
211 return
212 end
213

  ViewVC Help
Powered by ViewVC 1.1.22