1 |
cnh |
1.4 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/gmredi/gmredi_init.F,v 1.3 2001/01/29 20:07:39 heimbach Exp $ |
2 |
|
|
C $Name: $ |
3 |
adcroft |
1.1 |
|
4 |
|
|
#include "GMREDI_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE GMREDI_INIT( myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE GMREDI_INIT | |
9 |
|
|
C | o Routine to initialize GM/Redi variables and constants. | |
10 |
|
|
C |==========================================================| |
11 |
|
|
C | Initialize GM/Redi parameters, read in data.gmredi | |
12 |
|
|
C \==========================================================/ |
13 |
|
|
IMPLICIT NONE |
14 |
|
|
|
15 |
|
|
C === Global variables === |
16 |
|
|
#include "SIZE.h" |
17 |
|
|
#include "EEPARAMS.h" |
18 |
|
|
#include "PARAMS.h" |
19 |
|
|
#include "GRID.h" |
20 |
|
|
#include "GMREDI.h" |
21 |
|
|
#include "GMREDI_DIAGS.h" |
22 |
|
|
|
23 |
|
|
C === Routine arguments === |
24 |
|
|
C myThid - Number of this instance of KPP_INIT |
25 |
|
|
INTEGER myThid |
26 |
|
|
|
27 |
|
|
#ifdef ALLOW_GMREDI |
28 |
|
|
|
29 |
|
|
C === Local variables === |
30 |
|
|
C msgBuf - Informational/error meesage buffer |
31 |
|
|
C iUnit - Work variable for IO unit number |
32 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
33 |
|
|
INTEGER iUnit |
34 |
|
|
INTEGER k,bi,bj |
35 |
|
|
|
36 |
|
|
#ifdef INCLUDE_DIAGNOSTICS_INTERFACE_CODE |
37 |
|
|
C Initialize averages to zero |
38 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
39 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
40 |
|
|
DO k=1,Nr |
41 |
|
|
CALL TIMEAVER_INI_XYZ(GM_Kwx_T,bi,bj,K,myThid) |
42 |
|
|
CALL TIMEAVER_INI_XYZ(GM_Kwy_T,bi,bj,K,myThid) |
43 |
|
|
CALL TIMEAVER_INI_XYZ(GM_Kwz_T,bi,bj,K,myThid) |
44 |
|
|
GM_TimeAve(k,bi,bj)=0. |
45 |
|
|
ENDDO |
46 |
|
|
#ifdef GM_VISBECK_VARIABLE_K |
47 |
|
|
CALL TIMEAVER_INI_XY(Visbeck_K_T, bi,bj,myThid) |
48 |
|
|
#endif |
49 |
|
|
ENDDO |
50 |
|
|
ENDDO |
51 |
|
|
#endif /* INCLUDE_DIAGNOSTICS_INTERFACE_CODE */ |
52 |
|
|
|
53 |
|
|
#endif /* ALLOW_GMREDI */ |
54 |
|
|
|
55 |
|
|
return |
56 |
|
|
end |