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