42 |
integer totnum |
integer totnum |
43 |
|
|
44 |
_RL f_ice |
_RL f_ice |
45 |
|
_RL f_smrarea |
46 |
|
|
47 |
_RL no_ice |
_RL no_ice |
48 |
|
_RL no_smrarea |
49 |
|
|
50 |
character*20 cfname |
character*20 cfname |
51 |
#ifdef ECCO_VERBOSE |
#ifdef ECCO_VERBOSE |
61 |
|
|
62 |
ifc = 30 |
ifc = 30 |
63 |
|
|
64 |
f_ice = 0. _d 0 |
f_ice = 0. _d 0 |
65 |
no_ice = 0. _d 0 |
f_smrarea = 0. _d 0 |
66 |
|
c |
67 |
|
no_ice = 0. _d 0 |
68 |
|
no_smrarea = 0. _d 0 |
69 |
|
|
70 |
c-- Sum up all contributions. |
c-- Sum up all contributions. |
71 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
73 |
|
|
74 |
fc = fc |
fc = fc |
75 |
& + mult_ice * objf_ice(bi,bj) |
& + mult_ice * objf_ice(bi,bj) |
76 |
|
& + mult_smrarea * objf_smrarea(bi,bj) |
77 |
|
|
78 |
f_ice = f_ice + objf_ice(bi,bj) |
f_ice = f_ice + objf_ice(bi,bj) |
79 |
|
f_smrarea = f_smrarea + objf_smrarea(bi,bj) |
80 |
|
|
81 |
no_ice = no_ice + num_ice(bi,bj) |
no_ice = no_ice + num_ice(bi,bj) |
82 |
|
no_smrarea = no_smrarea + num_smrarea(bi,bj) |
83 |
|
|
84 |
enddo |
enddo |
85 |
enddo |
enddo |
90 |
c-- Do global summation for each part of the cost function |
c-- Do global summation for each part of the cost function |
91 |
|
|
92 |
_GLOBAL_SUM_R8( f_ice , myThid ) |
_GLOBAL_SUM_R8( f_ice , myThid ) |
93 |
|
_GLOBAL_SUM_R8( f_smrarea , myThid ) |
94 |
|
|
95 |
_GLOBAL_SUM_R8( no_ice , myThid ) |
_GLOBAL_SUM_R8( no_ice , myThid ) |
96 |
|
_GLOBAL_SUM_R8( no_smrarea , myThid ) |
97 |
|
|
98 |
write(standardmessageunit,'(A,D22.15)') |
write(standardmessageunit,'(A,D22.15)') |
99 |
& ' --> f_ice =',f_ice |
& ' --> f_ice =',f_ice |
100 |
|
write(standardmessageunit,'(A,D22.15)') |
101 |
|
& ' --> f_smrarea =',f_smrarea |
102 |
|
|
103 |
c-- Each process has calculated the global part for itself. |
c-- Each process has calculated the global part for itself. |
104 |
_BEGIN_MASTER( mythid ) |
_BEGIN_MASTER( mythid ) |
108 |
|
|
109 |
write(ifc,*) 'fc =', fc |
write(ifc,*) 'fc =', fc |
110 |
write(ifc,*) 'f_ice =', f_ice, no_ice |
write(ifc,*) 'f_ice =', f_ice, no_ice |
111 |
|
write(ifc,*) 'f_smrarea =', f_smrarea, no_smrarea |
112 |
|
|
113 |
close(ifc) |
close(ifc) |
114 |
|
|