NetCDF-Fortran  4.4.4
netcdf_constants.f90
Go to the documentation of this file.
1  !
2  ! external netcdf data types:
3  !
4  integer, parameter, public :: &
5  nf90_byte = 1, &
6  nf90_int1 = nf90_byte, &
7  nf90_char = 2, &
8  nf90_short = 3, &
9  nf90_int2 = nf90_short, &
10  nf90_int = 4, &
11  nf90_int4 = nf90_int, &
12  nf90_float = 5, &
13  nf90_real = nf90_float, &
14  nf90_real4 = nf90_float, &
15  nf90_double = 6, &
16  nf90_real8 = nf90_double
17 
18  !
19  ! default fill values:
20  !
21  character (len = 1), parameter, public :: &
22  nf90_fill_char = achar(0)
23  integer (kind = OneByteInt), parameter, public :: &
24  nf90_fill_byte = -127, &
25  nf90_fill_int1 = nf90_fill_byte
26  integer (kind = TwoByteInt), parameter, public :: &
27  nf90_fill_short = -32767, &
28  nf90_fill_int2 = nf90_fill_short
29  integer (kind = FourByteInt), parameter, public :: &
30  nf90_fill_int = -2147483647
31  real (kind = FourByteReal), parameter, public :: &
32  nf90_fill_float = 9.9692099683868690e+36, &
33  nf90_fill_real = nf90_fill_float, &
34  nf90_fill_real4 = nf90_fill_float
35  real (kind = EightByteReal), parameter, public :: &
36  nf90_fill_double = 9.9692099683868690e+36, &
37  nf90_fill_real8 = nf90_fill_double
38 
39  !
40  ! mode flags for opening and creating a netcdf dataset:
41  !
42  integer, parameter, public :: &
43  nf90_nowrite = 0, &
44  nf90_write = 1, &
45  nf90_clobber = 0, &
46  nf90_noclobber = 4, &
47  nf90_fill = 0, &
48  nf90_nofill = 256, &
49  nf90_64bit_offset = 512, &
50  nf90_lock = 1024, &
51  nf90_share = 2048, &
52  nf90_diskless = 8, &
53  nf90_mmap = 16
54 
55  integer, parameter, public :: &
56  nf90_sizehint_default = 0, &
57  nf90_align_chunk = -1
58 
59  !
60  ! size argument for defining an unlimited dimension:
61  !
62  integer, parameter, public :: nf90_unlimited = 0
63 
64  !
65  ! global attribute id:
66  !
67  integer, parameter, public :: nf90_global = 0
68 
69  !
70  ! implementation limits:
71  !
72  integer, parameter, public :: &
73  nf90_max_dims = 1024, &
74  nf90_max_attrs = 8192, &
75  nf90_max_vars = 8192, &
76  nf90_max_name = 256, &
77  nf90_max_var_dims = 1024
78 
79  !
80  ! error codes:
81  !
82  integer, parameter, public :: &
83  nf90_noerr = 0, & ! No Error
84  nf90_ebadid = -33, & ! Not a valid ID
85  nf90_eexist = -35, & ! netcdf file exists && NF90_NOCLOBBER
86  nf90_einval = -36, & ! Invalid Argument
87  nf90_eperm = -37, & ! Write to read only
88  nf90_enotindefine = -38, & ! Operation not allowed in data mode
89  nf90_eindefine = -39, & ! Operation not allowed in define mode
90  nf90_einvalcoords = -40, & ! Index exceeds dimension bound
91  nf90_emaxdims = -41, & ! nf90_max_dims exceeded
92  nf90_enameinuse = -42, & ! String match to name in use
93  nf90_enotatt = -43, & ! Attribute not found
94  nf90_emaxatts = -44, & ! nf90_max_attrs exceeded
95  nf90_ebadtype = -45, & ! Not a netcdf data type
96  nf90_ebaddim = -46, & ! Invalid dimension id or name
97  nf90_eunlimpos = -47, & ! nf90_unlimited in the wrong index
98  nf90_emaxvars = -48, & ! nf90_max_vars exceeded
99  nf90_enotvar = -49, & ! The variable ID is invalid for the specified netCDF dataset.
100  nf90_eglobal = -50, & ! Action prohibited on nf90_global varid
101  nf90_enotnc = -51, & ! Not a netcdf file
102  nf90_ests = -52, & ! In Fortran, string too short
103  nf90_emaxname = -53, & ! nf90_max_name exceeded
104  nf90_eunlimit = -54, & ! nf90_unlimited size already in use
105  nf90_enorecvars = -55, & ! nc_rec op when there are no record vars
106  nf90_echar = -56, & ! Attempt to convert between text & numbers
107  nf90_eedge = -57, & ! Start+count exceeds dimension bound
108  nf90_estride = -58, & ! Illegal stride
109  nf90_ebadname = -59, & ! Attribute or variable name contains illegal characters
110  nf90_erange = -60, & ! Math result not representable
111  nf90_enomem = -61, & ! Memory allocation (malloc) failure
112  nf90_evarsize = -62, & ! One or more variable sizes violate format constraints
113  nf90_edimsize = -63, & ! Invalid dimension size
114  nf90_etrunc = -64, & ! File likely truncated or possibly corrupted
115  nf90_eaxistype = -65 ! Unknown axis type.
116  !
117  ! more error codes for DAP
118  !
119  integer, parameter, public :: &
120  nf90_edap = -66, & ! Generic DAP error
121  nf90_ecurl = -67, & ! Generic libcurl error
122  nf90_eio = -68, & ! Generic IO error
123  nf90_enodata = -69, & ! Attempt to access variable with no data
124  nf90_edapsvc = -70, & ! DAP server error
125  nf90_edas = -71, & ! Malformed or inaccessible DAS
126  nf90_edds = -72, & ! Malformed or inaccessible DDS
127  nf90_edatadds = -73, & ! Malformed or inaccessible DATADDS
128  nf90_edapurl = -74, & ! Malformed DAP URL
129  nf90_edapconstraint = -75, & ! Malformed DAP Constrain
130  nf90_etranslation = -76, & ! Untranslatable construct
131  nf904_first_error = -100
132  !
133  ! error codes for netCDF-4
134  !
135 integer, parameter, public :: &
136  nf90_ehdferr = -101, & ! Error at HDF5 layer.
137  nf90_ecantread = -102, & ! Can't read.
138  nf90_ecantwrite = -103, & ! Can't write.
139  nf90_ecantcreate = -104, & ! Can't create.
140  nf90_efilemeta = -105, & ! Problem with file metadata.
141  nf90_edimmeta = -106, & ! Problem with dimension metadata.
142  nf90_eattmeta = -107, & ! Problem with attribute metadata.
143  nf90_evarmeta = -108, & ! Problem with variable metadata.
144  nf90_enocompound = -109, & ! Not a compound type.
145  nf90_eattexists = -110, & ! Attribute already exists.
146  nf90_enotnc4 = -111, & ! Attempting netcdf-4 operation on netcdf-3 file.
147  nf90_estrictnc3 = -112, & ! Attempting netcdf-4 operation on strict nc3 netcdf-4 file.
148  nf90_enotnc3 = -113, & ! Attempting netcdf-3 operation on netcdf-4 file.
149  nf90_enopar = -114, & ! Parallel operation on file opened for non-parallel access.
150  nf90_eparinit = -115, & ! Error initializing for parallel access.
151  nf90_ebadgrpid = -116, & ! Bad group ID.
152  nf90_ebadtypid = -117, & ! Bad type ID.
153  nf90_etypdefined = -118, & ! Type has already been defined and may not be edited.
154  nf90_ebadfield = -119, & ! Bad field ID.
155  nf90_ebadclass = -120, & ! Bad class.
156  nf90_emaptype = -121, & ! Mapped access for atomic types only.
157  nf90_elatefill = -122, & ! Attempt to define fill value when data already exists.
158  nf90_elatedef = -123, & ! Attempt to define var properties, like deflate, after enddef.
159  nf90_edimscale = -124, & ! Probem with HDF5 dimscales.
160  nf90_enogrp = -125, & ! No group found.
161  nf90_estorage = -126, & ! Can't specify both contiguous and chunking.
162  nf90_ebadchunk = -127, & ! Bad chunksize.
163  nf90_enotbuilt = -128, & ! Attempt to use feature that was not turned on when netCDF was built.
164  nf90_ediskless = -129, & ! Error in using diskless access.
165  nf90_ecantextend = -130, & ! Attempt to extend dataset during ind. I/O operation.
166  nf90_empi = -131, & ! MPI operation failed.
167  nf904_last_error = -131
168 
169  !
170  ! error handling modes:
171  !
172  integer, parameter, public :: &
173  nf90_fatal = 1, &
174  nf90_verbose = 2
175 
176  !
177  ! format version numbers:
178  !
179  integer, parameter, public :: &
180  nf90_format_classic = 1, &
181  nf90_format_64bit = 2, &
182  nf90_format_netcdf4 = 3, &
183  nf90_format_netcdf4_classic = 4
184 
185 ! extra data types:
186 integer, parameter, public :: &
187  nf90_ubyte = 7, &
188  nf90_ushort = 8, &
189  nf90_uint = 9, &
190  nf90_int64 = 10, &
191  nf90_uint64 = 11, &
192  nf90_string = 12, &
193  nf90_vlen = 13, &
194  nf90_opaque = 14, &
195  nf90_enum = 15, &
196  nf90_compound = 16
197 
198 
199 ! extra default fill values:
200 integer (kind = TwoByteInt), parameter, public :: &
201  nf90_fill_ubyte = 255, &
202  nf90_fill_uint1 = nf90_fill_ubyte
203 integer (kind = FourByteInt), parameter, public :: &
204  nf90_fill_ushort = 65535, &
205  nf90_fill_uint2 = nf90_fill_ushort
206 integer (kind = EightByteInt), parameter, public :: &
207  nf90_fill_uint = 4294967295_eightbyteint
208 
209 ! Extra file create mode flags.
210 integer, parameter, public :: &
211  nf90_netcdf4 = 4096, &
212  nf90_hdf5 = 4096, & ! deprecated
213  nf90_classic_model = 256
214 
215 ! Flags for parallel access.
216 integer, parameter, public :: nf90_independent = 0, nf90_collective = 1
217 
218 ! Flags for parallel I/O.
219 integer, parameter, public :: nf90_mpiio = 8192, nf90_mpiposix = 16384, &
220  nf90_pnetcdf = 32768
221 
222 ! Extra variable flags.
223 integer, parameter, public :: &
224  nf90_chunk_seq = 0, &
225  nf90_chunk_sub = 1, &
226  nf90_chunk_sizes = 2, &
227  nf90_endian_native = 0, &
228  nf90_endian_little = 1, &
229  nf90_endian_big = 2, &
230  nf90_chunked = 0, &
231  nf90_notcontiguous = 0, &
232  nf90_contiguous = 1, &
233  nf90_nochecksum = 0, &
234  nf90_fletcher32 = 1, &
235  nf90_noshuffle = 0, &
236  nf90_shuffle = 1, &
237  nf90_szip_ec_option_mask = 4, &
238  nf90_szip_nn_option_mask = 32
239 
240 ! This is the position of NC_NETCDF4 in cmode, counting from the
241 ! right, starting (uncharacteristically for fortran) at 0. It's needed
242 ! for the BTEST function calls.
243 integer, parameter, private :: netcdf4_bit = 12

Return to the Main Unidata NetCDF page.
Generated on Fri Aug 4 2017 17:20:58 for NetCDF-Fortran. NetCDF is a Unidata library.