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

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

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


Revision 1.13 - (hide annotations) (download)
Tue Oct 9 00:02:50 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.12: +36 -35 lines
add missing cvs $Header:$ or $Name:$

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

  ViewVC Help
Powered by ViewVC 1.1.22