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

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

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


Revision 1.4 - (hide annotations) (download)
Mon Oct 8 23:59:21 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62a, checkpoint62e, checkpoint62d, checkpoint60, checkpoint61, checkpoint62, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint59j, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.3: +3 -2 lines
add missing cvs $Header:$ or $Name:$

1 jmc 1.4 C $Header: $
2     C $Name: $
3 heimbach 1.2
4     #include "COST_CPPOPTIONS.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     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 jmc 1.4 read(76,*) fc
60 heimbach 1.2 close(76)
61 heimbach 1.3 else
62     lastdiva = .FALSE.
63 heimbach 1.2 endif
64     c
65     _END_MASTER( mythid )
66     ENDIF
67     _BARRIER
68    
69     #endif
70    
71     end

  ViewVC Help
Powered by ViewVC 1.1.22