1 |
edhill |
1.1 |
C $Header: $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
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, units ] |
15 |
|
|
C - exists regardless of any NetCDF files |
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 |
|
|
|
39 |
|
|
C ================================================== |
40 |
|
|
C Implemented using: |
41 |
|
|
C |
42 |
|
|
C mnc_blank_name : (convenience) just MNC_MAX_CHAR spaces |
43 |
|
|
C |
44 |
|
|
C mnc_f_names (fi) : file names |
45 |
|
|
C mnc_g_names (gi) : grid names <---+-----------+ |
46 |
|
|
C . | | |
47 |
|
|
C mnc_f_info (fi,-) : open, fID, Ngrid, g1,ds1,de1, g2,ds2,de2, ... |
48 |
|
|
C . | | | | |
49 |
|
|
C mnc_fg_ids (fi,-) : dim IDs <------+---+-------+---+ |
50 |
|
|
C mnc_fd_ind (fi,-) : dim indicies <------+---+-------+---+ |
51 |
|
|
C . | |
52 |
|
|
C mnc_d_names (di) : name <--+ |
53 |
|
|
C mnc_d_units (di) : units <--+ |
54 |
|
|
C mnc_d_size (di) : size <--+ |
55 |
|
|
C . |
56 |
|
|
C mnc_fv_ids (fi,-) : nVar, n1,ID1, n2,ID2, ... |
57 |
|
|
C . | | |
58 |
|
|
C mnc_v_names (vi) : <---+-------+ |
59 |
|
|
C mnc_v_units (vi) : <---+-------+ |
60 |
|
|
|
61 |
|
|
integer MNC_MAX_ID, MNC_MAX_CHAR, MNC_MAX_INFO |
62 |
|
|
parameter ( MNC_MAX_ID = 500 ) |
63 |
|
|
parameter ( MNC_MAX_CHAR = 100 ) |
64 |
|
|
parameter ( MNC_MAX_INFO = 40 ) |
65 |
|
|
|
66 |
|
|
COMMON /MNC_VARS/ |
67 |
|
|
& mnc_blank_name, |
68 |
|
|
& mnc_f_names, mnc_g_names, mnc_v_names, mnc_v_units, |
69 |
|
|
& mnc_d_names, mnc_d_units, mnc_d_size, |
70 |
|
|
& mnc_f_info, mnc_fg_ids, mnc_fd_ind, mnc_fv_ids |
71 |
|
|
|
72 |
|
|
character*(MNC_MAX_CHAR) mnc_blank_name |
73 |
|
|
character*(MNC_MAX_CHAR) mnc_f_names(MNC_MAX_ID) |
74 |
|
|
character*(MNC_MAX_CHAR) mnc_g_names(MNC_MAX_ID) |
75 |
|
|
character*(MNC_MAX_CHAR) mnc_v_names(MNC_MAX_ID) |
76 |
|
|
character*(MNC_MAX_CHAR) mnc_v_units(MNC_MAX_ID) |
77 |
|
|
character*(MNC_MAX_CHAR) mnc_d_names(MNC_MAX_ID) |
78 |
|
|
character*(MNC_MAX_CHAR) mnc_d_units(MNC_MAX_ID) |
79 |
|
|
integer mnc_f_info(MNC_MAX_ID,MNC_MAX_INFO) |
80 |
|
|
integer mnc_fg_ids(MNC_MAX_ID,MNC_MAX_INFO) |
81 |
|
|
integer mnc_fd_ind(MNC_MAX_ID,MNC_MAX_INFO) |
82 |
|
|
integer mnc_fv_ids(MNC_MAX_ID,MNC_MAX_INFO) |
83 |
|
|
integer mnc_d_size(MNC_MAX_ID) |
84 |
|
|
|
85 |
|
|
|
86 |
|
|
CEH3 ;;; Local Variables: *** |
87 |
|
|
CEH3 ;;; mode:fortran *** |
88 |
|
|
CEH3 ;;; End: *** |