--- MITgcm/pkg/cost/cost_final.F 2003/10/02 21:34:45 1.6 +++ MITgcm/pkg/cost/cost_final.F 2004/02/23 19:15:37 1.9 @@ -1,8 +1,8 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/cost/cost_final.F,v 1.6 2003/10/02 21:34:45 heimbach Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/cost/cost_final.F,v 1.9 2004/02/23 19:15:37 heimbach Exp $ +#include "PACKAGES_CONFIG.h" #include "COST_CPPOPTIONS.h" - subroutine cost_final( mythid ) c ================================================================== @@ -12,11 +12,8 @@ c o Sum of all cost function contributions. c c started: Christian Eckert eckert@mit.edu 30-Jun-1999 -c c changed: Christian Eckert eckert@mit.edu 25-Feb-2000 -c -c - Restructured the code in order to create a package -c for the MITgcmUV. +c heimbach@mit.edu 05-Nov-2003 Modularize cost package c c ================================================================== c SUBROUTINE cost_final @@ -52,23 +49,25 @@ itlo = mybxlo(mythid) ithi = mybxhi(mythid) -#if (defined (ALLOW_COST_VECTOR)) +#if (defined (ALLOW_ECCO)) + CALL ECCO_COST_FINAL (myThid) +#elif (defined (ALLOW_COST_VECTOR)) CALL COST_VECTOR (myThid) #elif (defined (ALLOW_COST_STATE_FINAL)) - CALL COST_STATE_FINAL (myThid) -#else /* ALLOW_COST_VECTOR undef */ +#endif /* above stuff undef */ -#ifdef ALLOW_COST_TEST - CALL COST_TEST (myThid) -#endif +#ifndef ALLOW_ECCO -#ifdef ALLOW_COST_ATLANTIC_HEAT +# ifdef ALLOW_COST_TEST + CALL COST_TEST (myThid) +# endif +# ifdef ALLOW_COST_ATLANTIC_HEAT CALL COST_ATLANTIC_HEAT (myThid) -#endif +# endif c-- Sum up all contributions. do bj = jtlo,jthi @@ -76,7 +75,7 @@ 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) + print*,' --> objf_atl(bi,bj) =',objf_atl(bi,bj) fc = fc & + mult_test * objf_test(bi,bj) @@ -90,13 +89,15 @@ c-- Do global summation. _GLOBAL_SUM_R8( fc , myThid ) -#endif /* ALLOW_COST_VECTOR */ - print*,' global fc = ', fc +#endif /* ALLOW_ECCO */ + c-- set averaging freq. to zero to avoid re-write of c-- averaged fields in reverse checkpointing loops - taveFreq = 0. + taveFreq = 0. + dumpFreq = 0. + pChkptFreq = 0. #endif /* ALLOW_COST */