/[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.1 - (show annotations) (download)
Thu Nov 6 22:10:07 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint54a_post, checkpoint53c_post, checkpoint55d_pre, hrcube_1, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint52k_post, checkpoint52b_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint54, checkpoint54f_post, checkpoint53b_post, checkpoint52a_pre, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, ecco_c52_e35, hrcube5, checkpoint52i_post, checkpoint52j_pre, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_2, hrcube_3
Branch point for: netcdf-sm0
o merging from ecco-branch
o pkg/ecco now containes ecco-specific part of cost function
o top level routines the_main_loop, forward_step
  supersede those in model/src/
  previous input data.cost now in data.ecco
  (new namelist ecco_cost_nml)

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

  ViewVC Help
Powered by ViewVC 1.1.22