/[MITgcm]/MITgcm/pkg/gmredi/gmredi_init.F
ViewVC logotype

Contents of /MITgcm/pkg/gmredi/gmredi_init.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.6 - (show annotations) (download)
Sun Dec 16 18:54:49 2001 UTC (22 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint43a-release1mods, checkpoint44g_post, chkpt44d_post, checkpoint44e_pre, release1-branch_tutorials, chkpt44a_post, checkpoint44h_pre, chkpt44c_pre, release1-branch-end, checkpoint44f_post, checkpoint44b_post, chkpt44a_pre, checkpoint44b_pre, checkpoint44, chkpt44c_post, checkpoint44f_pre, release1-branch_branchpoint
Branch point for: release1_final, release1-branch
Changes since 1.5: +38 -6 lines
Modification to the GMREDI package :
 change units of tensor-K arrays, scale now like diffusivity
 initialise all common block arrays in S/R gmredi_init
 add option to use different isopycnal(Redi) & GM diffusivity
 add option to use the advective GM form or the skew-flux form (=default)
 bug in non_unity_diagonal part fixed.

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/gmredi/gmredi_init.F,v 1.5 2001/03/06 18:01:07 jmc Exp $
2 C $Name: $
3
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 i,j,k,bi,bj
35
36 DO bj = myByLo(myThid), myByHi(myThid)
37 DO bi = myBxLo(myThid), myBxHi(myThid)
38
39 C Initialize arrays in common blocks :
40 DO k=1,Nr
41 DO j=1-Oly,sNy+OLy
42 DO i=1-Olx,sNx+Olx
43 Kwx(i,j,k,bi,bj) = 0.
44 Kwy(i,j,k,bi,bj) = 0.
45 Kwz(i,j,k,bi,bj) = 0.
46 #ifdef GM_EXTRA_DIAGONAL
47 Kuz(i,j,k,bi,bj) = 0.
48 Kvz(i,j,k,bi,bj) = 0.
49 #endif
50 #ifdef GM_NON_UNITY_DIAGONAL
51 Kux(i,j,k,bi,bj) = 0.
52 Kvy(i,j,k,bi,bj) = 0.
53 #endif
54 #ifdef GM_BOLUS_ADVEC
55 GM_PsiX(i,j,k,bi,bj) = 0.
56 GM_PsiY(i,j,k,bi,bj) = 0.
57 #endif
58 #ifdef GM_VISBECK_VARIABLE_K
59 VisbeckK(i,j,bi,bj) = 0.
60 #endif
61 ENDDO
62 ENDDO
63 ENDDO
64
65 #ifdef ALLOW_TIMEAVE
66 C Initialize averages to zero
67 CALL TIMEAVE_RESET(GM_Kwx_T,Nr, bi,bj,myThid)
68 CALL TIMEAVE_RESET(GM_Kwy_T,Nr, bi,bj,myThid)
69 CALL TIMEAVE_RESET(GM_Kwz_T,Nr, bi,bj,myThid)
70 DO k=1,Nr
71 GM_TimeAve(k,bi,bj)=0.
72 ENDDO
73 #ifdef GM_VISBECK_VARIABLE_K
74 CALL TIMEAVE_RESET(Visbeck_K_T, 1, bi,bj,myThid)
75 #endif
76 #ifdef GM_BOLUS_ADVEC
77 CALL TIMEAVE_RESET(GM_PsiXtave,Nr, bi,bj,myThid)
78 CALL TIMEAVE_RESET(GM_PsiYtave,Nr, bi,bj,myThid)
79 #endif
80 #endif /* ALLOW_TIMEAVE */
81
82 C- end bi,bj loops
83 ENDDO
84 ENDDO
85 #endif /* ALLOW_GMREDI */
86
87 return
88 end

  ViewVC Help
Powered by ViewVC 1.1.22