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

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

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

revision 1.7 by cnh, Sun Feb 4 14:38:47 2001 UTC revision 1.22 by jmc, Thu Aug 24 01:15:45 2006 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4    #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6    
7  CStartOfInterface  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
8    CBOP
9    C     !ROUTINE: INI_FIELDS
10    
11    C     !INTERFACE:
12        SUBROUTINE INI_FIELDS( myThid )        SUBROUTINE INI_FIELDS( myThid )
 C     /==========================================================\  
 C     | SUBROUTINE INI_FIELDS                                    |  
 C     | o Initialise model fields                                |  
 C     |==========================================================|  
 C     | Initial conditions of the model state variables are      |  
 C     | set here. For continuation runs a restart file will be   |  
 C     | used. For original runs custom rules can be included     |  
 C     | here.                                                    |  
 C     \==========================================================/  
       IMPLICIT NONE  
13    
14  C     === Global variables ===  C     !DESCRIPTION:
15    C     Initial conditions of the model state variables are set here. For
16    C     continuation runs a restart file will be used. For original runs
17    C     custom rules can be included here.
18    
19    C     !USES:
20          IMPLICIT NONE
21  #include "SIZE.h"  #include "SIZE.h"
22  #include "EEPARAMS.h"  #include "EEPARAMS.h"
23  #include "PARAMS.h"  #include "PARAMS.h"
24    
25  C     == Routine arguments ==  C     !INPUT PARAMETERS:
 C     myThid -  Number of this instance of INI_FIELDS  
26        INTEGER myThid        INTEGER myThid
27  CEndOfInterface  CEOP
28    
29    C     Set model variables to initial/restart conditions
30          IF ( startTime .EQ. baseTime .AND.  nIter0 .EQ. 0
31         &     .AND. pickupSuff .EQ. ' ' ) THEN
32            CALL INI_VEL( myThid )
33            CALL INI_THETA( myThid )
34            CALL INI_SALT( myThid )
35            CALL INI_PSURF( myThid )
36            CALL INI_PRESSURE( myThid )
37    #ifdef INCLUDE_EP_FORCING_CODE
38            CALL INI_EP( myThid )
39    #endif
40            IF (nonHydrostatic) CALL INI_PNH( myThid )
41          ELSEIF ( .NOT.useOffLine ) THEN
42            CALL READ_PICKUP( nIter0, myThid )
43    
44    CEH3        IF (pickup_write_immed) THEN
45    CEH3          CALL WRITE_CHECKPOINT(
46    CEH3     &         .TRUE., myCurrentTime, myCurrentIter, myThid)
47    CEH3        ENDIF
48    
 C--   Set model variables to initial/restart conditions  
       IF ( startTime .EQ. 0. .AND.  nIter0 .EQ. 0 ) THEN  
        CALL INI_UVEL( myThid )  
        CALL INI_VVEL( myThid )  
        CALL INI_THETA( myThid )  
        CALL INI_SALT( myThid )  
        CALL INI_PSURF( myThid )  
       ELSE  
        IF ( nIter0 .EQ. 0 ) THEN  
         nIter0 = INT(startTime/deltaTClock )  
        ENDIF  
        CALL READ_CHECKPOINT( nIter0, myThid )  
49        ENDIF        ENDIF
50    
51        RETURN        RETURN

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.22