/[MITgcm]/MITgcm/pkg/mnc/mnc_init.F
ViewVC logotype

Contents of /MITgcm/pkg/mnc/mnc_init.F

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


Revision 1.14 - (show annotations) (download)
Fri Apr 2 16:12:48 2004 UTC (20 years, 1 month ago) by edhill
Branch: MAIN
Changes since 1.13: +14 -10 lines
 o more comments for the api_reference (protex)

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_init.F,v 1.13 2004/03/29 03:33:52 edhill Exp $
2 C $Name: $
3
4 #include "MNC_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: MNC_INIT
9
10 C !INTERFACE:
11 SUBROUTINE MNC_INIT( myThid )
12
13 C !DESCRIPTION:
14 C Initialize (zero) the look-up tables. This routine should
15 C \textbf{always} be run before any other MNC subroutines to ensure
16 C that the lookup tables start in a well-defined state.
17
18 C !USES:
19 #include "mnc_common.h"
20
21 C !INPUT PARAMETERS:
22 integer myThid
23 CEOP
24
25 C !LOCAL VARIABLES:
26 integer i,j, g, v
27 character blank*(MNC_MAX_CHAR)
28
29 C Write blanks or zeros to all the internal names and ID tables
30 DO i = 1,MNC_MAX_CHAR
31 blank(i:i) = ' ';
32 ENDDO
33 mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
34 DO i = 1,MNC_MAX_ID
35 mnc_d_size(i) = 0
36 mnc_d_ids(i) = 0
37 mnc_f_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
38 mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
39 mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
40 mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
41 DO j = 1,MNC_MAX_INFO
42 mnc_f_info(i,j) = 0
43 mnc_fv_ids(i,j) = 0
44 mnc_fd_ind(i,j) = 0
45 mnc_f_alld(i,j) = 0
46 ENDDO
47 ENDDO
48
49 C The outer tables
50 DO g = 1,MNC_MAX_ID
51 mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
52 mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
53 mnc_cw_vgind(g) = 0
54 mnc_cw_ndim(g) = 0
55 mnc_cw_fgnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
56 mnc_cw_fgud(g) = 0
57 DO i = 1,MNC_CW_MAX_I
58 mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
59 mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
60 mnc_cw_vinm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
61 mnc_cw_vdnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
62 mnc_cw_vtat(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
63 mnc_cw_dims(i,g) = 0
64 mnc_cw_is(i,g) = 0
65 mnc_cw_ie(i,g) = 0
66 mnc_cw_viat(i,g) = 0
67 mnc_cw_vdat(i,g) = 0.0D0
68 ENDDO
69 DO i = 1,3
70 mnc_cw_vnat(i,g) = 0
71 ENDDO
72 DO i = 1,2
73 mnc_cw_vbij(i,g) = 0
74 ENDDO
75 ENDDO
76
77 RETURN
78 END
79
80 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
81 CBOP 0
82 C !ROUTINE: MNC_DUMP
83
84 C !INTERFACE:
85 SUBROUTINE MNC_DUMP( myThid )
86
87 C !DESCRIPTION:
88 C Create a short (usually incomplete) summary of the current state
89 C of the MNC lookup tables. This can be helpful for debugging MNC.
90
91 C !INPUT PARAMETERS:
92 INTEGER myThid
93 CEOP
94 CALL MNC_DUMP_ALL(5, 20, myThid)
95 RETURN
96 END
97
98 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
99 CBOP 1
100 C !ROUTINE: MNC_DUMP_ALL
101
102 C !INTERFACE:
103 SUBROUTINE MNC_DUMP_ALL( n_id, n_items, myThid )
104
105 C !DESCRIPTION:
106 C Create a summary of a specified portion of the current state of
107 C the MNC lookup tables. This can be helpful for debugging MNC.
108
109 C !USES:
110 #include "mnc_common.h"
111
112 C !INPUT PARAMETERS:
113 integer n_id, n_items, myThid
114 CEOP
115
116 C !LOCAL VARIABLES:
117 integer i,j
118
119 write(*,*) 'mnc_f_names :'
120 DO i = 1,n_id
121 write(*,'(i3,a,a40)') i,':', mnc_f_names(i)
122 ENDDO
123 write(*,*) 'mnc_g_names :'
124 DO i = 1,n_id
125 write(*,'(i3,a,a40)') i,':', mnc_g_names(i)
126 ENDDO
127 write(*,*) 'mnc_v_names :'
128 DO i = 1,n_id
129 write(*,'(i3,a,a40)') i,':', mnc_v_names(i)
130 ENDDO
131 write(*,*) 'mnc_d_names :'
132 DO i = 1,n_id
133 write(*,'(i3,a,a40)') i,':', mnc_d_names(i)
134 ENDDO
135
136 write(*,*) 'mnc_d_ids, mnc_d_size :'
137 DO i = 1,n_id
138 write(*,*) i,': ',mnc_d_ids(i), mnc_d_size(i)
139 ENDDO
140
141 write(*,*) 'mnc_f_info :'
142 DO i = 1,n_id
143 write(*,*) i,': ',(mnc_f_info(i,j), j=1,n_items)
144 ENDDO
145 write(*,*) 'mnc_fd_ind :'
146 DO i = 1,n_id
147 write(*,*) i,': ',(mnc_fd_ind(i,j), j=1,n_items)
148 ENDDO
149 write(*,*) 'mnc_fv_ids :'
150 DO i = 1,n_id
151 write(*,*) i,': ',(mnc_fv_ids(i,j), j=1,n_items)
152 ENDDO
153 write(*,*) 'mnc_f_alld :'
154 DO i = 1,n_id
155 write(*,*) i,': ',(mnc_f_alld(i,j), j=1,n_items)
156 ENDDO
157
158 RETURN
159 END
160
161 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22