/[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.10 - (show annotations) (download)
Thu Mar 2 02:53:23 2006 UTC (18 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58e_post, checkpoint58n_post, checkpoint58h_post, checkpoint58q_post, checkpoint58j_post, checkpoint58f_post, checkpoint58d_post, checkpoint58c_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint58k_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.9: +34 -12 lines
Adding parameter to remove on-the-fly global mean and trend from
exf forcing and ctrl control adjustments

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_forcing.F,v 1.9 2006/02/18 01:13:07 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(33)
202 endrec = ncvarrecsend(33)
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 c-- Compute cost function contribution of wind stress observations.
214 #ifdef ALLOW_MEAN_HFLUX_COST_CONTRIBUTION
215 call cost_mean_heatflux( myiter, mytime, mythid )
216 #endif
217
218 c-- Compute cost function contribution of wind stress observations.
219 #ifdef ALLOW_MEAN_SFLUX_COST_CONTRIBUTION
220 call cost_mean_saltflux( myiter, mytime, mythid )
221 #endif
222
223 end

  ViewVC Help
Powered by ViewVC 1.1.22