forked from altMITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ad_taf_output.f.diva.diff_del1
73 lines (69 loc) · 2.3 KB
/
ad_taf_output.f.diva.diff_del1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
*** ad_taf_output.f 2005-09-29 15:17:45.000000000 -0400
--- ad_taf_output.fmod 2005-09-29 15:40:24.000000000 -0400
***************
*** 78470,78492 ****
close(unit=76)
else
idivbeg = nchklev_3
! idivend = nchklev_3+(-1)
endif
endif
call mpi_bcast( idivbeg,1,mpi_integer,0,mpi_comm_world,iers )
call mpi_bcast( idivend,1,mpi_integer,0,mpi_comm_world,iers )
C----------------------------------------------
- C write divided adjoint control file
- C----------------------------------------------
- if (iproc .eq. 0) then
- open(unit=76,file='divided.ctrl',form='formatted')
- idivaux = 2*idivend-idivbeg
- write(unit=76,fmt=*) idivend,idivaux
- close(unit=76)
- endif
-
- C----------------------------------------------
C OPEN TAPE onetape
C----------------------------------------------
call adopen ( mythid,
--- 78470,78482 ----
close(unit=76)
else
idivbeg = nchklev_3
! idivend = MAX(nchklev_3-1,0)
endif
endif
call mpi_bcast( idivbeg,1,mpi_integer,0,mpi_comm_world,iers )
call mpi_bcast( idivend,1,mpi_integer,0,mpi_comm_world,iers )
C----------------------------------------------
C OPEN TAPE onetape
C----------------------------------------------
call adopen ( mythid,
***************
*** 82624,82632 ****
--- 82614,82642 ----
$1368 )
endif
+
+ C----------------------------------------------
+ C update divided adjoint control file
+ C----------------------------------------------
+ if (iproc .eq. 0) then
+ open(unit=76,file='divided.ctrl',form='formatted')
+ write(unit=76,fmt=*) ilev_3-1,idivend
+ close(unit=76)
+ endif
+
end do
C----------------------------------------------
+ C write divaided adjoint control file
+ C----------------------------------------------
+ if (iproc .eq. 0) then
+ open(unit=76,file='divided.ctrl',form='formatted')
+ idivaux = MAX(2*idivend-idivbeg,0)
+ write(unit=76,fmt=*) idivend,idivaux
+ close(unit=76)
+ endif
+
+ C----------------------------------------------
C write snapshot
C----------------------------------------------
if (idivend .ge. 1) then