34 |
|
|
35 |
#include "SIZE.h" |
#include "SIZE.h" |
36 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
37 |
|
#include "PARAMS.h" |
38 |
|
#include "GRID.h" |
39 |
|
|
40 |
#include "cal.h" |
#include "cal.h" |
41 |
#include "ctrl.h" |
#include "ctrl.h" |
42 |
|
#include "ctrl_dummy.h" |
43 |
|
#include "ecco_cost.h" |
44 |
|
|
45 |
c == routine arguments == |
c == routine arguments == |
46 |
|
|
62 |
c-- Heat flux contribution to the cost function. |
c-- Heat flux contribution to the cost function. |
63 |
startrec = ncvarrecstart(3) |
startrec = ncvarrecstart(3) |
64 |
endrec = ncvarrecsend(3) |
endrec = ncvarrecsend(3) |
65 |
call cost_heatflux ( myiter, mytime, |
call cost_forcing_gen ( |
66 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
67 |
|
& xx_hflux_file, xx_hflux_dummy, wmean_hflux, whflux, |
68 |
|
& num_hflux, num_hfluxm, objf_hflux, objf_hfluxm, maskC, |
69 |
|
& mythid ) |
70 |
#elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \ |
#elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \ |
71 |
defined (ALLOW_ATEMP_CONTROL)) |
defined (ALLOW_ATEMP_CONTROL)) |
72 |
c-- Atmos. temp. contribution to the cost function. |
c-- Atmos. temp. contribution to the cost function. |
73 |
startrec = ncvarrecstart(7) |
startrec = ncvarrecstart(7) |
74 |
endrec = ncvarrecsend(7) |
endrec = ncvarrecsend(7) |
75 |
call cost_atemp ( myiter, mytime, |
call cost_forcing_gen ( |
76 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
77 |
|
& xx_atemp_file, xx_atemp_dummy, wmean_atemp, watemp, |
78 |
|
& num_atemp, num_atempm, objf_atemp, objf_atempm, maskC, |
79 |
|
& mythid ) |
80 |
#endif |
#endif |
81 |
|
|
82 |
#if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \ |
#if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \ |
84 |
c-- Salt flux contribution to the cost function. |
c-- Salt flux contribution to the cost function. |
85 |
startrec = ncvarrecstart(4) |
startrec = ncvarrecstart(4) |
86 |
endrec = ncvarrecsend(4) |
endrec = ncvarrecsend(4) |
87 |
call cost_saltflux ( myiter, mytime, |
call cost_forcing_gen ( |
88 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
89 |
|
& xx_sflux_file, xx_sflux_dummy, wmean_sflux, wsflux, |
90 |
|
& num_sflux, num_sfluxm, objf_sflux, objf_sfluxm, maskC, |
91 |
|
& mythid ) |
92 |
#elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \ |
#elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \ |
93 |
defined (ALLOW_AQH_CONTROL)) |
defined (ALLOW_AQH_CONTROL)) |
94 |
c-- Specific humidity contribution to the cost function. |
c-- Specific humidity contribution to the cost function. |
95 |
startrec = ncvarrecstart(8) |
startrec = ncvarrecstart(8) |
96 |
endrec = ncvarrecsend(8) |
endrec = ncvarrecsend(8) |
97 |
call cost_aqh ( myiter, mytime, |
call cost_forcing_gen ( |
98 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
99 |
|
& xx_aqh_file, xx_aqh_dummy, wmean_aqh, waqh, |
100 |
|
& num_aqh, num_aqhm, objf_aqh, objf_aqhm, maskC, |
101 |
|
& mythid ) |
102 |
#endif |
#endif |
103 |
|
|
104 |
#if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \ |
#if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \ |
106 |
c-- Zonal wind stress contribution to the cost function. |
c-- Zonal wind stress contribution to the cost function. |
107 |
startrec = ncvarrecstart(5) |
startrec = ncvarrecstart(5) |
108 |
endrec = ncvarrecsend(5) |
endrec = ncvarrecsend(5) |
109 |
call cost_zonstress( myiter, mytime, |
call cost_forcing_gen ( |
110 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
111 |
|
& xx_tauu_file, xx_tauu_dummy, wmean_tau, wtauu, |
112 |
|
& num_tauu, num_tauum, objf_tauu, objf_tauum, maskW, |
113 |
|
& mythid ) |
114 |
#elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \ |
#elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \ |
115 |
defined (ALLOW_UWIND_CONTROL)) |
defined (ALLOW_UWIND_CONTROL)) |
116 |
c-- Zonal wind speed contribution to the cost function. |
c-- Zonal wind speed contribution to the cost function. |
117 |
startrec = ncvarrecstart(9) |
startrec = ncvarrecstart(9) |
118 |
endrec = ncvarrecsend(9) |
endrec = ncvarrecsend(9) |
119 |
call cost_uwind( myiter, mytime, |
call cost_forcing_gen ( |
120 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
121 |
|
& xx_uwind_file, xx_uwind_dummy, wmean_wind, wuwind, |
122 |
|
& num_uwind, num_uwindm, objf_uwind, objf_uwindm, maskC, |
123 |
|
& mythid ) |
124 |
#endif |
#endif |
125 |
|
|
126 |
#if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \ |
#if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \ |
128 |
c-- Meridional wind stress contribution to the cost function. |
c-- Meridional wind stress contribution to the cost function. |
129 |
startrec = ncvarrecstart(6) |
startrec = ncvarrecstart(6) |
130 |
endrec = ncvarrecsend(6) |
endrec = ncvarrecsend(6) |
131 |
call cost_merstress( myiter, mytime, |
call cost_forcing_gen ( |
132 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
133 |
|
& xx_tauv_file, xx_tauv_dummy, wmean_tau, wtauv, |
134 |
|
& num_tauv, num_tauvm, objf_tauv, objf_tauvm, maskS, |
135 |
|
& mythid ) |
136 |
#elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \ |
#elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \ |
137 |
defined (ALLOW_VWIND_CONTROL)) |
defined (ALLOW_VWIND_CONTROL)) |
138 |
c-- Meridional wind speed contribution to the cost function. |
c-- Meridional wind speed contribution to the cost function. |
139 |
startrec = ncvarrecstart(10) |
startrec = ncvarrecstart(10) |
140 |
endrec = ncvarrecsend(10) |
endrec = ncvarrecsend(10) |
141 |
call cost_vwind( myiter, mytime, |
call cost_forcing_gen ( |
142 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
143 |
|
& xx_vwind_file, xx_vwind_dummy, wmean_wind, wvwind, |
144 |
|
& num_vwind, num_vwindm, objf_vwind, objf_vwindm, maskC, |
145 |
|
& mythid ) |
146 |
#endif |
#endif |
147 |
|
|
148 |
#if (defined (ALLOW_PRECIP_COST_CONTRIBUTION) && \ |
#if (defined (ALLOW_PRECIP_COST_CONTRIBUTION) && \ |
150 |
c-- Atmos. temp. contribution to the cost function. |
c-- Atmos. temp. contribution to the cost function. |
151 |
startrec = ncvarrecstart(32) |
startrec = ncvarrecstart(32) |
152 |
endrec = ncvarrecsend(32) |
endrec = ncvarrecsend(32) |
153 |
call cost_precip ( myiter, mytime, |
call cost_forcing_gen ( |
154 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
155 |
|
& xx_precip_file, xx_precip_dummy, wmean_precip, wprecip, |
156 |
|
& num_precip, num_precipm, objf_precip, objf_precipm, maskC, |
157 |
|
& mythid ) |
158 |
#endif |
#endif |
159 |
|
|
160 |
#if (defined (ALLOW_SWFLUX_COST_CONTRIBUTION) && \ |
#if (defined (ALLOW_SWFLUX_COST_CONTRIBUTION) && \ |
162 |
c-- Atmos. temp. contribution to the cost function. |
c-- Atmos. temp. contribution to the cost function. |
163 |
startrec = ncvarrecstart(33) |
startrec = ncvarrecstart(33) |
164 |
endrec = ncvarrecsend(33) |
endrec = ncvarrecsend(33) |
165 |
call cost_swflux ( myiter, mytime, |
call cost_forcing_gen ( |
166 |
& startrec, endrec, mythid ) |
& myiter, mytime, startrec, endrec, |
167 |
|
& xx_swflux_file, xx_swflux_dummy, wmean_swflux, wswflux, |
168 |
|
& num_swflux, num_swfluxm, objf_swflux, objf_swfluxm, maskC, |
169 |
|
& mythid ) |
170 |
#endif |
#endif |
171 |
|
|
172 |
end |
end |