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

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

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


Revision 1.12 - (show 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 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 C $Name: $
3
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 #include "DYNVARS.h"
26
27 C == Routine arguments ==
28 INTEGER myThid
29 CEndOfInterface
30
31 C == Local variables ==
32 INTEGER bi,bj,K,iMin,iMax,jMin,jMax
33
34 _BARRIER
35 C-- Initialize DYNVARS arrays (state fields + G terms: Gu,Gv,...) to zero [always]
36 CALL INI_DYNVARS( myThid )
37
38 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
45 IF ( usePickupBeforeC35 ) THEN
46 C-- IMPORTANT : Need to activate the following call to restart from
47 C a pickup file written by MITgcmUV_checkpoint34 or earlier.
48 IF ( startTime .NE. 0. ) THEN
49 CALL THE_CORRECTION_STEP(startTime, nIter0, myThid)
50 ENDIF
51 ENDIF
52
53 C-- Initial conditions are convectively adjusted (for historical reasons)
54 IF ( startTime .EQ. 0. ) THEN
55 DO bj = myByLo(myThid), myByHi(myThid)
56 DO bi = myBxLo(myThid), myBxHi(myThid)
57 iMin=1-Olx
58 iMax=sNx+Olx
59 jMin=1-Oly
60 jMax=sNy+Oly
61 CALL CONVECTIVE_ADJUSTMENT_INI(
62 I bi, bj, iMin, iMax, jMin, jMax,
63 I startTime, nIter0, myThid )
64 ENDDO
65 ENDDO
66 _BARRIER
67 END IF
68
69 C-- Initialize variable data for packages
70 CALL PACKAGES_INIT_VARIABLES( myThid )
71
72 C-- Finally summarise the model state
73 CALL STATE_SUMMARY( myThid )
74
75 #ifdef ALLOW_TIMEAVE
76 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 CALL TIMEAVE_STATVARS(startTime, nIter0, bi, bj, myThid)
81 ENDDO
82 ENDDO
83 ENDIF
84 #endif /* ALLOW_TIMEAVE */
85
86 #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 RETURN
99 END

  ViewVC Help
Powered by ViewVC 1.1.22