/[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.5.4.2 - (show annotations) (download)
Mon Apr 8 20:27:13 2002 UTC (22 years ago) by heimbach
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_p11, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.5.4.1: +13 -13 lines
These changes constitute a patch to release1.
They were made on a development branch called "release1_final"
and are on the main trunk between chkpt44d_post and
checkpoint44h_post along with other changes.

This code is equivalent to chkpt44d_post with the following patches:
  - AD-related changes for GMRedi
  - fixes i KPP (delZ -> drF)
  - hook to OBCS songe layer code in external_forcing
  - errorMessageUnit non-zero in eeboot.F
  - modified test cost function and carbon verif.

1 C $Header$
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. _d 0
44 Kwy(i,j,k,bi,bj) = 0. _d 0
45 Kwz(i,j,k,bi,bj) = 0. _d 0
46 #ifdef GM_EXTRA_DIAGONAL
47 Kuz(i,j,k,bi,bj) = 0. _d 0
48 Kvz(i,j,k,bi,bj) = 0. _d 0
49 #endif
50 #ifdef GM_NON_UNITY_DIAGONAL
51 Kux(i,j,k,bi,bj) = 0. _d 0
52 Kvy(i,j,k,bi,bj) = 0. _d 0
53 #endif
54 #ifdef GM_BOLUS_ADVEC
55 GM_PsiX(i,j,k,bi,bj) = 0. _d 0
56 GM_PsiY(i,j,k,bi,bj) = 0. _d 0
57 #endif
58 #ifdef GM_VISBECK_VARIABLE_K
59 VisbeckK(i,j,bi,bj) = 0. _d 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. _d 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