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