/[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.38 by heimbach, Tue Apr 10 22:35:26 2001 UTC revision 1.39 by heimbach, Fri Jul 13 14:26:57 2001 UTC
# Line 25  C     |      presently being developed. Line 25  C     |      presently being developed.
25  C     \==========================================================/  C     \==========================================================/
26        IMPLICIT NONE        IMPLICIT NONE
27  C  C
 C     Call Tree  
 C     =========  
 C      
 C      main ( eesupp )  
 C       |  
 C       .  
 C       .  
 C       . Generic environment initialisation ( see eesupp/src and  
 C       .                                      eesupp/inc )        
 C       . multiple threads and/or processes are created in here  
 C       .  
 C       .  
 C       .  
 C       |  
 C       |-THE_MODEL_MAIN - Begin specific model. One instance  
 C       |  |               of this codes exists for each thread  
 C       |  |               and/or instance. Each instance manages  
 C       |  |               a specifc set of tiles.                
 C       |  |  
 C       |  |--INITIALISE_FIXED  
 C       |  |   o Set model configuration (fixed arrays)  
 C       |  |     Topography, hydrography, timestep, grid, etc..  
 C       |  |  
 C       |  |--THE_MAIN_LOOP  
 C       |  |  |  
 C       |  |  |--INITIALISE_VARIA  
 C       |  |  |   o Set initial conditions (variable arrays)  
 C       |  |  |  
 C  ==>  |  |  | ** Time stepping loop starts here **  
 C  |    |  |  |  
 C /|\   |  |  |  
 C  |    |  |  |--FORWARD_STEP  
 C /|\   |  |  |  |  o Does a single forward step of the model  
 C  |    |  |  |  |  
 C /|\   |  |  |  |  
 C  |    |  |  |  |--LOAD_EXTERNAL_DATA  
 C /|\   |  |  |  |   o Load and/or set time dependent forcing fields  
 C  |    |  |  |  |  
 C /|\   |  |  |  |--DYNAMICS  
 C  |    |  |  |  |   o Evaluate "forward" terms  
 C /|\   |  |  |  |  
 C  |    |  |  |  |--SOLVE_FOR_PRESSURE  
 C /|\   |  |  |  |   o Find pressure field to keep flow non-divergent  
 C  |    |  |  |  |  
 C /|\   |  |  |  |--THE_CORRECTION_STEP  
 C  |    |  |  |  |   o Correct flow field with and cycle time-stepping arrays  
 C /|\   |  |  |  |  
 C  |    |  |  |  |--DO_GTERM_BLOCKING_EXCHANGES  
 C /|\   |  |  |  |   o Update overlap regions  
 C  |    |  |  |  |  
 C /|\   |  |  |  |--DO_THE_MODEL_IO  
 C  |    |  |  |  |   o Write model state  
 C /|\   |  |  |  |  
 C  |    |  |  |  |--WRITE_CHECKPOINT  
 C /|\   |  |  |  |   o Write restart file(s)  
 C  |    |  |  |  
 C /|\   |  |  |  
 C  |<== |  |  | ** Time stepping loop finishes here **  
 C       |  |  |  
 C       |  |  |--  
 C       |  |  
 C       |  |--WRITE_STATE  
 C       |  |--WRITE_CHECKPOINT  
 C       |  
 C       .  
 C       .  
 C       . Generic environment termination ( see eesupp/src and  
 C       .                                      eesupp/inc )        
 C       .  
 C       .  
   
28  C     == Global variables ===  C     == Global variables ===
29  #include "SIZE.h"  #include "SIZE.h"
30  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 138  C--   Set model configuration (fixed arr Line 67  C--   Set model configuration (fixed arr
67        myCurrentTime = startTime        myCurrentTime = startTime
68        myCurrentIter = nIter0        myCurrentIter = nIter0
69    
70  #ifdef ALLOW_MIT_ADJOINT_RUN  #ifdef ALLOW_ADJOINT_RUN
71    
72        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
73        IF (myProcId .eq. 0) THEN        IF (myProcId .eq. 0) THEN
# Line 150  C--   Set model configuration (fixed arr Line 79  C--   Set model configuration (fixed arr
79        fc   = 0.0        fc   = 0.0
80        adfc = 1.0        adfc = 1.0
81        CALL TIMER_START('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)        CALL TIMER_START('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)
82        call ADTHE_MAIN_LOOP ( mythid )        CALL ADTHE_MAIN_LOOP ( mythid )
83        call TIMER_STOP ('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)        CALL TIMER_STOP ('ADTHE_MAIN_LOOP          [ADJOINT RUN]', mythid)
84        _BARRIER        _BARRIER
85    
86        _BEGIN_MASTER( mythid )        _BEGIN_MASTER( mythid )
# Line 161  C--   Set model configuration (fixed arr Line 90  C--   Set model configuration (fixed arr
90        _END_MASTER( mythid )        _END_MASTER( mythid )
91        _BARRIER        _BARRIER
92    
93  #else /* ALLOW_MIT_ADJOINT_RUN undef */  #ifdef ALLOW_GRADIENT_CHECK
94          if (useGrdchk) then
95             CALL TIMER_START('GRDCHK_MAIN          [ADJOINT RUN]', mythid)
96             CALL GRDCHK_MAIN( mythid )
97             CALL TIMER_STOP ('GRDCHK_MAIN          [ADJOINT RUN]', mythid)
98             _BARRIER
99          end if
100    #endif
101    
102    #else /* ALLOW_ADJOINT_RUN undef */
103    
104  C--   Call time stepping loop of full model  C--   Call time stepping loop of full model
105        CALL TIMER_START('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)
106        CALL THE_MAIN_LOOP(myCurrentTime, myCurrentIter, myThid )        CALL THE_MAIN_LOOP(myCurrentTime, myCurrentIter, myThid )
107        CALL TIMER_STOP ('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)        CALL TIMER_STOP ('THE_MAIN_LOOP      [THE_MODEL_MAIN]',myThid)
108    
109  #endif /* ALLOW_MIT_ADJOINT_RUN */  #endif /* ALLOW_ADJOINT_RUN */
110    
111  C--   Final checkpoint (incase the in-loop checkpoint was missed)  C--   Final checkpoint (incase the in-loop checkpoint was missed)
112        CALL TIMER_START('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)        CALL TIMER_START('WRITE_CHECKPOINT   [THE_MODEL_MAIN]',myThid)

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.22