/[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.43 by adcroft, Fri Sep 28 16:49:54 2001 UTC revision 1.49 by dimitri, Tue Feb 18 05:33:54 2003 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 219  C/\  | | | |                    :: Simpl Line 220  C/\  | | | |                    :: Simpl
220  C/\  | | | |                    :: for forcing datasets.  C/\  | | | |                    :: for forcing datasets.
221  C/\  | | | |                    C/\  | | | |                  
222  C/\  | | | |-EXCH :: Sync forcing. in overlap regions.  C/\  | | | |-EXCH :: Sync forcing. in overlap regions.
223    C/\  | | |-SEAICE_MODEL   :: Compute sea-ice terms. ( pkg/seaice )
224  C/\  | | |  C/\  | | |
225  C/\  | | |-THERMODYNAMICS :: theta, salt + tracer equations driver.  C/\  | | |-THERMODYNAMICS :: theta, salt + tracer equations driver.
226  C/\  | | | |  C/\  | | | |
227  C/\  | | | |-INTEGRATE_FOR_W :: Integrate for vertical velocity.  C/\  | | | |-INTEGRATE_FOR_W :: Integrate for vertical velocity.
228  C/\  | | | |-OBCS_APPLY_W    :: Open bndy. package ( see pkg/obcs ).  C/\  | | | |-OBCS_APPLY_W    :: Open bndy. package ( see pkg/obcs ).
229  C/\  | | | |-FIND_RHO        :: Calculates [rho(S,T,z)-Rhonil] of a slice  C/\  | | | |-FIND_RHO        :: Calculates [rho(S,T,z)-RhoConst] of a slice
230  C/\  | | | |-GRAD_SIGMA      :: Calculate isoneutral gradients  C/\  | | | |-GRAD_SIGMA      :: Calculate isoneutral gradients
231  C/\  | | | |-CALC_IVDC       :: Set Implicit Vertical Diffusivity for Convection  C/\  | | | |-CALC_IVDC       :: Set Implicit Vertical Diffusivity for Convection
232  C/\  | | | |  C/\  | | | |
# Line 344  C/\  | | | |-TIMEAVE_STATV_WRITE :: Time Line 346  C/\  | | | |-TIMEAVE_STATV_WRITE :: Time
346  C/\  | | | |-AIM_WRITE_DIAGS     :: Intermed. atmos diags. see pkg/aim  C/\  | | | |-AIM_WRITE_DIAGS     :: Intermed. atmos diags. see pkg/aim
347  C/\  | | | |-GMREDI_DIAGS        :: GM diags. see pkg/gmredi  C/\  | | | |-GMREDI_DIAGS        :: GM diags. see pkg/gmredi
348  C/\  | | | |-KPP_DO_DIAGS        :: KPP diags. see pkg/kpp  C/\  | | | |-KPP_DO_DIAGS        :: KPP diags. see pkg/kpp
349    C/\  | | | |-SBO_CALC            :: SBO diags. see pkg/sbo
350    C/\  | | | |-SBO_DIAGS           :: SBO diags. see pkg/sbo
351  C/\  | | |  C/\  | | |
352  C/\  | | |-WRITE_CHECKPOINT :: Do I/O for restart files.  C/\  | | |-WRITE_CHECKPOINT :: Do I/O for restart files.
353  C/\  | |  C/\  | |
# Line 437  C     == Global variables === Line 441  C     == Global variables ===
441    
442  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
443  #include "tamc.h"  #include "tamc.h"
 #include "cost.h"  
 #include "adcost.h"  
444  #endif  #endif
445    
446  C     !INPUT/OUTPUT PARAMETERS:  C     !INPUT/OUTPUT PARAMETERS:
# Line 460  C     myCurrentIter - Iteration counter Line 462  C     myCurrentIter - Iteration counter
462  CEOP  CEOP
463    
464  C--   This timer encompasses the whole code  C--   This timer encompasses the whole code
465        CALL TIMER_START('ALL                [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('ALL                    [THE_MODEL_MAIN]',myThid)
   
466    
467  C--   Set model configuration (fixed arrays)  C--   Set model configuration (fixed arrays)
468        CALL TIMER_START('INITIALISE_FIXED   [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('INITIALISE_FIXED       [THE_MODEL_MAIN]',myThid)
469        CALL INITIALISE_FIXED( myThid )        CALL INITIALISE_FIXED( myThid )
470        CALL TIMER_STOP ('INITIALISE_FIXED   [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('INITIALISE_FIXED       [THE_MODEL_MAIN]',myThid)
471    
472        myCurrentTime = startTime        myCurrentTime = startTime
473        myCurrentIter = nIter0        myCurrentIter = nIter0
474    
475  #if ( defined (ALLOW_ADJOINT_RUN) || \  #if ( defined (ALLOW_ADJOINT_RUN) || \
476          defined (ALLOW_TANGENTLINEAR_RUN) || \
477        defined (ALLOW_GRADIENT_CHECK) || \        defined (ALLOW_GRADIENT_CHECK) || \
478        defined (ALLOW_ECCO_OPTIMIZATION) )        defined (ALLOW_ECCO_OPTIMIZATION) )
479    
480        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
481        IF (myProcId .eq. 0) THEN        IF (myProcId .eq. 0) THEN
482             CALL TIMER_START('CTRL_UNPACK         [THE_MODEL_MAIN]',mythid)
483           CALL CTRL_UNPACK( mycurrentiter, mycurrenttime, mythid )           CALL CTRL_UNPACK( mycurrentiter, mycurrenttime, mythid )
484             CALL TIMER_STOP ('CTRL_UNPACK         [THE_MODEL_MAIN]',mythid)
485        ENDIF        ENDIF
486        _END_MASTER( mythid )        _END_MASTER( mythid )
487        _BARRIER        _BARRIER
488    
489        fc   = 0.0        CALL COST_DEPENDENT_INIT ( mythid )
490        adfc = 1.0        _BARRIER
491        CALL TIMER_START('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)  
492    #if ( defined (ALLOW_ADJOINT_RUN) || \
493          defined (ALLOW_ECCO_OPTIMIZATION) )
494          CALL TIMER_START('ADTHE_MAIN_LOOP           [ADJOINT RUN]',mythid)
495        CALL ADTHE_MAIN_LOOP ( mythid )        CALL ADTHE_MAIN_LOOP ( mythid )
496        CALL TIMER_STOP ('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)        CALL TIMER_STOP ('ADTHE_MAIN_LOOP           [ADJOINT RUN]',mythid)
497          _BARRIER
498    #elif (defined (ALLOW_TANGENTLINEAR_RUN))
499          CALL TIMER_START('G_THE_MAIN_LOOP           [TANGENT RUN]',mythid)
500          CALL G_THE_MAIN_LOOP ( myCurrentTime, myCurrentIter, myThid )
501          CALL TIMER_STOP ('G_THE_MAIN_LOOP           [TANGENT RUN]',mythid)
502        _BARRIER        _BARRIER
503    #endif
504    
505        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
506        IF (myProcId .eq. 0) THEN        IF (myProcId .eq. 0) THEN
507             CALL TIMER_START('CTLR_PACK           [THE_MODEL_MAIN]',mythid)
508           call CTRL_PACK( mycurrentiter, mycurrenttime, mythid )           call CTRL_PACK( mycurrentiter, mycurrenttime, mythid )
509             CALL TIMER_STOP ('CTLR_PACK           [THE_MODEL_MAIN]',mythid)
510        ENDIF        ENDIF
511        _END_MASTER( mythid )        _END_MASTER( mythid )
512        _BARRIER        _BARRIER
513    
514    #else /* ALLOW_ADJOINT_RUN undef */
515    
516    C--   Call time stepping loop of full model
517          CALL TIMER_START('THE_MAIN_LOOP          [THE_MODEL_MAIN]',myThid)
518          CALL THE_MAIN_LOOP( myCurrentTime, myCurrentIter, myThid )
519          CALL TIMER_STOP ('THE_MAIN_LOOP          [THE_MODEL_MAIN]',myThid)
520    
521    #endif /* ALLOW_ADJOINT_RUN */
522    
523  #ifdef ALLOW_GRADIENT_CHECK  #ifdef ALLOW_GRADIENT_CHECK
524        if (useGrdchk) then        if (useGrdchk) then
525           CALL TIMER_START('GRDCHK_MAIN          [ADJOINT RUN]', mythid)           CALL TIMER_START('GRDCHK_MAIN         [THE_MODEL_MAIN]',mythid)
526           CALL GRDCHK_MAIN( mythid )           CALL GRDCHK_MAIN( mythid )
527           CALL TIMER_STOP ('GRDCHK_MAIN          [ADJOINT RUN]', mythid)           CALL TIMER_STOP ('GRDCHK_MAIN         [THE_MODEL_MAIN]',mythid)
528           _BARRIER           _BARRIER
529        end if        end if
530  #endif  #endif
531    
532  #else /* ALLOW_ADJOINT_RUN undef */  C--   Final checkpoint (in case the in-loop checkpoint was missed)
533          CALL TIMER_START('WRITE_CHECKPOINT       [THE_MODEL_MAIN]',myThid)
 C--   Call time stepping loop of full model  
       CALL TIMER_START('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)  
       CALL THE_MAIN_LOOP(myCurrentTime, myCurrentIter, myThid )  
       CALL TIMER_STOP ('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)  
   
 #endif /* ALLOW_ADJOINT_RUN */  
   
 C--   Final checkpoint (incase the in-loop checkpoint was missed)  
       CALL TIMER_START('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)  
534        CALL WRITE_CHECKPOINT(        CALL WRITE_CHECKPOINT(
535       &        .TRUE., myCurrentTime, myCurrentIter, myThid )       &        .TRUE., myCurrentTime, myCurrentIter, myThid )
536        CALL TIMER_STOP ('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('WRITE_CHECKPOINT       [THE_MODEL_MAIN]',myThid)
537    
538    C--   Sea-ice checkpoint (in case the in-loop checkpoint was missed)
539    #ifdef ALLOW_SEAICE
540          IF ( useSEAICE )
541         &     CALL SEAICE_WRITE_PICKUP(
542         &     .TRUE., myCurrentTime, myCurrentIter, myThid )
543    #endif
544    
545        CALL TIMER_STOP ('ALL                [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('ALL                    [THE_MODEL_MAIN]',myThid)
546    
547  C--   Write timer statistics  C--   Write timer statistics
548        IF ( myThid .EQ. 1 ) THEN        IF ( myThid .EQ. 1 ) THEN

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.22