1 |
C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/cpl_ini_vars.F,v 1.5 2009/01/05 15:21:36 dfer Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
6 |
|
7 |
CBOP |
8 |
C !ROUTINE: CPL_INI_VARS |
9 |
C !INTERFACE: |
10 |
SUBROUTINE CPL_INI_VARS( myThid ) |
11 |
|
12 |
C !DESCRIPTION: \bv |
13 |
C *==========================================================* |
14 |
C | S/R CPL_INI_VARS |
15 |
C | o Initialisation routine for arrays that are used to |
16 |
C | buffer data that interfaces to the coupling layer. |
17 |
C | - Oceanic version - |
18 |
C *==========================================================* |
19 |
C | For now this routine sets these arrays to the right |
20 |
C | state for an initial start-up. Eventually it should |
21 |
C | include some way to load this data from non-volatile |
22 |
C | external storage if they are needed during a restart. |
23 |
C *==========================================================* |
24 |
C \ev |
25 |
|
26 |
C !USES: |
27 |
IMPLICIT NONE |
28 |
|
29 |
C == Global variables == |
30 |
#include "SIZE.h" |
31 |
#include "EEPARAMS.h" |
32 |
#include "PARAMS.h" |
33 |
#include "CPL_PARAMS.h" |
34 |
#include "OCNCPL.h" |
35 |
#include "CPL_TAVE.h" |
36 |
|
37 |
C !INPUT/OUTPUT PARAMETERS: |
38 |
C myThid :: my Thread Id Number |
39 |
INTEGER myThid |
40 |
CEOP |
41 |
|
42 |
#ifdef COMPONENT_MODULE |
43 |
|
44 |
C !LOCAL VARIABLES: |
45 |
C I,J,bi,bj :: Loop counters |
46 |
INTEGER I,J,bi,bj |
47 |
|
48 |
DO bj=myByLo(myThid),myByHi(myThid) |
49 |
DO bi=myBxLo(myThid),myByLo(myThid) |
50 |
DO J=1-Oly,sNy+Oly |
51 |
DO I=1-Olx,sNx+Olx |
52 |
C. Export fields |
53 |
ocMxlD2cpl(I,J,bi,bj) = 0. |
54 |
SSTocn2cpl(I,J,bi,bj) = 0. |
55 |
SSSocn2cpl(I,J,bi,bj) = 0. |
56 |
vSqocn2cpl(I,J,bi,bj) = 0. |
57 |
fluxCO2cpl(I,J,bi,bj) = 0. |
58 |
C- Import fields |
59 |
atmSLPr (I,J,bi,bj) = 0. |
60 |
HeatFlux (I,J,bi,bj) = 0. |
61 |
qShortWave(I,J,bi,bj) = 0. |
62 |
c qLatent (I,J,bi,bj) = 0. |
63 |
c qSensible (I,J,bi,bj) = 0. |
64 |
c qLongWave (I,J,bi,bj) = 0. |
65 |
c uVelGround(I,J,bi,bj) = 0. |
66 |
c vVelGround(I,J,bi,bj) = 0. |
67 |
tauX (I,J,bi,bj) = 0. |
68 |
tauY (I,J,bi,bj) = 0. |
69 |
FWflux (I,J,bi,bj) = 0. |
70 |
iceSaltFlx(I,J,bi,bj) = 0. |
71 |
seaIceMass(I,J,bi,bj) = 0. |
72 |
airCO2 (I,J,bi,bj) = 0. |
73 |
surfWSpeed(I,J,bi,bj) = 0. |
74 |
fracIce (I,J,bi,bj) = 0. |
75 |
ENDDO |
76 |
ENDDO |
77 |
ENDDO |
78 |
ENDDO |
79 |
|
80 |
IF ( startTime.NE.baseTime .OR. nIter0.NE.0 |
81 |
& .OR. pickupSuff .NE. ' ' ) THEN |
82 |
CALL OCN_CPL_READ_PICKUP( nIter0, myThid ) |
83 |
ENDIF |
84 |
|
85 |
#ifdef ALLOW_TIMEAVE |
86 |
C Initialise diagnostic counters ( these are cleared on model start |
87 |
C i.e. not loaded from history file for now ). |
88 |
DO bj = myByLo(myThid), myByHi(myThid) |
89 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
90 |
CALL TIMEAVE_RESET( SLPtave, 1, bi, bj, myThid ) |
91 |
CALL TIMEAVE_RESET( HFtave , 1, bi, bj, myThid ) |
92 |
CALL TIMEAVE_RESET( QSWtave, 1, bi, bj, myThid ) |
93 |
c CALL TIMEAVE_RESET( QLTtave, 1, bi, bj, myThid ) |
94 |
c CALL TIMEAVE_RESET( QSNtave, 1, bi, bj, myThid ) |
95 |
c CALL TIMEAVE_RESET( QLWtave, 1, bi, bj, myThid ) |
96 |
c CALL TIMEAVE_RESET( UGtave , 1, bi, bj, myThid ) |
97 |
c CALL TIMEAVE_RESET( VGtave , 1, bi, bj, myThid ) |
98 |
CALL TIMEAVE_RESET( TXtave , 1, bi, bj, myThid ) |
99 |
CALL TIMEAVE_RESET( TYtave , 1, bi, bj, myThid ) |
100 |
CALL TIMEAVE_RESET( FWtave , 1, bi, bj, myThid ) |
101 |
CALL TIMEAVE_RESET( SFxtave, 1, bi, bj, myThid ) |
102 |
CALL TIMEAVE_RESET( SICtave, 1, bi, bj, myThid ) |
103 |
CALL TIMEAVE_RESET( MXLtave, 1, bi, bj, myThid ) |
104 |
CALL TIMEAVE_RESET( SSTtave, 1, bi, bj, myThid ) |
105 |
CALL TIMEAVE_RESET( SSStave, 1, bi, bj, myThid ) |
106 |
CALL TIMEAVE_RESET( vSqtave, 1, bi, bj, myThid ) |
107 |
CALL TIMEAVE_RESET( aCO2tave, 1, bi, bj, myThid ) |
108 |
CALL TIMEAVE_RESET( sWSpdtave,1, bi, bj, myThid ) |
109 |
CALL TIMEAVE_RESET( iceftave, 1, bi, bj, myThid ) |
110 |
CALL TIMEAVE_RESET( fCO2tave, 1, bi, bj, myThid ) |
111 |
|
112 |
CPL_timeAve(bi,bj) = 0. |
113 |
ENDDO |
114 |
ENDDO |
115 |
#endif /* ALLOW_TIMEAVE */ |
116 |
|
117 |
#endif /* COMPONENT_MODULE */ |
118 |
|
119 |
RETURN |
120 |
END |