1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "PACKAGES_CONFIG.h" |
#include "PACKAGES_CONFIG.h" |
5 |
#include "COST_CPPOPTIONS.h" |
#include "COST_CPPOPTIONS.h" |
29 |
#include "PARAMS.h" |
#include "PARAMS.h" |
30 |
|
|
31 |
#include "cost.h" |
#include "cost.h" |
32 |
#include "ctrl.h" |
#ifdef ALLOW_CTRL |
33 |
|
# include "ctrl.h" |
34 |
|
#endif |
35 |
|
|
36 |
c == routine arguments == |
c == routine arguments == |
37 |
|
|
52 |
itlo = mybxlo(mythid) |
itlo = mybxlo(mythid) |
53 |
ithi = mybxhi(mythid) |
ithi = mybxhi(mythid) |
54 |
|
|
55 |
|
#ifdef ALLOW_SEAICE |
56 |
|
CALL SEAICE_COST_FINAL (myThid) |
57 |
|
#endif |
58 |
|
|
59 |
#if (defined (ALLOW_ECCO)) |
#if (defined (ALLOW_ECCO)) |
60 |
CALL ECCO_COST_FINAL (myThid) |
CALL ECCO_COST_FINAL (myThid) |
61 |
|
|
75 |
# ifdef ALLOW_COST_ATLANTIC_HEAT |
# ifdef ALLOW_COST_ATLANTIC_HEAT |
76 |
CALL COST_ATLANTIC_HEAT (myThid) |
CALL COST_ATLANTIC_HEAT (myThid) |
77 |
# endif |
# endif |
78 |
|
#ifdef ALLOW_COST_HFLUXM |
79 |
|
CALL COST_HFLUX (myThid) |
80 |
|
#endif |
81 |
|
#ifdef ALLOW_COST_TEMP |
82 |
|
CALL COST_TEMP (myThid) |
83 |
|
#endif |
84 |
|
|
85 |
c-- Sum up all contributions. |
c-- Sum up all contributions. |
86 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
87 |
do bi = itlo,ithi |
do bi = itlo,ithi |
88 |
|
|
89 |
print*,' --> objf_test(bi,bj) =',objf_test(bi,bj) |
write(standardmessageunit,'(A,D22.15)') |
90 |
print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj) |
& ' --> objf_test(bi,bj) = ', objf_test(bi,bj) |
91 |
print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj) |
write(standardmessageunit,'(A,D22.15)') |
92 |
|
& ' --> objf_tracer(bi,bj) = ', objf_tracer(bi,bj) |
93 |
|
write(standardmessageunit,'(A,D22.15)') |
94 |
|
& ' --> objf_atl(bi,bj) = ', objf_atl(bi,bj) |
95 |
|
#ifdef ALLOW_COST_TEMP |
96 |
|
write(standardmessageunit,'(A,D22.15)') |
97 |
|
& ' --> objf_temp_tut(bi,bj) = ', objf_temp_tut(bi,bj) |
98 |
|
#endif |
99 |
|
#ifdef ALLOW_COST_HFLUXM |
100 |
|
write(standardmessageunit,'(A,D22.15)') |
101 |
|
& ' --> objf_hflux_tut(bi,bj) = ', objf_hflux_tut(bi,bj) |
102 |
|
#endif |
103 |
|
#ifdef ALLOW_COST_TRANSPORT |
104 |
|
write(standardmessageunit,'(A,D22.15)') |
105 |
|
& ' --> objf_transport(bi,bj) = ', objf_transport(bi,bj) |
106 |
|
#endif |
107 |
|
|
108 |
fc = fc |
fc = fc |
109 |
& + mult_test * objf_test(bi,bj) |
& + mult_test * objf_test(bi,bj) |
110 |
& + mult_tracer * objf_tracer(bi,bj) |
& + mult_tracer * objf_tracer(bi,bj) |
111 |
& + mult_atl * objf_atl(bi,bj) |
& + mult_atl * objf_atl(bi,bj) |
112 |
|
#ifdef ALLOW_COST_TRANSPORT |
113 |
|
& + mult_transport * objf_transport(bi,bj) |
114 |
|
#endif |
115 |
|
#ifdef ALLOW_COST_TEMP |
116 |
|
& + mult_temp_tut * objf_temp_tut(bi,bj) |
117 |
|
#endif |
118 |
|
#ifdef ALLOW_COST_HFLUXM |
119 |
|
& + mult_hflux_tut * objf_hflux_tut(bi,bj) |
120 |
|
#endif |
121 |
enddo |
enddo |
122 |
enddo |
enddo |
123 |
|
|
124 |
print*,' local fc = ', fc |
write(standardmessageunit,'(A,D22.15)') ' local fc = ', fc |
125 |
|
|
126 |
c-- Do global summation. |
c-- Do global summation. |
127 |
_GLOBAL_SUM_R8( fc , myThid ) |
_GLOBAL_SUM_R8( fc , myThid ) |
128 |
|
|
129 |
print*,' global fc = ', fc |
write(standardmessageunit,'(A,D22.15)') ' global fc = ', fc |
130 |
|
|
131 |
#endif /* ALLOW_ECCO */ |
#endif /* ALLOW_ECCO */ |
132 |
|
|