1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/initialise.F,v 1.14 2000/03/27 22:25:45 adcroft Exp $ |
2 |
|
3 |
#include "CPP_OPTIONS.h" |
4 |
|
5 |
CStartOfInterface |
6 |
SUBROUTINE INITIALISE_VARIA(myThid) |
7 |
C /==========================================================\ |
8 |
C | SUBROUTINE INITIALISE_VARIA | |
9 |
C | o Set the initial conditions for dynamics variables | |
10 |
C | and time dependent arrays | |
11 |
C |==========================================================| |
12 |
C | This routine reads/writes data from an input file and | |
13 |
C | from various binary files. | |
14 |
C | Each thread invokes an instance of this routine as does | |
15 |
C | each process in a multi-process parallel environment like| |
16 |
C | MPI. | |
17 |
C \==========================================================/ |
18 |
IMPLICIT NONE |
19 |
|
20 |
C == Global variables == |
21 |
#include "SIZE.h" |
22 |
#include "EEPARAMS.h" |
23 |
#include "PARAMS.h" |
24 |
|
25 |
C == Routine arguments == |
26 |
INTEGER myThid |
27 |
CEndOfInterface |
28 |
|
29 |
C == Local variables == |
30 |
#ifdef ALLOW_OBCS |
31 |
INTEGER bi,bj,K |
32 |
#endif |
33 |
|
34 |
#ifdef ALLOW_KPP |
35 |
C-- Initialize kppmix vertical mixing scheme. |
36 |
CALL KMIXINIT( myThid ) |
37 |
_BARRIER |
38 |
#endif |
39 |
|
40 |
C-- Initialise model fields. |
41 |
C Starting values of U, V, W, temp., salt. and tendency terms |
42 |
C are set here. Fields are either set to default or read from |
43 |
C stored files. |
44 |
CALL INI_FIELDS( myThid ) |
45 |
_BARRIER |
46 |
|
47 |
C-- Initialise time-stepping (predictor variables are carried in G) |
48 |
IF ( startTime .EQ. 0. ) |
49 |
& CALL INI_PREDICTOR( myThid ) |
50 |
_BARRIER |
51 |
|
52 |
C-- Custom routine to set forcing fields |
53 |
CALL INI_FORCING( myThid ) |
54 |
|
55 |
#ifdef ALLOW_OBCS |
56 |
C-- Calculate values on open boundaries at iter=nIter0 |
57 |
IF (openBoundaries) THEN |
58 |
DO bj = myByLo(myThid), myByHi(myThid) |
59 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
60 |
DO K=1,Nr |
61 |
CALL SET_OBCS( K, bi, bj, startTime, myThid ) |
62 |
Caja CALL CYCLE_OBCS( K, bi, bj, myThid ) |
63 |
ENDDO |
64 |
ENDDO |
65 |
ENDDO |
66 |
ENDIF |
67 |
#endif |
68 |
|
69 |
C-- Finally summarise the model state |
70 |
CALL STATE_SUMMARY( myThid ) |
71 |
|
72 |
END |