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

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

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


Revision 1.12 - (show annotations) (download)
Fri Oct 27 05:16:54 2006 UTC (17 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58u_post, checkpoint58w_post, checkpoint58r_post, checkpoint58x_post, checkpoint58t_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint59, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post
Changes since 1.11: +93 -3 lines
Adding new control variables:
lwflux, lwdown, evap, snowprecip, apressure, runoff.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_forcing.F,v 1.11 2006/10/23 22:43:05 heimbach Exp $
2
3 #include "COST_CPPOPTIONS.h"
4
5
6 subroutine cost_forcing( myiter, mytime, mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_forcing
10 c ==================================================================
11 c
12 c o Evaluate cost function contributions of surface flux forcing.
13 c Now, these are heat flux, salt flux, zonal and meridional wind
14 c stress.
15 c
16 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
17 c
18 c changed: Christian Eckert eckert@mit.edu 25-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_forcing
25 c ==================================================================
26
27 implicit none
28
29 c == global variables ==
30
31 #include "SIZE.h"
32 #include "EEPARAMS.h"
33 #include "PARAMS.h"
34 #include "GRID.h"
35
36 #include "cal.h"
37 #include "ctrl.h"
38 #include "ctrl_dummy.h"
39 #include "ecco_cost.h"
40
41 c == routine arguments ==
42
43 integer mythid
44 integer myiter
45 _RL mytime
46
47 c == local variables ==
48
49 integer startrec
50 integer endrec
51
52 c == end of interface ==
53
54 c-- Evaluate the individual cost function contributions.
55
56 #if (defined (ALLOW_HFLUX_COST_CONTRIBUTION) && \
57 defined (ALLOW_HFLUX_CONTROL))
58 c-- Heat flux contribution to the cost function.
59 startrec = ncvarrecstart(3)
60 endrec = ncvarrecsend(3)
61 call cost_forcing_gen (
62 & myiter, mytime, startrec, endrec,
63 & xx_hflux_file, xx_hflux_dummy, xx_hfluxperiod,
64 & wmean_hflux, whflux,
65 & num_hflux, num_hfluxm,
66 & objf_hflux, objf_hfluxm, objf_hfluxsmoo,
67 & xx_hflux_remo_intercept, xx_hflux_remo_slope,
68 & maskC, mythid )
69 #elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \
70 defined (ALLOW_ATEMP_CONTROL))
71 c-- Atmos. temp. contribution to the cost function.
72 startrec = ncvarrecstart(7)
73 endrec = ncvarrecsend(7)
74 call cost_forcing_gen (
75 & myiter, mytime, startrec, endrec,
76 & xx_atemp_file, xx_atemp_dummy, xx_atempperiod,
77 & wmean_atemp, watemp,
78 & num_atemp, num_atempm,
79 & objf_atemp, objf_atempm, objf_atempsmoo,
80 & xx_atemp_remo_intercept, xx_atemp_remo_slope,
81 & maskC, mythid )
82 #endif
83
84 #if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \
85 defined (ALLOW_SFLUX_CONTROL))
86 c-- Salt flux contribution to the cost function.
87 startrec = ncvarrecstart(4)
88 endrec = ncvarrecsend(4)
89 call cost_forcing_gen (
90 & myiter, mytime, startrec, endrec,
91 & xx_sflux_file, xx_sflux_dummy, xx_sfluxperiod,
92 & wmean_sflux, wsflux,
93 & num_sflux, num_sfluxm,
94 & objf_sflux, objf_sfluxm, objf_sfluxsmoo,
95 & xx_sflux_remo_intercept, xx_sflux_remo_slope,
96 & maskC, mythid )
97 #elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \
98 defined (ALLOW_AQH_CONTROL))
99 c-- Specific humidity contribution to the cost function.
100 startrec = ncvarrecstart(8)
101 endrec = ncvarrecsend(8)
102 call cost_forcing_gen (
103 & myiter, mytime, startrec, endrec,
104 & xx_aqh_file, xx_aqh_dummy, xx_aqhperiod,
105 & wmean_aqh, waqh,
106 & num_aqh, num_aqhm,
107 & objf_aqh, objf_aqhm, objf_aqhsmoo,
108 & xx_aqh_remo_intercept, xx_aqh_remo_slope,
109 & maskC, mythid )
110 #endif
111
112 #if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \
113 defined (ALLOW_USTRESS_CONTROL))
114 c-- Zonal wind stress contribution to the cost function.
115 startrec = ncvarrecstart(5)
116 endrec = ncvarrecsend(5)
117 call cost_forcing_gen (
118 & myiter, mytime, startrec, endrec,
119 & xx_tauu_file, xx_tauu_dummy, xx_tauuperiod,
120 & wmean_tau, wtauu,
121 & num_tauu, num_tauum,
122 & objf_tauu, objf_tauum, objf_tauusmoo,
123 & xx_tauu_remo_intercept, xx_tauu_remo_slope,
124 & maskW, mythid )
125 #elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \
126 defined (ALLOW_UWIND_CONTROL))
127 c-- Zonal wind speed contribution to the cost function.
128 startrec = ncvarrecstart(9)
129 endrec = ncvarrecsend(9)
130 call cost_forcing_gen (
131 & myiter, mytime, startrec, endrec,
132 & xx_uwind_file, xx_uwind_dummy, xx_uwindperiod,
133 & wmean_wind, wuwind,
134 & num_uwind, num_uwindm,
135 & objf_uwind, objf_uwindm, objf_uwindsmoo,
136 & xx_uwind_remo_intercept, xx_uwind_remo_slope,
137 & maskC, mythid )
138 #endif
139
140 #if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \
141 defined (ALLOW_VSTRESS_CONTROL))
142 c-- Meridional wind stress contribution to the cost function.
143 startrec = ncvarrecstart(6)
144 endrec = ncvarrecsend(6)
145 call cost_forcing_gen (
146 & myiter, mytime, startrec, endrec,
147 & xx_tauv_file, xx_tauv_dummy, xx_tauvperiod,
148 & wmean_tau, wtauv,
149 & num_tauv, num_tauvm,
150 & objf_tauv, objf_tauvm, objf_tauvsmoo,
151 & xx_tauv_remo_intercept, xx_tauv_remo_slope,
152 & maskS, mythid )
153 #elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \
154 defined (ALLOW_VWIND_CONTROL))
155 c-- Meridional wind speed contribution to the cost function.
156 startrec = ncvarrecstart(10)
157 endrec = ncvarrecsend(10)
158 call cost_forcing_gen (
159 & myiter, mytime, startrec, endrec,
160 & xx_vwind_file, xx_vwind_dummy, xx_vwindperiod,
161 & wmean_wind, wvwind,
162 & num_vwind, num_vwindm,
163 & objf_vwind, objf_vwindm, objf_vwindsmoo,
164 & xx_vwind_remo_intercept, xx_vwind_remo_slope,
165 & maskC, mythid )
166 #endif
167
168 #if (defined (ALLOW_PRECIP_COST_CONTRIBUTION) && \
169 defined (ALLOW_PRECIP_CONTROL))
170 c-- Atmos. precip. contribution to the cost function.
171 startrec = ncvarrecstart(32)
172 endrec = ncvarrecsend(32)
173 call cost_forcing_gen (
174 & myiter, mytime, startrec, endrec,
175 & xx_precip_file, xx_precip_dummy, xx_precipperiod,
176 & wmean_precip, wprecip,
177 & num_precip, num_precipm,
178 & objf_precip, objf_precipm, objf_precipsmoo,
179 & xx_precip_remo_intercept, xx_precip_remo_slope,
180 & maskC, mythid )
181 #endif
182
183 #if (defined (ALLOW_SWFLUX_COST_CONTRIBUTION) && \
184 defined (ALLOW_SWFLUX_CONTROL))
185 c-- Atmos. swflux. contribution to the cost function.
186 startrec = ncvarrecstart(33)
187 endrec = ncvarrecsend(33)
188 call cost_forcing_gen (
189 & myiter, mytime, startrec, endrec,
190 & xx_swflux_file, xx_swflux_dummy, xx_swfluxperiod,
191 & wmean_swflux, wswflux,
192 & num_swflux, num_swfluxm,
193 & objf_swflux, objf_swfluxm, objf_swfluxsmoo,
194 & xx_swflux_remo_intercept, xx_swflux_remo_slope,
195 & maskC, mythid )
196 #endif
197
198 #if (defined (ALLOW_SWDOWN_COST_CONTRIBUTION) && \
199 defined (ALLOW_SWDOWN_CONTROL))
200 c-- Atmos. swdown. contribution to the cost function.
201 startrec = ncvarrecstart(34)
202 endrec = ncvarrecsend(34)
203 call cost_forcing_gen (
204 & myiter, mytime, startrec, endrec,
205 & xx_swdown_file, xx_swdown_dummy, xx_swdownperiod,
206 & wmean_swdown, wswdown,
207 & num_swdown, num_swdownm,
208 & objf_swdown, objf_swdownm, objf_swdownsmoo,
209 & xx_swdown_remo_intercept, xx_swdown_remo_slope,
210 & maskC, mythid )
211 #endif
212
213 #if (defined (ALLOW_LWFLUX_COST_CONTRIBUTION) && \
214 defined (ALLOW_LWFLUX_CONTROL))
215 c-- Atmos. lwflux. contribution to the cost function.
216 startrec = ncvarrecstart(35)
217 endrec = ncvarrecsend(35)
218 call cost_forcing_gen (
219 & myiter, mytime, startrec, endrec,
220 & xx_lwflux_file, xx_lwflux_dummy, xx_lwfluxperiod,
221 & wmean_lwflux, wlwflux,
222 & num_lwflux, num_lwfluxm,
223 & objf_lwflux, objf_lwfluxm, objf_lwfluxsmoo,
224 & xx_lwflux_remo_intercept, xx_lwflux_remo_slope,
225 & maskC, mythid )
226 #endif
227
228 #if (defined (ALLOW_LWDOWN_COST_CONTRIBUTION) && \
229 defined (ALLOW_LWDOWN_CONTROL))
230 c-- Atmos. lwdown. contribution to the cost function.
231 startrec = ncvarrecstart(36)
232 endrec = ncvarrecsend(36)
233 call cost_forcing_gen (
234 & myiter, mytime, startrec, endrec,
235 & xx_lwdown_file, xx_lwdown_dummy, xx_lwdownperiod,
236 & wmean_lwdown, wlwdown,
237 & num_lwdown, num_lwdownm,
238 & objf_lwdown, objf_lwdownm, objf_lwdownsmoo,
239 & xx_lwdown_remo_intercept, xx_lwdown_remo_slope,
240 & maskC, mythid )
241 #endif
242
243 #if (defined (ALLOW_EVAP_COST_CONTRIBUTION) && \
244 defined (ALLOW_EVAP_CONTROL))
245 c-- Atmos. evap. contribution to the cost function.
246 startrec = ncvarrecstart(36)
247 endrec = ncvarrecsend(36)
248 call cost_forcing_gen (
249 & myiter, mytime, startrec, endrec,
250 & xx_evap_file, xx_evap_dummy, xx_evapperiod,
251 & wmean_evap, wevap,
252 & num_evap, num_evapm,
253 & objf_evap, objf_evapm, objf_evapsmoo,
254 & xx_evap_remo_intercept, xx_evap_remo_slope,
255 & maskC, mythid )
256 #endif
257
258 #if (defined (ALLOW_SNOWPRECIP_COST_CONTRIBUTION) && \
259 defined (ALLOW_SNOWPRECIP_CONTROL))
260 c-- Atmos. snowprecip. contribution to the cost function.
261 startrec = ncvarrecstart(36)
262 endrec = ncvarrecsend(36)
263 call cost_forcing_gen (
264 & myiter, mytime, startrec, endrec,
265 & xx_snowprecip_file, xx_snowprecip_dummy, xx_snowprecipperiod,
266 & wmean_snowprecip, wsnowprecip,
267 & num_snowprecip, num_snowprecipm,
268 & objf_snowprecip, objf_snowprecipm, objf_snowprecipsmoo,
269 & xx_snowprecip_remo_intercept, xx_snowprecip_remo_slope,
270 & maskC, mythid )
271 #endif
272
273 #if (defined (ALLOW_APRESSURE_COST_CONTRIBUTION) && \
274 defined (ALLOW_APRESSURE_CONTROL))
275 c-- Atmos. apressure. contribution to the cost function.
276 startrec = ncvarrecstart(36)
277 endrec = ncvarrecsend(36)
278 call cost_forcing_gen (
279 & myiter, mytime, startrec, endrec,
280 & xx_apressure_file, xx_apressure_dummy, xx_apressureperiod,
281 & wmean_apressure, wapressure,
282 & num_apressure, num_apressurem,
283 & objf_apressure, objf_apressurem, objf_apressuresmoo,
284 & xx_apressure_remo_intercept, xx_apressure_remo_slope,
285 & maskC, mythid )
286 #endif
287
288 #if (defined (ALLOW_RUNOFF_COST_CONTRIBUTION) && \
289 defined (ALLOW_RUNOFF_CONTROL))
290 c-- Atmos. runoff. contribution to the cost function.
291 startrec = ncvarrecstart(36)
292 endrec = ncvarrecsend(36)
293 call cost_forcing_gen (
294 & myiter, mytime, startrec, endrec,
295 & xx_runoff_file, xx_runoff_dummy, xx_runoffperiod,
296 & wmean_runoff, wrunoff,
297 & num_runoff, num_runoffm,
298 & objf_runoff, objf_runoffm, objf_runoffsmoo,
299 & xx_runoff_remo_intercept, xx_runoff_remo_slope,
300 & maskC, mythid )
301 #endif
302
303 end

  ViewVC Help
Powered by ViewVC 1.1.22