1 |
C $Header$ |
C $Header$ |
2 |
|
C $Name$ |
3 |
|
|
4 |
#include "COST_CPPOPTIONS.h" |
#include "COST_CPPOPTIONS.h" |
5 |
|
|
6 |
subroutine cost_averagesgeneric( |
subroutine cost_averagesgeneric( |
7 |
& localbarfile, |
& localbarfile, |
8 |
& localbar, localfld, xx_localbar_mean_dummy, |
& localbar, localfld, xx_localbar_mean_dummy, |
9 |
& first, last, startofloc, endofloc, inloc, |
& first, last, startofloc, endofloc, inloc, |
10 |
& sum1loc, locrec, nnz, mythid ) |
& sum1loc, locrec, nnz, mythid ) |
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
#include "SIZE.h" |
#include "SIZE.h" |
28 |
#include "PARAMS.h" |
#include "PARAMS.h" |
|
#include "SEAICE.h" |
|
29 |
|
|
30 |
#ifdef ALLOW_COST |
#ifdef ALLOW_COST |
31 |
# include "optim.h" |
# include "optim.h" |
102 |
do k = 1,nnz |
do k = 1,nnz |
103 |
do j = jmin,jmax |
do j = jmin,jmax |
104 |
do i = imin,imax |
do i = imin,imax |
105 |
localbar(i,j,k,bi,bj) = |
localbar(i,j,k,bi,bj) = |
106 |
& (localbar(i,j,k,bi,bj) |
& (localbar(i,j,k,bi,bj) |
107 |
& +localfld(i,j,k,bi,bj))/ |
& +localfld(i,j,k,bi,bj))/ |
108 |
& float(sum1loc) |
& float(sum1loc) |
109 |
enddo |
enddo |
114 |
c-- Save ...bar on file. |
c-- Save ...bar on file. |
115 |
write(fname(1:128),'(80a)') ' ' |
write(fname(1:128),'(80a)') ' ' |
116 |
il=ilnblnk( localbarfile ) |
il=ilnblnk( localbarfile ) |
117 |
write(fname,'(2a,i10.10)') |
write(fname,'(2a,i10.10)') |
118 |
& localbarfile(1:il), '.', optimcycle |
& localbarfile(1:il), '.', optimcycle |
119 |
if ( nnz .EQ. 1 ) then |
if ( nnz .EQ. 1 ) then |
120 |
call active_write_xy( fname, localbar, locrec, optimcycle, |
call active_write_xy( fname, localbar, locrec, optimcycle, |
132 |
do j = jmin,jmax |
do j = jmin,jmax |
133 |
do k = 1,nnz |
do k = 1,nnz |
134 |
do i = imin,imax |
do i = imin,imax |
135 |
localbar(i,j,k,bi,bj) = |
localbar(i,j,k,bi,bj) = |
136 |
& localbar(i,j,k,bi,bj) + localfld(i,j,k,bi,bj) |
& localbar(i,j,k,bi,bj) + localfld(i,j,k,bi,bj) |
137 |
enddo |
enddo |
138 |
enddo |
enddo |