1 |
heimbach |
1.17 |
C $Header: /u/gcmpack/MITgcm/model/src/ini_fields.F,v 1.16 2003/10/30 12:00:41 edhill Exp $ |
2 |
adcroft |
1.10 |
C $Name: $ |
3 |
cnh |
1.1 |
|
4 |
edhill |
1.16 |
#include "PACKAGES_CONFIG.h" |
5 |
cnh |
1.4 |
#include "CPP_OPTIONS.h" |
6 |
cnh |
1.1 |
|
7 |
cnh |
1.12 |
CBOP |
8 |
|
|
C !ROUTINE: INI_FIELDS |
9 |
|
|
C !INTERFACE: |
10 |
cnh |
1.1 |
SUBROUTINE INI_FIELDS( myThid ) |
11 |
cnh |
1.12 |
C !DESCRIPTION: \bv |
12 |
|
|
C *==========================================================* |
13 |
|
|
C | SUBROUTINE INI_FIELDS |
14 |
|
|
C | o Initialise model fields |
15 |
|
|
C *==========================================================* |
16 |
|
|
C | Initial conditions of the model state variables are |
17 |
|
|
C | set here. For continuation runs a restart file will be |
18 |
|
|
C | used. For original runs custom rules can be included |
19 |
|
|
C | here. |
20 |
|
|
C *==========================================================* |
21 |
|
|
C \ev |
22 |
|
|
|
23 |
|
|
C !USES: |
24 |
adcroft |
1.5 |
IMPLICIT NONE |
25 |
cnh |
1.1 |
C === Global variables === |
26 |
|
|
#include "SIZE.h" |
27 |
|
|
#include "EEPARAMS.h" |
28 |
|
|
#include "PARAMS.h" |
29 |
|
|
|
30 |
cnh |
1.12 |
C !INPUT/OUTPUT PARAMETERS: |
31 |
cnh |
1.1 |
C == Routine arguments == |
32 |
|
|
C myThid - Number of this instance of INI_FIELDS |
33 |
|
|
INTEGER myThid |
34 |
cnh |
1.12 |
CEOP |
35 |
cnh |
1.1 |
|
36 |
|
|
C-- Set model variables to initial/restart conditions |
37 |
adcroft |
1.15 |
IF ( startTime .EQ. 0. .AND. nIter0 .EQ. 0 |
38 |
|
|
& .AND. pickupSuff .EQ. ' ' ) THEN |
39 |
adcroft |
1.10 |
CALL INI_VEL( myThid ) |
40 |
cnh |
1.1 |
CALL INI_THETA( myThid ) |
41 |
|
|
CALL INI_SALT( myThid ) |
42 |
adcroft |
1.6 |
CALL INI_PSURF( myThid ) |
43 |
mlosch |
1.14 |
CALL INI_PRESSURE( myThid ) |
44 |
heimbach |
1.17 |
#ifdef ALLOW_CD_CODE |
45 |
|
|
IF (useCDscheme) |
46 |
|
|
& CALL CD_CODE_INI_VARS( myThid ) |
47 |
|
|
#endif |
48 |
heimbach |
1.13 |
#ifdef INCLUDE_EP_FORCING_CODE |
49 |
|
|
CALL INI_EP( myThid ) |
50 |
|
|
#endif |
51 |
adcroft |
1.11 |
IF (nonHydrostatic) CALL INI_PNH( myThid ) |
52 |
cnh |
1.1 |
ELSE |
53 |
cnh |
1.3 |
IF ( nIter0 .EQ. 0 ) THEN |
54 |
|
|
nIter0 = INT(startTime/deltaTClock ) |
55 |
|
|
ENDIF |
56 |
|
|
CALL READ_CHECKPOINT( nIter0, myThid ) |
57 |
edhill |
1.16 |
#ifdef ALLOW_CD_CODE |
58 |
heimbach |
1.17 |
IF (useCDscheme) |
59 |
|
|
& CALL CD_CODE_READ_CHECKPOINT( nIter0, myThid ) |
60 |
edhill |
1.16 |
#endif |
61 |
heimbach |
1.17 |
ENDIF |
62 |
cnh |
1.1 |
|
63 |
|
|
RETURN |
64 |
|
|
END |