/[MITgcm]/MITgcm/model/src/the_model_main.F
ViewVC logotype

Diff of /MITgcm/model/src/the_model_main.F

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

revision 1.44 by heimbach, Thu Jan 17 16:55:25 2002 UTC revision 1.47 by mlosch, Wed Sep 25 19:36:50 2002 UTC
# Line 142  C    | | | |-INI_VEL    :: Initialize 3D Line 142  C    | | | |-INI_VEL    :: Initialize 3D
142  C    | | | |-INI_THETA  :: Set model initial temperature field.  C    | | | |-INI_THETA  :: Set model initial temperature field.
143  C    | | | |-INI_SALT   :: Set model initial salinity field.  C    | | | |-INI_SALT   :: Set model initial salinity field.
144  C    | | | |-INI_PSURF  :: Set model initial free-surface height/pressure.  C    | | | |-INI_PSURF  :: Set model initial free-surface height/pressure.
145    C    | | | |-INI_PRESSURE :: Compute model initial hydrostatic pressure
146  C    | | |  C    | | |
147  C    | | |-INI_TR1      :: Set initial tracer 1 distribution.  C    | | |-INI_TR1      :: Set initial tracer 1 distribution.
148  C    | | |  C    | | |
# Line 224  C/\  | | |-THERMODYNAMICS :: theta, salt Line 225  C/\  | | |-THERMODYNAMICS :: theta, salt
225  C/\  | | | |  C/\  | | | |
226  C/\  | | | |-INTEGRATE_FOR_W :: Integrate for vertical velocity.  C/\  | | | |-INTEGRATE_FOR_W :: Integrate for vertical velocity.
227  C/\  | | | |-OBCS_APPLY_W    :: Open bndy. package ( see pkg/obcs ).  C/\  | | | |-OBCS_APPLY_W    :: Open bndy. package ( see pkg/obcs ).
228  C/\  | | | |-FIND_RHO        :: Calculates [rho(S,T,z)-Rhonil] of a slice  C/\  | | | |-FIND_RHO        :: Calculates [rho(S,T,z)-RhoConst] of a slice
229  C/\  | | | |-GRAD_SIGMA      :: Calculate isoneutral gradients  C/\  | | | |-GRAD_SIGMA      :: Calculate isoneutral gradients
230  C/\  | | | |-CALC_IVDC       :: Set Implicit Vertical Diffusivity for Convection  C/\  | | | |-CALC_IVDC       :: Set Implicit Vertical Diffusivity for Convection
231  C/\  | | | |  C/\  | | | |
# Line 460  C     myCurrentIter - Iteration counter Line 461  C     myCurrentIter - Iteration counter
461  CEOP  CEOP
462    
463  C--   This timer encompasses the whole code  C--   This timer encompasses the whole code
464        CALL TIMER_START('ALL                [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('ALL                    [THE_MODEL_MAIN]',myThid)
465    
466  C--   Set model configuration (fixed arrays)  C--   Set model configuration (fixed arrays)
467        CALL TIMER_START('INITIALISE_FIXED   [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('INITIALISE_FIXED       [THE_MODEL_MAIN]',myThid)
468        CALL INITIALISE_FIXED( myThid )        CALL INITIALISE_FIXED( myThid )
469        CALL TIMER_STOP ('INITIALISE_FIXED   [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('INITIALISE_FIXED       [THE_MODEL_MAIN]',myThid)
470    
471        myCurrentTime = startTime        myCurrentTime = startTime
472        myCurrentIter = nIter0        myCurrentIter = nIter0
473    
474  #if ( defined (ALLOW_ADJOINT_RUN) || \  #if ( defined (ALLOW_ADJOINT_RUN) || \
475          defined (ALLOW_TANGENTLINEAR_RUN) || \
476        defined (ALLOW_GRADIENT_CHECK) || \        defined (ALLOW_GRADIENT_CHECK) || \
477        defined (ALLOW_ECCO_OPTIMIZATION) )        defined (ALLOW_ECCO_OPTIMIZATION) )
478    
479        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
480        IF (myProcId .eq. 0) THEN        IF (myProcId .eq. 0) THEN
481             CALL TIMER_START('CTRL_UNPACK         [THE_MODEL_MAIN]',mythid)
482           CALL CTRL_UNPACK( mycurrentiter, mycurrenttime, mythid )           CALL CTRL_UNPACK( mycurrentiter, mycurrenttime, mythid )
483             CALL TIMER_STOP ('CTRL_UNPACK         [THE_MODEL_MAIN]',mythid)
484        ENDIF        ENDIF
485        _END_MASTER( mythid )        _END_MASTER( mythid )
486        _BARRIER        _BARRIER
# Line 484  C--   Set model configuration (fixed arr Line 488  C--   Set model configuration (fixed arr
488        CALL COST_DEPENDENT_INIT ( mythid )        CALL COST_DEPENDENT_INIT ( mythid )
489        _BARRIER        _BARRIER
490    
491        CALL TIMER_START('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)  #if ( defined (ALLOW_ADJOINT_RUN) || \
492          defined (ALLOW_ECCO_OPTIMIZATION) )
493          CALL TIMER_START('ADTHE_MAIN_LOOP           [ADJOINT RUN]',mythid)
494        CALL ADTHE_MAIN_LOOP ( mythid )        CALL ADTHE_MAIN_LOOP ( mythid )
495        CALL TIMER_STOP ('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)        CALL TIMER_STOP ('ADTHE_MAIN_LOOP           [ADJOINT RUN]',mythid)
       _BARRIER  
   
       _BEGIN_MASTER( mythid )  
       IF (myProcId .eq. 0) THEN  
          call CTRL_PACK( mycurrentiter, mycurrenttime, mythid )  
       ENDIF  
       _END_MASTER( mythid )  
496        _BARRIER        _BARRIER
   
 #ifdef ALLOW_GRADIENT_CHECK  
       if (useGrdchk) then  
          CALL TIMER_START('GRDCHK_MAIN          [ADJOINT RUN]', mythid)  
          CALL GRDCHK_MAIN( mythid )  
          CALL TIMER_STOP ('GRDCHK_MAIN          [ADJOINT RUN]', mythid)  
          _BARRIER  
       end if  
 #endif  
   
497  #elif (defined (ALLOW_TANGENTLINEAR_RUN))  #elif (defined (ALLOW_TANGENTLINEAR_RUN))
498          CALL TIMER_START('G_THE_MAIN_LOOP           [TANGENT RUN]',mythid)
       _BEGIN_MASTER( mythid )  
       IF (myProcId .eq. 0) THEN  
          CALL CTRL_UNPACK( mycurrentiter, mycurrenttime, mythid )  
       ENDIF  
       _END_MASTER( mythid )  
       _BARRIER  
   
       CALL COST_DEPENDENT_INIT ( mythid )  
       _BARRIER  
   
       CALL TIMER_START('G_THE_MAIN_LOOP          [FTL RUN]', mythid)  
499        CALL G_THE_MAIN_LOOP ( myCurrentTime, myCurrentIter, myThid )        CALL G_THE_MAIN_LOOP ( myCurrentTime, myCurrentIter, myThid )
500        CALL TIMER_STOP ('G_THE_MAIN_LOOP          [FTL RUN]', mythid)        CALL TIMER_STOP ('G_THE_MAIN_LOOP           [TANGENT RUN]',mythid)
501        _BARRIER        _BARRIER
502    #endif
503    
504        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
505        IF (myProcId .eq. 0) THEN        IF (myProcId .eq. 0) THEN
506             CALL TIMER_START('CTLR_PACK           [THE_MODEL_MAIN]',mythid)
507           call CTRL_PACK( mycurrentiter, mycurrenttime, mythid )           call CTRL_PACK( mycurrentiter, mycurrenttime, mythid )
508             CALL TIMER_STOP ('CTLR_PACK           [THE_MODEL_MAIN]',mythid)
509        ENDIF        ENDIF
510        _END_MASTER( mythid )        _END_MASTER( mythid )
511        _BARRIER        _BARRIER
# Line 532  C--   Set model configuration (fixed arr Line 513  C--   Set model configuration (fixed arr
513  #else /* ALLOW_ADJOINT_RUN undef */  #else /* ALLOW_ADJOINT_RUN undef */
514    
515  C--   Call time stepping loop of full model  C--   Call time stepping loop of full model
516        CALL TIMER_START('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('THE_MAIN_LOOP          [THE_MODEL_MAIN]',myThid)
517        CALL THE_MAIN_LOOP( myCurrentTime, myCurrentIter, myThid )        CALL THE_MAIN_LOOP( myCurrentTime, myCurrentIter, myThid )
518        CALL TIMER_STOP ('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('THE_MAIN_LOOP          [THE_MODEL_MAIN]',myThid)
519    
520  #endif /* ALLOW_ADJOINT_RUN */  #endif /* ALLOW_ADJOINT_RUN */
521    
522    #ifdef ALLOW_GRADIENT_CHECK
523          if (useGrdchk) then
524             CALL TIMER_START('GRDCHK_MAIN         [THE_MODEL_MAIN]',mythid)
525             CALL GRDCHK_MAIN( mythid )
526             CALL TIMER_STOP ('GRDCHK_MAIN         [THE_MODEL_MAIN]',mythid)
527             _BARRIER
528          end if
529    #endif
530    
531  C--   Final checkpoint (incase the in-loop checkpoint was missed)  C--   Final checkpoint (incase the in-loop checkpoint was missed)
532        CALL TIMER_START('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('WRITE_CHECKPOINT       [THE_MODEL_MAIN]',myThid)
533        CALL WRITE_CHECKPOINT(        CALL WRITE_CHECKPOINT(
534       &        .TRUE., myCurrentTime, myCurrentIter, myThid )       &        .TRUE., myCurrentTime, myCurrentIter, myThid )
535        CALL TIMER_STOP ('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('WRITE_CHECKPOINT       [THE_MODEL_MAIN]',myThid)
536    
537        CALL TIMER_STOP ('ALL                [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('ALL                    [THE_MODEL_MAIN]',myThid)
538    
539  C--   Write timer statistics  C--   Write timer statistics
540        IF ( myThid .EQ. 1 ) THEN        IF ( myThid .EQ. 1 ) THEN

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.22