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

Annotation of /MITgcm/pkg/mnc/mnc_common.h

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


Revision 1.11 - (hide annotations) (download)
Tue Mar 9 03:57:25 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: hrcube5
Changes since 1.10: +2 -2 lines
File MIME type: text/plain
 o minor mnc changes

1 edhill 1.11 C $Header: /u/u3/gcmpack/MITgcm/pkg/mnc/mnc_common.h,v 1.10 2004/03/08 21:15:49 edhill Exp $
2 edhill 1.1 C $Name: $
3 edhill 1.7 C
4 edhill 1.1 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 edhill 1.6 C - contains: [ name, size ]
15     C - exists per-NetCDF-file
16 edhill 1.1 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 edhill 1.6 C
39 edhill 1.8 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
40     C
41     C MNC "Internals" : implemented on a PER-NetDCF-FILE basis
42 edhill 1.1 C
43     C mnc_blank_name : (convenience) just MNC_MAX_CHAR spaces
44     C
45     C mnc_f_names (fi) : file names
46 edhill 1.3 C mnc_g_names (gi) : grid names <----+-----------+
47     C . | |
48 edhill 1.6 C mnc_f_info (fi,-) : isDEF, fID, Ngrid, g1,ds1,de1, g2,ds2,de2...
49 edhill 1.3 C . | | | |
50     C mnc_fd_ind (fi,-) : dim indicies <-------+---+-------+---+
51 edhill 1.1 C . |
52 edhill 1.6 C mnc_d_names (di) : names <--+ <--+ | |
53     C mnc_d_ids (di) : IDs <--+ <--+ +-----+-----+
54     C mnc_d_size (di) : sizes <--+ <--+ | starting
55     C . | | indicies of
56     C mnc_f_alld (fi,di): ndim, id1,id2,id3, ... | grids in
57     C . | mnc_f_info
58     C . +-----------+
59     C . | |
60 edhill 1.4 C mnc_fv_ids (fi,-) : nVar, n1,ID1,ig1, n2,ID2,ig2, ...
61 edhill 1.6 C . | |
62     C mnc_v_names (vi) : <---+-----------+
63 edhill 1.5 C
64 edhill 1.2 C fi : file index
65     C vi : variable index
66     C di : dimension index
67 edhill 1.7 C
68 edhill 1.8 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
69     C
70     C MNC "Convenience Wrapper" : implemented independently of any
71     C . NetCDF files
72 edhill 1.7 C
73 edhill 1.8 C mnc_cw_gname (g) : Gtype names <--------+
74     C mnc_cw_ndim (g) : number of dimensions |
75     C mnc_cw_dn (i,g) : dname1, dname2, ... |
76     C mnc_cw_dims (i,g) : d1, d2, d3, ... |
77     C mnc_cw_is (i,g) : starting indicies: is1, is2, ... |
78     C mnc_cw_ie (i,g) : ending indicies: ie1, ie2, ... |
79     C . |
80     C mnc_cw_vname (v) : Vtype names |
81     C mnc_cw_vgind (v) : index into --------+
82     C mnc_cw_vnat (3,v) : number of attributes [T,I,D]
83 edhill 1.9 C mnc_cw_vbij (2,v) : bi,bi indicies (0 if not applicable)
84 edhill 1.8 C mnc_cw_vtnm (i,v) : text (character) attribute names
85     C mnc_cw_vtat (i,v) : text (character) attributes
86     C mnc_cw_vinm (i,v) : INT attribute names
87     C mnc_cw_viat (i,v) : INT attributes
88     C mnc_cw_vdnm (i,v) : REAL*8 attribute names
89     C mnc_cw_vdat (i,v) : REAL*8 attributes
90     C
91     C g : Gtype index
92     C v : Vtype index
93 edhill 1.7 C
94     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
95 edhill 1.1
96     integer MNC_MAX_ID, MNC_MAX_CHAR, MNC_MAX_INFO
97 edhill 1.7 integer MNC_CW_MAX_I
98 edhill 1.5 parameter ( MNC_MAX_ID = 1000 )
99 edhill 1.1 parameter ( MNC_MAX_CHAR = 100 )
100 edhill 1.10 parameter ( MNC_MAX_INFO = 200 )
101 edhill 1.11 parameter ( MNC_CW_MAX_I = 200 )
102 edhill 1.1
103     COMMON /MNC_VARS/
104     & mnc_blank_name,
105 edhill 1.3 & mnc_f_names, mnc_g_names, mnc_v_names,
106 edhill 1.6 & mnc_d_names, mnc_d_ids, mnc_d_size,
107     & mnc_f_info, mnc_fd_ind, mnc_fv_ids,
108 edhill 1.8 & mnc_f_alld
109    
110     COMMON /MNC_CW_VARS/
111     & mnc_cw_gname, mnc_cw_ndim, mnc_cw_dims,
112     & mnc_cw_dn, mnc_cw_is, mnc_cw_ie,
113 edhill 1.9 & mnc_cw_vname, mnc_cw_vnat, mnc_cw_vgind, mnc_cw_vbij,
114 edhill 1.8 & mnc_cw_vtnm, mnc_cw_vdnm, mnc_cw_vinm,
115     & mnc_cw_vtat, mnc_cw_vdat, mnc_cw_viat
116 edhill 1.1
117     character*(MNC_MAX_CHAR) mnc_blank_name
118     character*(MNC_MAX_CHAR) mnc_f_names(MNC_MAX_ID)
119     character*(MNC_MAX_CHAR) mnc_g_names(MNC_MAX_ID)
120     character*(MNC_MAX_CHAR) mnc_v_names(MNC_MAX_ID)
121     character*(MNC_MAX_CHAR) mnc_d_names(MNC_MAX_ID)
122     integer mnc_f_info(MNC_MAX_ID,MNC_MAX_INFO)
123     integer mnc_fd_ind(MNC_MAX_ID,MNC_MAX_INFO)
124     integer mnc_fv_ids(MNC_MAX_ID,MNC_MAX_INFO)
125 edhill 1.5 integer mnc_f_alld(MNC_MAX_ID,MNC_MAX_INFO)
126 edhill 1.1 integer mnc_d_size(MNC_MAX_ID)
127 edhill 1.6 integer mnc_d_ids(MNC_MAX_ID)
128 edhill 1.1
129 edhill 1.8 character*(MNC_MAX_CHAR) mnc_cw_gname(MNC_MAX_ID)
130 edhill 1.7 character*(MNC_MAX_CHAR) mnc_cw_dn(MNC_CW_MAX_I,MNC_MAX_ID)
131     integer mnc_cw_ndim(MNC_MAX_ID)
132     integer mnc_cw_dims(MNC_CW_MAX_I,MNC_MAX_ID)
133     integer mnc_cw_is(MNC_CW_MAX_I,MNC_MAX_ID)
134     integer mnc_cw_ie(MNC_CW_MAX_I,MNC_MAX_ID)
135 edhill 1.1
136 edhill 1.8 character*(MNC_MAX_CHAR) mnc_cw_vname(MNC_MAX_ID)
137     character*(MNC_MAX_CHAR) mnc_cw_vtnm(MNC_CW_MAX_I,MNC_MAX_ID)
138     character*(MNC_MAX_CHAR) mnc_cw_vinm(MNC_CW_MAX_I,MNC_MAX_ID)
139     character*(MNC_MAX_CHAR) mnc_cw_vdnm(MNC_CW_MAX_I,MNC_MAX_ID)
140     character*(MNC_MAX_CHAR) mnc_cw_vtat(MNC_CW_MAX_I,MNC_MAX_ID)
141     integer mnc_cw_vgind(MNC_MAX_ID)
142     integer mnc_cw_vnat(3,MNC_MAX_ID)
143 edhill 1.9 integer mnc_cw_vbij(2,MNC_MAX_ID)
144 edhill 1.8 integer mnc_cw_viat(MNC_CW_MAX_I,MNC_MAX_ID)
145     REAL*8 mnc_cw_vdat(MNC_CW_MAX_I,MNC_MAX_ID)
146    
147     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
148 edhill 1.1 CEH3 ;;; Local Variables: ***
149     CEH3 ;;; mode:fortran ***
150     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22