1 |
C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/cpl_ini_vars.F,v 1.1 2003/12/15 02:49:09 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
6 |
|
7 |
CStartOfInterface |
8 |
SUBROUTINE CPL_INI_VARS( myThid ) |
9 |
C /==========================================================\ |
10 |
C | SUBROUTINE CPL_INI_VARS | |
11 |
C | o Initialisation routine for arrays that are used to | |
12 |
C | buffer data that interfaces to the coupling layer. | |
13 |
C | - Oceanic version - | |
14 |
C |==========================================================| |
15 |
C | For now this routine sets these arrays to the right | |
16 |
C | state for an initial start-up. Eventually it should | |
17 |
C | include some way to load this data from non-volatile | |
18 |
C | external storage if they are needed during a restart. | |
19 |
C \==========================================================/ |
20 |
IMPLICIT NONE |
21 |
|
22 |
C == Global variables == |
23 |
#include "SIZE.h" |
24 |
#include "EEPARAMS.h" |
25 |
#include "PARAMS.h" |
26 |
#include "CPL_PARAMS.h" |
27 |
#include "OCNCPL.h" |
28 |
#include "CPL_DIAGS.h" |
29 |
|
30 |
C == Routine arguments == |
31 |
C myThid - Thread number for this instance of the routine |
32 |
INTEGER myThid |
33 |
CEndOfInterface |
34 |
|
35 |
#ifdef COMPONENT_MODULE |
36 |
C == Local variables == |
37 |
C I,J,bi,bj - Loop counters |
38 |
INTEGER I,J,bi,bj |
39 |
|
40 |
DO bj=myByLo(myThid),myByHi(myThid) |
41 |
DO bi=myBxLo(myThid),myByLo(myThid) |
42 |
DO J=1-Oly,sNy+Oly |
43 |
DO I=1-Olx,sNx+Olx |
44 |
C. Export fields |
45 |
ocMxlD2cpl(I,J,bi,bj) = 0. |
46 |
SSTocn2cpl(I,J,bi,bj) = 0. |
47 |
SSSocn2cpl(I,J,bi,bj) = 0. |
48 |
vSqocn2cpl(I,J,bi,bj) = 0. |
49 |
C- Import fields |
50 |
atmSLPr (I,J,bi,bj) = 0. |
51 |
HeatFlux (I,J,bi,bj) = 0. |
52 |
qShortWave(I,J,bi,bj) = 0. |
53 |
c qLatent (I,J,bi,bj) = 0. |
54 |
c qSensible (I,J,bi,bj) = 0. |
55 |
c qLongWave (I,J,bi,bj) = 0. |
56 |
c uVelGround(I,J,bi,bj) = 0. |
57 |
c vVelGround(I,J,bi,bj) = 0. |
58 |
tauX (I,J,bi,bj) = 0. |
59 |
tauY (I,J,bi,bj) = 0. |
60 |
FWflux (I,J,bi,bj) = 0. |
61 |
iceSaltFlx(I,J,bi,bj) = 0. |
62 |
seaIceMass(I,J,bi,bj) = 0. |
63 |
ENDDO |
64 |
ENDDO |
65 |
ENDDO |
66 |
ENDDO |
67 |
|
68 |
IF ( ( startTime.NE.0. .OR. nIter0.NE.0 ) |
69 |
& .AND. .NOT. cpl_earlyExpImpCall ) THEN |
70 |
CALL OCN_CPL_READ_PICKUP( nIter0, myThid ) |
71 |
ENDIF |
72 |
|
73 |
#ifdef ALLOW_TIMEAVE |
74 |
C Initialise diagnostic counters ( these are cleared on model start |
75 |
C i.e. not loaded from history file for now ). |
76 |
DO bj = myByLo(myThid), myByHi(myThid) |
77 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
78 |
CALL TIMEAVE_RESET(SLPtave, 1, bi, bj, myThid) |
79 |
CALL TIMEAVE_RESET(HFtave , 1, bi, bj, myThid) |
80 |
CALL TIMEAVE_RESET(QSWtave, 1, bi, bj, myThid) |
81 |
c CALL TIMEAVE_RESET(QLTtave, 1, bi, bj, myThid) |
82 |
c CALL TIMEAVE_RESET(QSNtave, 1, bi, bj, myThid) |
83 |
c CALL TIMEAVE_RESET(QLWtave, 1, bi, bj, myThid) |
84 |
c CALL TIMEAVE_RESET(UGtave , 1, bi, bj, myThid) |
85 |
c CALL TIMEAVE_RESET(VGtave , 1, bi, bj, myThid) |
86 |
CALL TIMEAVE_RESET(TXtave , 1, bi, bj, myThid) |
87 |
CALL TIMEAVE_RESET(TYtave , 1, bi, bj, myThid) |
88 |
CALL TIMEAVE_RESET(FWtave , 1, bi, bj, myThid) |
89 |
CALL TIMEAVE_RESET(SFxtave, 1, bi, bj, myThid) |
90 |
CALL TIMEAVE_RESET(SICtave, 1, bi, bj, myThid) |
91 |
CALL TIMEAVE_RESET(MXLtave, 1, bi, bj, myThid) |
92 |
CALL TIMEAVE_RESET(SSTtave, 1, bi, bj, myThid) |
93 |
CALL TIMEAVE_RESET(SSStave, 1, bi, bj, myThid) |
94 |
CALL TIMEAVE_RESET(vSqtave, 1, bi, bj, myThid) |
95 |
CPL_TimeAve(1,bi,bj) = 0. |
96 |
ENDDO |
97 |
ENDDO |
98 |
#endif /* ALLOW_TIMEAVE */ |
99 |
|
100 |
#endif /* COMPONENT_MODULE */ |
101 |
|
102 |
RETURN |
103 |
END |