/[MITgcm]/MITgcm/pkg/grdchk/grdchk_main.F
ViewVC logotype

Diff of /MITgcm/pkg/grdchk/grdchk_main.F

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

revision 1.20 by heimbach, Sat Mar 24 02:25:29 2007 UTC revision 1.21 by heimbach, Fri Apr 20 19:26:43 2007 UTC
# Line 81  c     == global variables == Line 81  c     == global variables ==
81  #include "PARAMS.h"  #include "PARAMS.h"
82  #include "grdchk.h"  #include "grdchk.h"
83  #include "cost.h"  #include "cost.h"
84    #include "ctrl.h"
85  #ifdef ALLOW_TANGENTLINEAR_RUN  #ifdef ALLOW_TANGENTLINEAR_RUN
86  #include "g_cost.h"  #include "g_cost.h"
87  #endif  #endif
# Line 156  cph   and so has unperturbed cost functi Line 157  cph   and so has unperturbed cost functi
157  cph   assuming all xx_ fields are initialised to zero.  cph   assuming all xx_ fields are initialised to zero.
158    
159        ierr_grdchk = 0        ierr_grdchk = 0
160  cphadmtlm(  #ifdef ALLOW_ADMTLM
161          fcref = objf_state_final(idep,jdep,1,1,1)
162    #else
163        fcref = fc        fcref = fc
164  cphadmtlm      fcref = objf_state_final(45,4,1,1,1)  #endif
 cphadmtlm)  
165    
166        print *, 'ph-check fcref = ', fcref        print *, 'ph-check fcref = ', fcref
167    
# Line 263  c-- Line 265  c--
265  c--   2. perform tangent linear run  c--   2. perform tangent linear run
266              mytime = starttime              mytime = starttime
267              myiter = niter0              myiter = niter0
268  cphadmtlm(  #ifdef ALLOW_ADMTLM
269                do k=1,4*Nr+1
270                 do j=1,sny
271                  do i=1,snx
272                   g_objf_state_final(i,j,1,1,k) = 0.
273                  enddo
274                 enddo
275                enddo
276    #else
277              g_fc = 0.              g_fc = 0.
278  cphadmtlm            do j=1,sny  #endif
279  cphadmtlm               do i=1,snx  
 cphadmtlm                  g_objf_state_final(i,j,1,1,1) = 0.  
 cphadmtlm                  g_objf_state_final(i,j,1,1,2) = 0.  
 cphadmtlm               enddo  
 cphadmtlm            enddo  
 cphadmtlm)  
280              call g_the_main_loop( mytime, myiter, mythid )              call g_the_main_loop( mytime, myiter, mythid )
 cphadmtlm(  
             ftlxxmemo = g_fc  
 cphadmtlm            ftlxxmemo = g_objf_state_final(45,4,1,1,1)  
 cphadmtlm)  
281              _BARRIER              _BARRIER
282    #ifdef ALLOW_ADMTLM
283                ftlxxmemo = g_objf_state_final(idep,jdep,1,1,1)
284    #else
285                ftlxxmemo = g_fc
286    #endif
287    
288  c--  c--
289  c--   3. reset control vector  c--   3. reset control vector
290              if ( myProcId .EQ. grdchkwhichproc .AND.              if ( myProcId .EQ. grdchkwhichproc .AND.
# Line 314  c--   forward run with perturbed control Line 321  c--   forward run with perturbed control
321              mytime = starttime              mytime = starttime
322              myiter = niter0              myiter = niter0
323              call the_main_loop( mytime, myiter, mythid )              call the_main_loop( mytime, myiter, mythid )
324  cphadmtlm(  #ifdef ALLOW_ADMTLM
325                fcpertplus = objf_state_final(idep,jdep,1,1,1)
326    #else
327              fcpertplus = fc              fcpertplus = fc
328  cphadmtlm            fcpertplus = objf_state_final(45,4,1,1,1)  #endif
 cphadmtlm)  
329              print *, 'ph-check fcpertplus = ', fcpertplus              print *, 'ph-check fcpertplus = ', fcpertplus
330              _BARRIER              _BARRIER
331                                        
# Line 355  c--   forward run with perturbed control Line 363  c--   forward run with perturbed control
363                 myiter = niter0                 myiter = niter0
364                 call the_main_loop( mytime, myiter, mythid )                 call the_main_loop( mytime, myiter, mythid )
365                 _BARRIER                 _BARRIER
366    #ifdef ALLOW_ADMTLM
367                   fcpertminus = objf_state_final(idep,jdep,1,1,1)
368    #else
369                 fcpertminus = fc                 fcpertminus = fc
370    #endif
371                                        
372  c--   Reset control vector.  c--   Reset control vector.
373                 if ( myProcId .EQ. grdchkwhichproc .AND.                 if ( myProcId .EQ. grdchkwhichproc .AND.

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.22