/[MITgcm]/MITgcm/pkg/cost/cost_final_restore.F
ViewVC logotype

Contents of /MITgcm/pkg/cost/cost_final_restore.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (show annotations) (download)
Fri Aug 10 19:36:02 2012 UTC (11 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65l, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint63r, checkpoint63s, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f
Changes since 1.5: +2 -2 lines
rename COST_CPPOPTIONS.h to COST_OPTIONS.h

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_final_restore.F,v 1.5 2010/04/26 20:28:37 heimbach Exp $
2 C $Name: $
3
4 #include "COST_OPTIONS.h"
5
6
7 subroutine cost_final_restore ( mythid, lastdiva )
8
9 c ==================================================================
10 c SUBROUTINE cost_final_restore
11 c ==================================================================
12 c
13 c Restore cost function value
14 c This is required in conjunction with DIVA
15 c heimbach@mit.edu 5-Mar-2003
16 c
17 c ==================================================================
18 c SUBROUTINE cost_final_restore
19 c ==================================================================
20
21 implicit none
22
23 c == global variables ==
24
25 #include "EEPARAMS.h"
26 #include "SIZE.h"
27
28 #include "cost.h"
29
30 c == routine arguments ==
31
32 integer mythid
33 logical lastdiva
34
35 # ifdef ALLOW_DIVIDED_ADJOINT
36
37 c == local variables ==
38 logical exst
39
40 integer idivbeg, idivend
41 c == end of interface ==
42
43 c-- Each process has calculated the global part for itself.
44 cph IF (myProcId .eq. 0) THEN
45 _BEGIN_MASTER( mythid )
46 c
47 inquire(file='divided.ctrl',exist=exst)
48 if (exst) then
49 open(unit=76,file='divided.ctrl',form='formatted')
50 read(unit=76,fmt=*) idivbeg,idivend
51 close(unit=76)
52 else
53 idivbeg = -2
54 endif
55 c
56 if ( idivbeg .EQ. 0 ) then
57 lastdiva = .TRUE.
58 open(unit=76,file='costfinal')
59 read(76,*) fc
60 close(76)
61 else
62 lastdiva = .FALSE.
63 endif
64 c
65 _END_MASTER( mythid )
66 cph ENDIF
67 _BARRIER
68
69 #endif
70
71 end

  ViewVC Help
Powered by ViewVC 1.1.22