/[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.16 - (show annotations) (download)
Wed Oct 20 21:26:14 2004 UTC (19 years, 7 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint55i_post
Changes since 1.15: +2 -1 lines
 o add a sequence number to the output file names in preparation for
   automatic handling of the 2GB NetCDF file size limitation

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_init.F,v 1.15 2004/04/05 06:01:07 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 Blank the CW 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 mnc_cw_fgis(g) = 0
58 DO i = 1,MNC_CW_MAX_I
59 mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
60 mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
61 mnc_cw_vinm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
62 mnc_cw_vdnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
63 mnc_cw_vtat(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
64 mnc_cw_dims(i,g) = 0
65 mnc_cw_is(i,g) = 0
66 mnc_cw_ie(i,g) = 0
67 mnc_cw_viat(i,g) = 0
68 mnc_cw_vdat(i,g) = 0.0D0
69 ENDDO
70 DO i = 1,3
71 mnc_cw_vnat(i,g) = 0
72 ENDDO
73 DO i = 1,2
74 mnc_cw_vbij(i,g) = 0
75 ENDDO
76 ENDDO
77
78 RETURN
79 END
80
81 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
82 CBOP 0
83 C !ROUTINE: MNC_DUMP
84
85 C !INTERFACE:
86 SUBROUTINE MNC_DUMP( myThid )
87
88 C !DESCRIPTION:
89 C Create a short (usually incomplete) summary of the current state
90 C of the MNC lookup tables. This can be helpful for debugging MNC.
91
92 C !INPUT PARAMETERS:
93 INTEGER myThid
94 CEOP
95 CALL MNC_DUMP_ALL(5, 20, myThid)
96 RETURN
97 END
98
99 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
100 CBOP 1
101 C !ROUTINE: MNC_DUMP_ALL
102
103 C !INTERFACE:
104 SUBROUTINE MNC_DUMP_ALL( n_id, n_items, myThid )
105
106 C !DESCRIPTION:
107 C Create a summary of a specified portion of the current state of
108 C the MNC lookup tables. This can be helpful for debugging MNC.
109
110 C !USES:
111 #include "mnc_common.h"
112
113 C !INPUT PARAMETERS:
114 integer n_id, n_items, myThid
115 CEOP
116
117 C !LOCAL VARIABLES:
118 integer i,j
119
120 write(*,*) 'mnc_f_names :'
121 DO i = 1,n_id
122 write(*,'(i3,a,a40)') i,':', mnc_f_names(i)
123 ENDDO
124 write(*,*) 'mnc_g_names :'
125 DO i = 1,n_id
126 write(*,'(i3,a,a40)') i,':', mnc_g_names(i)
127 ENDDO
128 write(*,*) 'mnc_v_names :'
129 DO i = 1,n_id
130 write(*,'(i3,a,a40)') i,':', mnc_v_names(i)
131 ENDDO
132 write(*,*) 'mnc_d_names :'
133 DO i = 1,n_id
134 write(*,'(i3,a,a40)') i,':', mnc_d_names(i)
135 ENDDO
136
137 write(*,*) 'mnc_d_ids, mnc_d_size :'
138 DO i = 1,n_id
139 write(*,*) i,': ',mnc_d_ids(i), mnc_d_size(i)
140 ENDDO
141
142 write(*,*) 'mnc_f_info :'
143 DO i = 1,n_id
144 write(*,*) i,': ',(mnc_f_info(i,j), j=1,n_items)
145 ENDDO
146 write(*,*) 'mnc_fd_ind :'
147 DO i = 1,n_id
148 write(*,*) i,': ',(mnc_fd_ind(i,j), j=1,n_items)
149 ENDDO
150 write(*,*) 'mnc_fv_ids :'
151 DO i = 1,n_id
152 write(*,*) i,': ',(mnc_fv_ids(i,j), j=1,n_items)
153 ENDDO
154 write(*,*) 'mnc_f_alld :'
155 DO i = 1,n_id
156 write(*,*) i,': ',(mnc_f_alld(i,j), j=1,n_items)
157 ENDDO
158
159 RETURN
160 END
161
162 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22