C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/cost/cost_final_store.F,v 1.2 2003/03/05 23:39:53 heimbach Exp $ #include "COST_CPPOPTIONS.h" subroutine cost_final_store ( mythid, lastdiva ) c ================================================================== c SUBROUTINE cost_final_store c ================================================================== c c Store cost function value c This is required in conjunction with DIVA c heimbach@mit.edu 5-Mar-2003 c c ================================================================== c SUBROUTINE cost_final_store c ================================================================== implicit none c == global variables == #include "EEPARAMS.h" #include "SIZE.h" #include "cost.h" c == routine arguments == integer mythid logical lastdiva # ifdef ALLOW_DIVIDED_ADJOINT c == local variables == c == end of interface == c-- Each process has calculated the global part for itself. lastdiva = .FALSE. IF (myProcId .eq. 0) THEN _BEGIN_MASTER( mythid ) open(unit=76,file='costfinal') write(76,*) fc close(76) _END_MASTER( mythid ) ENDIF _BARRIER #endif end