/[MITgcm]/MITgcm/verification/OpenAD/code_ad_openad/the_fourth_level_loop.F
ViewVC logotype

Contents of /MITgcm/verification/OpenAD/code_ad_openad/the_fourth_level_loop.F

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


Revision 1.2 - (show annotations) (download)
Wed Dec 29 21:10:51 2010 UTC (13 years, 4 months ago) by utke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
cleanup

1 C $Header: /u/gcmpack/MITgcm/verification/OpenAD/code_ad_openad/the_fourth_level_loop.F,v 1.1 2006/07/13 19:39:05 heimbach Exp $
2 C $Name: $
3
4 #include "PACKAGES_CONFIG.h"
5 #include "CPP_OPTIONS.h"
6 #ifdef ALLOW_OBCS
7 # include "OBCS_OPTIONS.h"
8 #endif
9 #ifdef ALLOW_SEAICE
10 # include "SEAICE_OPTIONS.h"
11 #endif
12 #ifdef ALLOW_GMREDI
13 # include "GMREDI_OPTIONS.h"
14 #endif
15
16 C start with a copy of THE_MAIN_LOOP
17 C and remove some the obvious extras
18 SUBROUTINE THE_FOURTH_LEVEL_LOOP(ilev_4,
19 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
20 +myTime, myIter,myThid )
21 IMPLICIT NONE
22
23 C == Global variables ==
24 #include "SIZE.h"
25 #include "EEPARAMS.h"
26 #include "PARAMS.h"
27
28 c**************************************
29 #ifdef ALLOW_AUTODIFF_TAMC
30
31 c These includes are needed for
32 c AD-checkpointing.
33 c They provide the fields to be stored.
34
35 # include "GRID.h"
36 # include "DYNVARS.h"
37 # include "FFIELDS.h"
38 # include "EOS.h"
39 # include "GAD.h"
40 # ifdef ALLOW_CD_CODE
41 # include "CD_CODE_VARS.h"
42 # endif
43 # ifdef ALLOW_PTRACERS
44 # include "PTRACERS_SIZE.h"
45 # include "PTRACERS.h"
46 # endif
47 # ifdef EXACT_CONSERV
48 # include "SURFACE.h"
49 # endif
50 # ifdef ALLOW_OBCS
51 # include "OBCS.h"
52 # endif
53 # ifdef ALLOW_EXF
54 # include "exf_fields.h"
55 # include "exf_clim_fields.h"
56 # ifdef ALLOW_BULKFORMULAE
57 # include "exf_constants.h"
58 # endif
59 # endif /* ALLOW_EXF */
60 # ifdef ALLOW_SEAICE
61 # include "SEAICE.h"
62 # endif
63 # ifdef ALLOW_EBM
64 # include "EBM.h"
65 # endif
66 # ifdef ALLOW_DIVIDED_ADJOINT_MPI
67 # include "mpif.h"
68 # endif
69
70 # include "tamc.h"
71 # include "ctrl.h"
72 # include "ctrl_dummy.h"
73 # include "cost.h"
74
75 #endif /* ALLOW_AUTODIFF_TAMC */
76
77 integer ilev_4
78 integer uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4
79 INTEGER myThid
80 INTEGER myIter
81 _RL myTime
82
83 C !LOCAL VARIABLES:
84 C == Local variables ==
85 integer ilev_3
86
87 #ifdef ALLOW_DEBUG
88 IF (debugMode) CALL DEBUG_ENTER('THE_FOURTH_LEVEL_LOOP',myThid)
89 #endif
90 print *, 'JU: THE_FOURTH_LEVEL_LOOP(',ilev_4,')'
91 if (uCheckLev3 .gt. 0 ) then
92 do ilev_3 = 0,uCheckLev3-1
93 #ifdef ALLOW_DEBUG
94 IF (debugMode) CALL DEBUG_CALL('THE_THIRD_LEVEL_LOOP',myThid)
95 #endif
96 CALL THE_THIRD_LEVEL_LOOP( ilev_4, iLev_3,
97 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
98 +mytime, myiter, mythid )
99 enddo
100 else
101 #ifdef ALLOW_DEBUG
102 IF (debugMode) CALL DEBUG_CALL('THE_THIRD_LEVEL_PLAIN',myThid)
103 #endif
104 CALL THE_THIRD_LEVEL_PLAIN( ilev_4,
105 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
106 +mytime, myiter, mythid )
107 end if
108 #ifdef ALLOW_DEBUG
109 IF (debugMode) CALL DEBUG_LEAVE('THE_FOURTH_LEVEL_LOOP',myThid)
110 #endif
111
112 END
113
114 SUBROUTINE THE_FOURTH_LEVEL_PLAIN(
115 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
116 +myTime, myIter,myThid )
117 IMPLICIT NONE
118
119 C == Global variables ==
120 #include "SIZE.h"
121 #include "EEPARAMS.h"
122 #include "PARAMS.h"
123
124 c**************************************
125 #ifdef ALLOW_AUTODIFF_TAMC
126
127 c These includes are needed for
128 c AD-checkpointing.
129 c They provide the fields to be stored.
130
131 # include "GRID.h"
132 # include "DYNVARS.h"
133 # include "FFIELDS.h"
134 # include "EOS.h"
135 # include "GAD.h"
136 # ifdef ALLOW_CD_CODE
137 # include "CD_CODE_VARS.h"
138 # endif
139 # ifdef ALLOW_PTRACERS
140 # include "PTRACERS_SIZE.h"
141 # include "PTRACERS.h"
142 # endif
143 # ifdef EXACT_CONSERV
144 # include "SURFACE.h"
145 # endif
146 # ifdef ALLOW_OBCS
147 # include "OBCS.h"
148 # endif
149 # ifdef ALLOW_EXF
150 # include "exf_fields.h"
151 # include "exf_clim_fields.h"
152 # ifdef ALLOW_BULKFORMULAE
153 # include "exf_constants.h"
154 # endif
155 # endif /* ALLOW_EXF */
156 # ifdef ALLOW_SEAICE
157 # include "SEAICE.h"
158 # endif
159 # ifdef ALLOW_EBM
160 # include "EBM.h"
161 # endif
162 # ifdef ALLOW_DIVIDED_ADJOINT_MPI
163 # include "mpif.h"
164 # endif
165
166 # include "tamc.h"
167 # include "ctrl.h"
168 # include "ctrl_dummy.h"
169 # include "cost.h"
170
171 #endif /* ALLOW_AUTODIFF_TAMC */
172
173 integer uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4
174 INTEGER myThid
175 INTEGER myIter
176 _RL myTime
177
178 C !LOCAL VARIABLES:
179 C == Local variables ==
180 integer ilev_3
181
182 #ifdef ALLOW_DEBUG
183 IF (debugMode) CALL DEBUG_ENTER('THE_FOURTH_LEVEL_PLAIN',myThid)
184 #endif
185 print *, 'JU: THE_FOURTH_LEVEL_PLAIN()'
186 if (uCheckLev3 .gt. 0 ) then
187 do ilev_3 = 0,uCheckLev3-1
188 #ifdef ALLOW_DEBUG
189 IF (debugMode) CALL DEBUG_CALL('THE_THIRD_LEVEL_LOOP',myThid)
190 #endif
191 CALL THE_THIRD_LEVEL_LOOP( 0, iLev_3,
192 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
193 +mytime, myiter, mythid )
194 enddo
195 else
196 #ifdef ALLOW_DEBUG
197 IF (debugMode) CALL DEBUG_CALL('THE_THIRD_LEVEL_PLAIN',myThid)
198 #endif
199 CALL THE_THIRD_LEVEL_PLAIN( 0,
200 +uCheckLev1, uCheckLev2, uCheckLev3,uCheckLev4,
201 +mytime, myiter, mythid )
202 end if
203 #ifdef ALLOW_DEBUG
204 IF (debugMode) CALL DEBUG_LEAVE('THE_FOURTH_LEVEL_LOOP',myThid)
205 #endif
206
207 END

  ViewVC Help
Powered by ViewVC 1.1.22