/[MITgcm]/MITgcm/pkg/mnc/MNC_COMMON.h
ViewVC logotype

Contents of /MITgcm/pkg/mnc/MNC_COMMON.h

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


Revision 1.3 - (show annotations) (download)
Mon Jun 23 20:52:58 2008 UTC (15 years, 10 months ago) by utke
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.2: +1 -16 lines
File MIME type: text/plain
undo previous change by restoring separate MNC_SIZE.h
(according to Patrick this is needed by some experiments)

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/MNC_COMMON.h,v 1.1 2008/05/22 12:21:19 mlosch Exp $
2 C $Name: $
3 C
4 C ==========================================
5 C MNC : an MITgcm wrapper package for NetCDF
6 C ==========================================
7 C
8 C The following common block is the "state" for the MNC interface to
9 C NetCDF. The intent is to keep track of the associations between
10 C files, attributes, variables, grids, and dimensions. These
11 C objects are roughly defined as:
12 C
13 C a dimension:
14 C - contains: [ name, size ]
15 C - exists per-NetCDF-file
16 C
17 C a grid:
18 C - contains *ORDERED* sets of dimensions: [ name, 1+ dim-refs ]
19 C - exists per-NetCDF-file
20 C - NOTE: when created, the name and dim-refs are embedded in
21 C the NetCDF file attributes for later retrieval
22 C - NOTE: grid coordinates are implemented using variables with
23 C special names (eg. lat, lon) and special units
24 C (eg. degree_east)
25 C
26 C a variable:
27 C - contains: [ name, units, 1 grid-ref, data ]
28 C - exists per-NetCDF-file
29 C - NOTE: is associated with *exactly* one grid
30 C
31 C an attribute:
32 C - contains: [ name, units, data ]
33 C - basically, a scalar (non-grid) variable
34 C - exists per-NetCDF-file
35 C
36 C a NetCDF file:
37 C - contains: [ name, 0+ attr, 0+ grid-ref, 0+ var-ref ]
38 C
39 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
40
41 CBOP 1
42 C !ROUTINE: MNC_COMMON.h
43
44 C !INTERFACE:
45 C #include "MNC_COMMON.h"
46
47 C !DESCRIPTION:
48 C Contains the ``look-up'' tables for the MNC package. These tables
49 C contain the mappings between the various names and the NetCDF
50 C entities.
51
52 C !LOCAL VARIABLES:
53 C The following MNC "Internals" are implemented on a
54 C PER-NetDCF-FILE basis:
55 C .
56 C mnc_blank_name :: (convenience) just MNC_MAX_CHAR spaces
57 C .
58 C mnc_f_names (fi) :: file names
59 C mnc_g_names (gi) :: grid names <----+
60 C . |
61 C mnc_f_info (fi,-) :: isDEF, fID, Ngrid, g1,ds1,de1,
62 C . g2,ds2,de2, ...
63 C . | |
64 C mnc_fd_ind (fi,-) :: dim indicies <-------+---+
65 C . |
66 C mnc_d_names (di) :: names <--+ <--+ |
67 C mnc_d_ids (di) :: IDs <--+ <--+ +----+
68 C mnc_d_size (di) :: sizes <--+ <--+ | starting
69 C . | | indicies of
70 C mnc_f_alld (fi,di):: ndim, id1,id2,id3, ... | grids in
71 C . | mnc_f_info
72 C . +----------++
73 C . | |
74 C mnc_fv_ids (fi,-) :: nVar, n1,ID1,ig1, n2,ID2,ig2, ...
75 C . | |
76 C mnc_v_names (vi) :: <---+-----------+
77 C
78 C fi :: file index
79 C vi :: variable index
80 C di :: dimension index
81 C .
82 C .
83 C The following MNC "Convenience Wrapper" variables are
84 C implemented independently of any NetCDF files
85 C .
86 C mnc_cw_fgnm (f) :: file group name (or "base name")
87 C mnc_cw_fgud (f) :: file group unlimited dim value
88 C mnc_cw_fgis (f) :: file group sequence number
89 C mnc_cw_fgig (f) :: file group unlim dim is growing
90 C mnc_cw_fgci (f) :: file CITER group number (cig) ------+
91 C . |
92 C mnc_cw_cit (3,cig):: CITER (1) flag, (2) current, and |
93 C . (3) next model Iter values <--+
94 C .
95 C mnc_cw_gname (g) :: Gtype names <--------+
96 C mnc_cw_ndim (g) :: number of dimensions |
97 C mnc_cw_dn (i,g) :: dname1, dname2, ... |
98 C mnc_cw_dims (i,g) :: d1, d2, d3, ... |
99 C mnc_cw_is (i,g) :: starting indicies: is1, is2, ... |
100 C mnc_cw_ie (i,g) :: ending indicies: ie1, ie2, ... |
101 C . |
102 C mnc_cw_vname (v) :: Vtype names |
103 C mnc_cw_vgind (v) :: index into --------+
104 C mnc_cw_vfmv (v) :: flag for missing values
105 C . 0 = ignore it (default)
106 C . 1 = use global value
107 C . 2 = use specific per-var value
108 C mnc_cw_vmvi (2,v) :: integer missing values: 1=IN, 2=OUT
109 C mnc_cw_vmvr (2,v) :: REAL*4 missing values: 1=IN, 2=OUT
110 C mnc_cw_vmvd (2,v) :: REAL*8 missing values: 1=IN, 2=OUT
111 C mnc_cw_vnat (3,v) :: number of attributes [T,I,D]
112 C mnc_cw_vbij (2,v) :: bi,bi indicies (0 if not applicable)
113 C mnc_cw_vtnm (i,v) :: text (character) attribute names
114 C mnc_cw_vtat (i,v) :: text (character) attributes
115 C mnc_cw_vinm (i,v) :: INT attribute names
116 C mnc_cw_viat (i,v) :: INT attributes
117 C mnc_cw_vdnm (i,v) :: REAL*8 attribute names
118 C mnc_cw_vdat (i,v) :: REAL*8 attributes
119 C .
120 C mnc_cw_cvnm (c) :: CV (coordinate variable) name
121 C mnc_cw_cvse (2,c) :: CV start,end indicies ----+
122 C mnc_cw_cvdt (cdt) :: CV data pool <-------+
123 C .
124 C f :: file group index
125 C g :: Gtype index
126 C v :: Vtype index
127 C c :: CV index
128 CEOP
129
130 #include "MNC_SIZE.h"
131
132 C=====================================================================
133 COMMON /MNC_VARS_C/
134 & mnc_blank_name,
135 & mnc_g_names, mnc_v_names, mnc_d_names,
136 & mnc_out_path, mnc_f_names
137
138 character*(MNC_MAX_CHAR) mnc_blank_name
139 character*(MNC_MAX_CHAR) mnc_g_names(MNC_MAX_ID)
140 character*(MNC_MAX_CHAR) mnc_v_names(MNC_MAX_ID)
141 character*(MNC_MAX_CHAR) mnc_d_names(MNC_MAX_ID)
142
143 character*(MNC_MAX_PATH) mnc_out_path
144 character*(MNC_MAX_PATH) mnc_f_names(MNC_MAX_FID)
145
146 C=====================================================================
147 COMMON /MNC_VARS_I/
148 & mnc_f_info, mnc_fd_ind, mnc_fv_ids, mnc_f_alld,
149 & mnc_d_size, mnc_d_ids
150
151 integer mnc_f_info(MNC_MAX_FID,MNC_MAX_INFO)
152 integer mnc_fd_ind(MNC_MAX_FID,MNC_MAX_INFO)
153 integer mnc_fv_ids(MNC_MAX_FID,MNC_MAX_INFO)
154 integer mnc_f_alld(MNC_MAX_FID,MNC_MAX_INFO)
155
156 integer mnc_d_size(MNC_MAX_ID)
157 integer mnc_d_ids(MNC_MAX_ID)
158
159 C=====================================================================
160 COMMON /MNC_CW_VARS_C/
161 & mnc_cw_gname, mnc_cw_dn,
162 & mnc_cw_vname,
163 & mnc_cw_vtnm, mnc_cw_vinm, mnc_cw_vdnm,
164 & mnc_cw_fgnm,
165 & mnc_cw_vtat
166
167 character*(MNC_MAX_CHAR) mnc_cw_gname(MNC_MAX_ID)
168 character*(MNC_MAX_CHAR) mnc_cw_dn(MNC_CW_MAX_I,MNC_MAX_ID)
169 character*(MNC_MAX_CHAR) mnc_cw_vname(MNC_MAX_ID)
170 character*(MNC_MAX_CHAR) mnc_cw_vtnm(MNC_CW_MAX_I,MNC_MAX_ID)
171 character*(MNC_MAX_CHAR) mnc_cw_vinm(MNC_CW_MAX_I,MNC_MAX_ID)
172 character*(MNC_MAX_CHAR) mnc_cw_vdnm(MNC_CW_MAX_I,MNC_MAX_ID)
173 character*(MNC_MAX_CHAR) mnc_cw_fgnm(MNC_MAX_ID)
174
175 C Note the longer string length here
176 character*(MNC_MAX_CATT) mnc_cw_vtat(MNC_CW_MAX_I,MNC_MAX_ID)
177
178 C=====================================================================
179 COMMON /MNC_CW_VARS_I/
180 & mnc_cw_ndim, mnc_cw_dims,
181 & mnc_cw_is, mnc_cw_ie,
182 & mnc_cw_vgind, mnc_cw_vfmv, mnc_cw_vmvi, mnc_cw_vnat,
183 & mnc_cw_vbij, mnc_cw_viat,
184 & mnc_cw_fgud, mnc_cw_fgis, mnc_cw_fgig, mnc_cw_fgci,
185 & mnc_cw_cit
186
187 integer mnc_cw_ndim(MNC_MAX_ID)
188 integer mnc_cw_dims(MNC_CW_MAX_I,MNC_MAX_ID)
189 integer mnc_cw_is(MNC_CW_MAX_I,MNC_MAX_ID)
190 integer mnc_cw_ie(MNC_CW_MAX_I,MNC_MAX_ID)
191
192 integer mnc_cw_vgind(MNC_MAX_ID)
193 integer mnc_cw_vfmv(MNC_MAX_ID)
194 integer mnc_cw_vmvi(2,MNC_MAX_ID)
195 integer mnc_cw_vnat(3,MNC_MAX_ID)
196 integer mnc_cw_vbij(2,MNC_MAX_ID)
197 integer mnc_cw_viat(MNC_CW_MAX_I,MNC_MAX_ID)
198
199 integer mnc_cw_fgud(MNC_MAX_ID)
200 integer mnc_cw_fgis(MNC_MAX_ID)
201 integer mnc_cw_fgig(MNC_MAX_ID)
202 integer mnc_cw_fgci(MNC_MAX_ID)
203
204 integer mnc_cw_cit(3,MNC_MAX_INFO)
205
206 C=====================================================================
207 COMMON /MNC_CW_VARS_D/
208 & mnc_cw_vdat, mnc_cw_vmvd
209 C & mnc_cw_cvdt
210
211 REAL*8 mnc_cw_vmvd(2,MNC_MAX_ID)
212 REAL*8 mnc_cw_vdat(MNC_CW_MAX_I,MNC_MAX_ID)
213
214 C=====================================================================
215 COMMON /MNC_CW_VARS_R4/
216 & mnc_cw_vmvr
217
218 REAL*4 mnc_cw_vmvr(2,MNC_MAX_ID)
219
220
221 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
222
223 CEH3 ;;; Local Variables: ***
224 CEH3 ;;; mode:fortran ***
225 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22