NetCDF-Fortran  4.4.3
module_netcdf_nf_data.F90
1 Module netcdf_nf_data
2 
3 ! Module for Netcdf FORTRAN 2003 nf parameters. This includes all the
4 ! error condition parameters, external data types, fill values etc.
5 ! for netCDF2,3,4
6 
7 ! Written by: Richard Weed, Ph.D.
8 ! Center for Advanced Vehicular Systems
9 ! Mississippi State University
10 ! rweed@cavs.msstate.edu
11 
12 
13 ! License (and other Lawyer Language)
14 
15 ! This software is released under the Apache 2.0 Open Source License. The
16 ! full text of the License can be viewed at :
17 !
18 ! http:www.apache.org/licenses/LICENSE-2.0.html
19 !
20 ! The author grants to the University Corporation for Atmospheric Research
21 ! (UCAR), Boulder, CO, USA the right to revise and extend the software
22 ! without restriction. However, the author retains all copyrights and
23 ! intellectual property rights explicitly stated in or implied by the
24 ! Apache license
25 
26 ! Version 1. Sept. 2005 - initial Cray X1 version for netcdf 3.6,0
27 ! Version 2. Apr. 2005 - updated to be consistent with netcdf 3.6.1
28 ! Version 3. Apr. 2009 - updated for netCDF 4.0.1
29 ! Version 4. Apr. 2010 - updated for netCDF 4.1.1
30 ! Version 5. Feb. 2013 - Updated for netCDF 4.4
31 
32 ! This module is provided as a replacement for parts of the netcdf2.inc,
33 ! netcdf3.inc and netcdf4.inc include files. It does not include the
34 ! external statements for the nf_ functions. The latter are not needed
35 ! if you use the interfaces in module_netcdf_nf_interfaces. If you
36 ! want the externals, just use the include files.
37 
38  USE netcdf_nc_data
39 
40  Implicit NONE
41 
42 #include "nfconfig.inc"
43 
44 ! Define values found in netcdf2.inc, netcdf3.inc, and netcdf4.inc
45 ! Also some additional values from the NC_DATA interfaces
46 !
47 ! Define enumerator nc_type data as integers
48 
49  Integer, Parameter :: nf_nat = nc_nat
50  Integer, Parameter :: nf_byte = nc_byte
51  Integer, Parameter :: nf_int1 = nf_byte
52  Integer, Parameter :: nf_char = nc_char
53  Integer, Parameter :: nf_short = nc_short
54  Integer, Parameter :: nf_int2 = nf_short
55  Integer, Parameter :: nf_int = nc_int
56  Integer, Parameter :: nf_float = nc_float
57  Integer, Parameter :: nf_real = nf_float
58  Integer, Parameter :: nf_double = nc_double
59 
60 ! Default fill values
61 
62  Integer, Parameter :: nf_fill_char = iachar(nc_fill_char)
63  Integer(IK1), Parameter :: nf_fill_byte = nc_fill_byte
64  Integer(IK2), Parameter :: nf_fill_short = nc_fill_short
65  Integer, Parameter :: nf_fill_int = nc_fill_int
66 
67  Real(RK4), Parameter :: nf_fill_float = nc_fill_float
68  Real(RK4), Parameter :: nf_fill_real = nf_fill_float
69  Real(RK4), Parameter :: nf_fill_real4 = nf_fill_float
70  Real(RK8), Parameter :: nf_fill_double = nc_fill_double
71  Real(RK8), Parameter :: nf_fill_real8 = nf_fill_double
72 
73 ! Mode flags for opening and creating datasets
74 
75  Integer, Parameter :: nf_nowrite = nc_nowrite
76  Integer, Parameter :: nf_write = nc_write
77  Integer, Parameter :: nf_clobber = nc_clobber
78  Integer, Parameter :: nf_noclobber = nc_noclobber
79  Integer, Parameter :: nf_fill = nc_fill
80  Integer, Parameter :: nf_nofill = nc_nofill
81  Integer, Parameter :: nf_lock = nc_lock
82  Integer, Parameter :: nf_share = nc_share
83  Integer, Parameter :: nf_strict_nc3 = nc_strict_nc3
84  Integer, Parameter :: nf_64bit_offset = nc_64bit_offset
85  Integer, Parameter :: nf_sizehint_default = nc_sizehint_default
86  Integer, Parameter :: nf_align_chunk = nc_align_chunk
87  Integer, Parameter :: nf_format_classic = nc_format_classic
88  Integer, Parameter :: nf_format_64bit = nc_format_64bit
89  Integer, Parameter :: nf_diskless = nc_diskless
90  Integer, Parameter :: nf_mmap = nc_mmap
91 
92 ! Unlimited dimension size argument and global attibute ID
93 
94  Integer, Parameter :: nf_unlimited = nc_unlimited
95  Integer, Parameter :: nf_global = nc_global
96 
97 ! Implementation limits (WARNING! SHOULD BE THE SAME AS C INTERFACE)
98 
99  Integer, Parameter :: nf_max_dims = nc_max_dims
100  Integer, Parameter :: nf_max_attrs = nc_max_attrs
101  Integer, Parameter :: nf_max_vars = nc_max_vars
102  Integer, Parameter :: nf_max_name = nc_max_name
103  Integer, Parameter :: nf_max_var_dims = nc_max_dims
104 
105 ! Error codes
106 
107  Integer, Parameter :: nf_noerr = nc_noerr
108  Integer, Parameter :: nf2_err = nc2_err
109  Integer, Parameter :: nf_syserr = nc_syserr
110  Integer, Parameter :: nf_exdr = nc_exdr
111  Integer, Parameter :: nf_ebadid = nc_ebadid
112  Integer, Parameter :: nf_ebfile = nc_ebfile
113  Integer, Parameter :: nf_eexist = nc_eexist
114  Integer, Parameter :: nf_einval = nc_einval
115  Integer, Parameter :: nf_eperm = nc_eperm
116  Integer, Parameter :: nf_enotindefine = nc_enotindefine
117  Integer, Parameter :: nf_eindefine = nc_eindefine
118  Integer, Parameter :: nf_einvalcoords = nc_einvalcoords
119  Integer, Parameter :: nf_emaxdims = nc_emaxdims
120  Integer, Parameter :: nf_enameinuse = nc_enameinuse
121  Integer, Parameter :: nf_enotatt = nc_enotatt
122  Integer, Parameter :: nf_emaxatts = nc_emaxatts
123  Integer, Parameter :: nf_ebadtype = nc_ebadtype
124  Integer, Parameter :: nf_ebaddim = nc_ebaddim
125  Integer, Parameter :: nf_eunlimpos = nc_eunlimpos
126  Integer, Parameter :: nf_emaxvars = nc_emaxvars
127  Integer, Parameter :: nf_enotvar = nc_enotvar
128  Integer, Parameter :: nf_eglobal = nc_eglobal
129  Integer, Parameter :: nf_enotnc = nc_enotnc
130  Integer, Parameter :: nf_ests = nc_ests
131  Integer, Parameter :: nf_emaxname = nc_emaxname
132  Integer, Parameter :: nf_eunlimit = nc_eunlimit
133  Integer, Parameter :: nf_enorecvars = nc_enorecvars
134 
135  Integer, Parameter :: nf_echar = nc_echar
136  Integer, Parameter :: nf_eedge = nc_eedge
137  Integer, Parameter :: nf_estride = nc_estride
138  Integer, Parameter :: nf_ebadname = nc_ebadname
139  Integer, Parameter :: nf_erange = nc_erange
140  Integer, Parameter :: nf_enomem = nc_enomem
141  Integer, Parameter :: nf_evarsize = nc_evarsize
142  Integer, Parameter :: nf_edimsize = nc_edimsize
143  Integer, Parameter :: nf_etrunc = nc_etrunc
144 
145 ! Error handling codes
146 
147  Integer, Parameter :: nf_fatal = nc_fatal
148  Integer, Parameter :: nf_verbose = nc_verbose
149 
150 #ifdef USE_NETCDF4
151 
152 ! NETCDF4 parameters
153 
154 ! data types
155 
156  Integer, Parameter :: nf_long = nc_long
157  Integer, Parameter :: nf_ubyte = nc_ubyte
158  Integer, Parameter :: nf_ushort = nc_ushort
159  Integer, Parameter :: nf_uint = nc_uint
160  Integer, Parameter :: nf_int64 = nc_int64
161  Integer, Parameter :: nf_uint64 = nc_uint64
162  Integer, Parameter :: nf_string = nc_string
163  Integer, Parameter :: nf_vlen = nc_vlen
164  Integer, Parameter :: nf_opaque = nc_opaque
165  Integer, Parameter :: nf_enum = nc_enum
166  Integer, Parameter :: nf_compound = nc_compound
167 
168 ! Netcdf4 fill flags - for some reason the F90 values are different
169 
170  Integer, Parameter :: nf_fill_ubyte = nc_fill_ubyte
171  Integer, Parameter :: nf_fill_uint1 = nf_fill_ubyte
172  Integer, Parameter :: nf_fill_ushort = nc_fill_ushort
173  Integer, Parameter :: nf_fill_uint2 = nf_fill_ushort
174  Integer(IK8), Parameter :: nf_fill_uint = nc_fill_uint
175  Integer(IK8), Parameter :: nf_fill_int64 = nc_fill_int64
176 
177 ! new format types
178  Integer, Parameter :: nf_format_netcdf4 = nc_format_netcdf4
179  Integer, Parameter :: nf_format_netcdf4_classic = nc_format_netcdf4_classic
180 
181 ! Netcdf4 create mode flags
182  Integer, Parameter :: nf_netcdf4 = nc_netcdf4
183  Integer, Parameter :: nf_hdf5 = nf_netcdf4 ! deprecated
184  Integer, Parameter :: nf_classic_model = nc_classic_model
185 ! Netcdf4 variable flags
186  Integer, Parameter :: nf_chunk_seq = nc_chunk_seq
187  Integer, Parameter :: nf_chunk_sub = nc_chunk_sub
188  Integer, Parameter :: nf_chunk_sizes = nc_chunk_sizes
189  Integer, Parameter :: nf_endian_native = nc_endian_native
190  Integer, Parameter :: nf_endian_little = nc_endian_little
191  Integer, Parameter :: nf_endian_big = nc_endian_big
192  Integer, Parameter :: nf_chunked = nc_chunked
193  Integer, Parameter :: nf_notcontiguous = nc_notcontiguous
194  Integer, Parameter :: nf_contiguous = nc_contiguous
195  Integer, Parameter :: nf_nochecksum = nc_nochecksum
196  Integer, Parameter :: nf_fletcher32 = nc_fletcher32
197  Integer, Parameter :: nf_noshuffle = nc_noshuffle
198  Integer, Parameter :: nf_shuffle = nc_shuffle
199  Integer, Parameter :: nf_independent = nc_independent
200  Integer, Parameter :: nf_collective = nc_collective
201 
202 ! Flags for parallel I/O
203 
204  Integer, Parameter :: nf_mpiio = nc_mpiio
205  Integer, Parameter :: nf_mpiposix = nc_mpiposix
206  Integer, Parameter :: nf_pnetcdf = nc_pnetcdf
207 
208 ! SZIP flags
209 
210  Integer, Parameter :: nf_szip_ec_option_mask = nc_szip_ec_option_mask
211  Integer, Parameter :: nf_szip_nn_option_mask = nc_szip_nn_option_mask
212 
213 ! Netcdf4 error flags
214 
215  Integer, Parameter :: nf_ehdferr = nc_ehdferr
216  Integer, Parameter :: nf_ecantread = nc_ecantread
217  Integer, Parameter :: nf_ecantwrite = nc_ecantwrite
218  Integer, Parameter :: nf_ecantcreate = nc_ecantcreate
219  Integer, Parameter :: nf_efilemeta = nc_efilemeta
220  Integer, Parameter :: nf_edimmeta = nc_edimmeta
221  Integer, Parameter :: nf_eattmeta = nc_eattmeta
222  Integer, Parameter :: nf_evarmeta = nc_evarmeta
223  Integer, Parameter :: nf_enocompound = nc_enocompound
224  Integer, Parameter :: nf_eattexists = nc_eattexists
225  Integer, Parameter :: nf_enotnc4 = nc_enotnc4
226  Integer, Parameter :: nf_estrictnc3 = nc_estrictnc3
227  Integer, Parameter :: nf_enotnc3 = nc_enotnc3
228  Integer, Parameter :: nf_enopar = nc_enopar
229  Integer, Parameter :: nf_eparinit = nc_eparinit
230  Integer, Parameter :: nf_ebadgrpid = nc_ebadgrpid
231  Integer, Parameter :: nf_ebadtypid = nc_ebadtypid
232  Integer, Parameter :: nf_etypdefined = nc_etypdefined
233  Integer, Parameter :: nf_ebadfield = nc_ebadfield
234  Integer, Parameter :: nf_ebadclass = nc_ebadclass
235  Integer, Parameter :: nf_emaptype = nc_emaptype
236  Integer, Parameter :: nf_elatefill = nc_elatefill
237  Integer, Parameter :: nf_elatedef = nc_elatedef
238  Integer, Parameter :: nf_edimscale = nc_edimscale
239  Integer, Parameter :: nf_enogrp = nc_enogrp
240 #endif
241 
242 #ifndef NO_NETCDF_2
243 ! V2 interface values
244 
245  Integer, Parameter :: ncbyte = nf_byte
246  Integer, Parameter :: ncchar = nf_char
247  Integer, Parameter :: ncshort = nf_short
248  Integer, Parameter :: nclong = nf_int
249  Integer, Parameter :: ncfloat = nf_float
250  Integer, Parameter :: ncdouble = nf_double
251 
252  Integer, Parameter :: ncrdwr = nf_write
253  Integer, Parameter :: nccreate = 2
254  Integer, Parameter :: ncexcl = 4
255  Integer, Parameter :: ncindef = 8
256  Integer, Parameter :: ncnsync = 16
257  Integer, Parameter :: nchsync = 32
258  Integer, Parameter :: ncndirty = 64
259  Integer, Parameter :: nchdirty = 128
260  Integer, Parameter :: ncfill = nf_fill
261  Integer, Parameter :: ncnofill = nf_nofill
262  Integer, Parameter :: nclink = 32768
263 
264  Integer, Parameter :: ncnowrit = nf_nowrite
265  Integer, Parameter :: ncwrite = nf_write
266  Integer, Parameter :: ncclob = nf_clobber
267  Integer, Parameter :: ncnoclob = nf_noclobber
268 
269  Integer, Parameter :: ncunlim = nf_unlimited
270  Integer, Parameter :: ncglobal = nf_global
271 
272  Integer, Parameter :: maxncop = 64
273  Integer, Parameter :: maxncdim = nf_max_dims
274  Integer, Parameter :: maxncatt = nf_max_attrs
275  Integer, Parameter :: maxncvar = nf_max_vars
276  Integer, Parameter :: maxncnam = nf_max_name
277  Integer, Parameter :: maxvdims = maxncdim
278 
279  Integer, Parameter :: ncnoerr = nf_noerr
280  Integer, Parameter :: ncebadid = nf_ebadid
281  Integer, Parameter :: ncenfile = -31
282  Integer, Parameter :: nceexist = nf_eexist
283  Integer, Parameter :: nceinval = nf_einval
284  Integer, Parameter :: nceperm = nf_eperm
285  Integer, Parameter :: ncenotin = nf_enotindefine
286  Integer, Parameter :: nceindef = nf_eindefine
287  Integer, Parameter :: ncecoord = nf_einvalcoords
288  Integer, Parameter :: ncemaxds = nf_emaxdims
289  Integer, Parameter :: ncename = nf_enameinuse
290  Integer, Parameter :: ncemaxat = nf_emaxatts
291  Integer, Parameter :: ncebadty = nf_ebadtype
292  Integer, Parameter :: ncebadd = nf_ebaddim
293  Integer, Parameter :: nceunlim = nf_eunlimpos
294  Integer, Parameter :: ncemaxvs = nf_emaxvars
295  Integer, Parameter :: ncenotvr = nf_enotvar
296  Integer, Parameter :: nceglob = nf_eglobal
297  Integer, Parameter :: ncnotnc = nf_enotnc
298  Integer, Parameter :: ncestc = nf_ests
299  Integer, Parameter :: ncentool = nf_emaxname
300  Integer, Parameter :: ncfoobar = 32
301  Integer, Parameter :: ncsyserr = nf_syserr
302 
303  Integer, Parameter :: ncfatal = nf_fatal
304  Integer, Parameter :: ncverbos = nf_verbose
305 
306  Integer, Parameter :: filchar = nf_fill_char
307  Integer(IK1), Parameter :: filbyte = nf_fill_byte
308  Integer(IK2), Parameter :: filshort = nf_fill_short
309  Integer, Parameter :: fillong = nf_fill_int
310  Real(RK4), Parameter :: filfloat = nf_fill_float
311  Real(RK8), Parameter :: fildoub = nf_fill_double
312 #endif
313 
314 !------------------------------------------------------------------------------
315 End Module netcdf_nf_data

Return to the Main Unidata NetCDF page.
Generated on Fri Jan 22 2016 10:52:16 for NetCDF-Fortran. NetCDF is a Unidata library.