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

Annotation of /MITgcm/model/src/initialise_varia.F

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


Revision 1.12 - (hide annotations) (download)
Tue May 29 14:01:37 2001 UTC (23 years ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre1
Changes since 1.11: +16 -3 lines
Merge from branch pre38:
 o essential mods for cubed sphere
 o debugged atmosphere, dynamcis + physics (aim)
 o new packages (mom_vecinv, mom_fluxform, ...)

1 adcroft 1.12 C $Header: /u/gcmpack/models/MITgcmUV/model/src/initialise_varia.F,v 1.9.2.2 2001/05/16 21:04:00 jmc Exp $
2 heimbach 1.11 C $Name: $
3 adcroft 1.1
4     #include "CPP_OPTIONS.h"
5    
6     CStartOfInterface
7     SUBROUTINE INITIALISE_VARIA(myThid)
8     C /==========================================================\
9     C | SUBROUTINE INITIALISE_VARIA |
10     C | o Set the initial conditions for dynamics variables |
11     C | and time dependent arrays |
12     C |==========================================================|
13     C | This routine reads/writes data from an input file and |
14     C | from various binary files. |
15     C | Each thread invokes an instance of this routine as does |
16     C | each process in a multi-process parallel environment like|
17     C | MPI. |
18     C \==========================================================/
19     IMPLICIT NONE
20    
21     C == Global variables ==
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25 adcroft 1.5 #include "DYNVARS.h"
26 adcroft 1.1
27     C == Routine arguments ==
28     INTEGER myThid
29     CEndOfInterface
30    
31     C == Local variables ==
32 adcroft 1.5 INTEGER bi,bj,K,iMin,iMax,jMin,jMax
33 adcroft 1.1
34 adcroft 1.5 _BARRIER
35 adcroft 1.12 C-- Initialize DYNVARS arrays (state fields + G terms: Gu,Gv,...) to zero [always]
36     CALL INI_DYNVARS( myThid )
37    
38 adcroft 1.1 C-- Initialise model fields.
39     C Starting values of U, V, W, temp., salt. and tendency terms
40     C are set here. Fields are either set to default or read from
41     C stored files.
42     CALL INI_FIELDS( myThid )
43     _BARRIER
44 jmc 1.8
45 heimbach 1.11 IF ( usePickupBeforeC35 ) THEN
46 jmc 1.8 C-- IMPORTANT : Need to activate the following call to restart from
47     C a pickup file written by MITgcmUV_checkpoint34 or earlier.
48 heimbach 1.11 IF ( startTime .NE. 0. ) THEN
49     CALL THE_CORRECTION_STEP(startTime, nIter0, myThid)
50     ENDIF
51     ENDIF
52 adcroft 1.1
53 adcroft 1.5 C-- Initial conditions are convectively adjusted (for historical reasons)
54 heimbach 1.3 IF ( startTime .EQ. 0. ) THEN
55 adcroft 1.1 DO bj = myByLo(myThid), myByHi(myThid)
56     DO bi = myBxLo(myThid), myBxHi(myThid)
57 adcroft 1.5 iMin=1-Olx
58     iMax=sNx+Olx
59     jMin=1-Oly
60     jMax=sNy+Oly
61 heimbach 1.11 CALL CONVECTIVE_ADJUSTMENT_INI(
62 adcroft 1.5 I bi, bj, iMin, iMax, jMin, jMax,
63 jmc 1.7 I startTime, nIter0, myThid )
64 adcroft 1.1 ENDDO
65     ENDDO
66 adcroft 1.5 _BARRIER
67     END IF
68    
69     C-- Initialize variable data for packages
70     CALL PACKAGES_INIT_VARIABLES( myThid )
71 adcroft 1.1
72     C-- Finally summarise the model state
73     CALL STATE_SUMMARY( myThid )
74    
75 jmc 1.9 #ifdef ALLOW_TIMEAVE
76 jmc 1.7 C-- initialise time-average arrays with initial state values
77     IF (taveFreq.GT.0.) THEN
78     DO bj=myByLo(myThid),myByHi(myThid)
79     DO bi=myBxLo(myThid),myBxHi(myThid)
80 jmc 1.9 CALL TIMEAVE_STATVARS(startTime, nIter0, bi, bj, myThid)
81 jmc 1.7 ENDDO
82     ENDDO
83     ENDIF
84 jmc 1.9 #endif /* ALLOW_TIMEAVE */
85 jmc 1.7
86 adcroft 1.12 #ifdef EXACT_CONSERV
87     IF (exactConserv) THEN
88     C-- Compute the initial Barotropic Flow Divergence :
89     DO bj=myByLo(myThid),myByHi(myThid)
90     DO bi=myBxLo(myThid),myBxHi(myThid)
91     CALL CALC_EXACT_ETA( bi,bj, uVel,vVel,
92     I startTime, nIter0, myThid )
93     ENDDO
94     ENDDO
95     ENDIF
96     #endif /* EXACT_CONSERV */
97    
98 jmc 1.7 RETURN
99 adcroft 1.1 END

  ViewVC Help
Powered by ViewVC 1.1.22