1 |
C $Header: /u/gcmpack/MITgcm/pkg/cost/Attic/cost_final_store.F,v 1.1.2.1 2003/03/04 21:04:38 heimbach Exp $ |
2 |
|
3 |
#include "COST_CPPOPTIONS.h" |
4 |
|
5 |
|
6 |
subroutine cost_final_store ( mythid, lastdiva ) |
7 |
|
8 |
c ================================================================== |
9 |
c SUBROUTINE cost_final_store |
10 |
c ================================================================== |
11 |
c |
12 |
c Store cost function value |
13 |
c This is required in conjunction with DIVA |
14 |
c heimbach@mit.edu 5-Mar-2003 |
15 |
c |
16 |
c ================================================================== |
17 |
c SUBROUTINE cost_final_store |
18 |
c ================================================================== |
19 |
|
20 |
implicit none |
21 |
|
22 |
c == global variables == |
23 |
|
24 |
#include "EEPARAMS.h" |
25 |
#include "SIZE.h" |
26 |
|
27 |
#include "cost.h" |
28 |
|
29 |
c == routine arguments == |
30 |
|
31 |
integer mythid |
32 |
logical lastdiva |
33 |
|
34 |
# ifdef ALLOW_DIVIDED_ADJOINT |
35 |
|
36 |
c == local variables == |
37 |
|
38 |
c == end of interface == |
39 |
|
40 |
c-- Each process has calculated the global part for itself. |
41 |
lastdiva = .FALSE. |
42 |
|
43 |
IF (myProcId .eq. 0) THEN |
44 |
_BEGIN_MASTER( mythid ) |
45 |
open(unit=76,file='costfinal') |
46 |
write(76,*) fc |
47 |
close(76) |
48 |
_END_MASTER( mythid ) |
49 |
ENDIF |
50 |
_BARRIER |
51 |
|
52 |
#endif |
53 |
|
54 |
end |