--- MITgcm/pkg/cost/cost_final.F 2001/07/13 13:37:45 1.2 +++ MITgcm/pkg/cost/cost_final.F 2002/01/17 17:03:34 1.3 @@ -1,14 +1,12 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/cost/cost_final.F,v 1.2 2001/07/13 13:37:45 heimbach Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/cost/cost_final.F,v 1.3 2002/01/17 17:03:34 heimbach Exp $ #include "COST_CPPOPTIONS.h" - subroutine cost_Final( - I mythid - & ) + subroutine cost_final( mythid ) c ================================================================== -c SUBROUTINE cost_Final +c SUBROUTINE cost_final c ================================================================== c c o Sum of all cost function contributions. @@ -21,7 +19,7 @@ c for the MITgcmUV. c c ================================================================== -c SUBROUTINE cost_Final +c SUBROUTINE cost_final c ================================================================== implicit none @@ -41,6 +39,7 @@ #ifdef ALLOW_COST c == local variables == + integer i,j,k integer bi,bj integer itlo,ithi integer jtlo,jthi @@ -52,20 +51,41 @@ itlo = mybxlo(mythid) ithi = mybxhi(mythid) +#ifdef ALLOW_COST_VECTOR + + CALL COST_VECTOR (myThid) + + do bj = jtlo,jthi + do bi = itlo,ithi + do i = 1,sNx + print*,' --> objf_vector(i,bi,bj) = ', + & objf_vector(i,bi,bj) + end do + end do + end do + +#else /* ALLOW_COST_VECTOR undef */ + #ifdef ALLOW_COST_TEST CALL COST_TEST (myThid) #endif +#ifdef ALLOW_COST_ATLANTIC_HEAT + CALL COST_ATLANTIC_HEAT (myThid) +#endif + c-- Sum up all contributions. do bj = jtlo,jthi do bi = itlo,ithi print*,' --> objf_test(bi,bj) =',objf_test(bi,bj) print*,' --> objf_tracer(bi,bj) =',objf_tracer(bi,bj) + print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj) fc = fc & + mult_test * objf_test(bi,bj) & + mult_tracer * objf_tracer(bi,bj) + & + mult_atl * objf_atl(bi,bj) enddo enddo @@ -74,6 +94,8 @@ c-- Do global summation. _GLOBAL_SUM_R8( fc , myThid ) +#endif /* ALLOW_COST_VECTOR */ + #endif /* ALLOW_COST */ return