module_netcdf_nf_data.F90
Module netcdf_nf_data
! Module for Netcdf FORTRAN 2003 nf parameters. This includes all the
! error condition parameters, external data types, fill values etc.
! for netCDF2,3,4
! Written by: Richard Weed, Ph.D.
! Center for Advanced Vehicular Systems
! Mississippi State University
! rweed@cavs.msstate.edu
! License (and other Lawyer Language)
! This software is released under the Apache 2.0 Open Source License. The
! full text of the License can be viewed at :
!
! http:www.apache.org/licenses/LICENSE-2.0.html
!
! The author grants to the University Corporation for Atmospheric Research
! (UCAR), Boulder, CO, USA the right to revise and extend the software
! without restriction. However, the author retains all copyrights and
! intellectual property rights explicitly stated in or implied by the
! Apache license
! Version 1. Sept. 2005 - initial Cray X1 version for netcdf 3.6,0
! Version 2. Apr. 2005 - updated to be consistent with netcdf 3.6.1
! Version 3. Apr. 2009 - updated for netCDF 4.0.1
! Version 4. Apr. 2010 - updated for netCDF 4.1.1
! Version 5. Feb. 2013 - Updated for netCDF 4.4
! This module is provided as a replacement for parts of the netcdf2.inc,
! netcdf3.inc and netcdf4.inc include files. It does not include the
! external statements for the nf_ functions. The latter are not needed
! if you use the interfaces in module_netcdf_nf_interfaces. If you
! want the externals, just use the include files.
USE netcdf_nc_data
Implicit NONE
#include "nfconfig.inc"
! Define values found in netcdf2.inc, netcdf3.inc, and netcdf4.inc
! Also some additional values from the NC_DATA interfaces
!
! Define enumerator nc_type data as integers
Integer, Parameter :: nf_nat = nc_nat
Integer, Parameter :: nf_byte = nc_byte
Integer, Parameter :: nf_int1 = nf_byte
Integer, Parameter :: nf_char = nc_char
Integer, Parameter :: nf_short = nc_short
Integer, Parameter :: nf_int2 = nf_short
Integer, Parameter :: nf_int = nc_int
Integer, Parameter :: nf_float = nc_float
Integer, Parameter :: nf_real = nf_float
Integer, Parameter :: nf_double = nc_double
! Default fill values
Integer, Parameter :: nf_fill_char = iachar(nc_fill_char)
Integer(IK1), Parameter :: nf_fill_byte = nc_fill_byte
Integer(IK2), Parameter :: nf_fill_short = nc_fill_short
Integer, Parameter :: nf_fill_int = nc_fill_int
Real(RK4), Parameter :: nf_fill_float = nc_fill_float
Real(RK4), Parameter :: nf_fill_real = nf_fill_float
Real(RK4), Parameter :: nf_fill_real4 = nf_fill_float
Real(RK8), Parameter :: nf_fill_double = nc_fill_double
Real(RK8), Parameter :: nf_fill_real8 = nf_fill_double
! Mode flags for opening and creating datasets
Integer, Parameter :: nf_nowrite = nc_nowrite
Integer, Parameter :: nf_write = nc_write
Integer, Parameter :: nf_clobber = nc_clobber
Integer, Parameter :: nf_noclobber = nc_noclobber
Integer, Parameter :: nf_fill = nc_fill
Integer, Parameter :: nf_nofill = nc_nofill
Integer, Parameter :: nf_lock = nc_lock
Integer, Parameter :: nf_share = nc_share
Integer, Parameter :: nf_strict_nc3 = nc_strict_nc3
Integer, Parameter :: nf_64bit_offset = nc_64bit_offset
Integer, Parameter :: nf_sizehint_default = nc_sizehint_default
Integer, Parameter :: nf_align_chunk = nc_align_chunk
Integer, Parameter :: nf_format_classic = nc_format_classic
Integer, Parameter :: nf_format_64bit = nc_format_64bit
Integer, Parameter :: nf_diskless = nc_diskless
Integer, Parameter :: nf_mmap = nc_mmap
! Unlimited dimension size argument and global attibute ID
Integer, Parameter :: nf_unlimited = nc_unlimited
Integer, Parameter :: nf_global = nc_global
! Implementation limits (WARNING! SHOULD BE THE SAME AS C INTERFACE)
Integer, Parameter :: nf_max_dims = nc_max_dims
Integer, Parameter :: nf_max_attrs = nc_max_attrs
Integer, Parameter :: nf_max_vars = nc_max_vars
Integer, Parameter :: nf_max_name = nc_max_name
Integer, Parameter :: nf_max_var_dims = nc_max_dims
! Error codes
Integer, Parameter :: nf_noerr = nc_noerr
Integer, Parameter :: nf2_err = nc2_err
Integer, Parameter :: nf_syserr = nc_syserr
Integer, Parameter :: nf_exdr = nc_exdr
Integer, Parameter :: nf_ebadid = nc_ebadid
Integer, Parameter :: nf_ebfile = nc_ebfile
Integer, Parameter :: nf_eexist = nc_eexist
Integer, Parameter :: nf_einval = nc_einval
Integer, Parameter :: nf_eperm = nc_eperm
Integer, Parameter :: nf_enotindefine = nc_enotindefine
Integer, Parameter :: nf_eindefine = nc_eindefine
Integer, Parameter :: nf_einvalcoords = nc_einvalcoords
Integer, Parameter :: nf_emaxdims = nc_emaxdims
Integer, Parameter :: nf_enameinuse = nc_enameinuse
Integer, Parameter :: nf_enotatt = nc_enotatt
Integer, Parameter :: nf_emaxatts = nc_emaxatts
Integer, Parameter :: nf_ebadtype = nc_ebadtype
Integer, Parameter :: nf_ebaddim = nc_ebaddim
Integer, Parameter :: nf_eunlimpos = nc_eunlimpos
Integer, Parameter :: nf_emaxvars = nc_emaxvars
Integer, Parameter :: nf_enotvar = nc_enotvar
Integer, Parameter :: nf_eglobal = nc_eglobal
Integer, Parameter :: nf_enotnc = nc_enotnc
Integer, Parameter :: nf_ests = nc_ests
Integer, Parameter :: nf_emaxname = nc_emaxname
Integer, Parameter :: nf_eunlimit = nc_eunlimit
Integer, Parameter :: nf_enorecvars = nc_enorecvars
Integer, Parameter :: nf_echar = nc_echar
Integer, Parameter :: nf_eedge = nc_eedge
Integer, Parameter :: nf_estride = nc_estride
Integer, Parameter :: nf_ebadname = nc_ebadname
Integer, Parameter :: nf_erange = nc_erange
Integer, Parameter :: nf_enomem = nc_enomem
Integer, Parameter :: nf_evarsize = nc_evarsize
Integer, Parameter :: nf_edimsize = nc_edimsize
Integer, Parameter :: nf_etrunc = nc_etrunc
! Error handling codes
Integer, Parameter :: nf_fatal = nc_fatal
Integer, Parameter :: nf_verbose = nc_verbose
#ifdef USE_NETCDF4
! NETCDF4 parameters
! data types
Integer, Parameter :: nf_long = nc_long
Integer, Parameter :: nf_ubyte = nc_ubyte
Integer, Parameter :: nf_ushort = nc_ushort
Integer, Parameter :: nf_uint = nc_uint
Integer, Parameter :: nf_int64 = nc_int64
Integer, Parameter :: nf_uint64 = nc_uint64
Integer, Parameter :: nf_string = nc_string
Integer, Parameter :: nf_vlen = nc_vlen
Integer, Parameter :: nf_opaque = nc_opaque
Integer, Parameter :: nf_enum = nc_enum
Integer, Parameter :: nf_compound = nc_compound
! Netcdf4 fill flags - for some reason the F90 values are different
Integer, Parameter :: nf_fill_ubyte = nc_fill_ubyte
Integer, Parameter :: nf_fill_uint1 = nf_fill_ubyte
Integer, Parameter :: nf_fill_ushort = nc_fill_ushort
Integer, Parameter :: nf_fill_uint2 = nf_fill_ushort
Integer(IK8), Parameter :: nf_fill_uint = nc_fill_uint
Integer(IK8), Parameter :: nf_fill_int64 = nc_fill_int64
! new format types
Integer, Parameter :: nf_format_netcdf4 = nc_format_netcdf4
Integer, Parameter :: nf_format_netcdf4_classic = nc_format_netcdf4_classic
! Netcdf4 create mode flags
Integer, Parameter :: nf_netcdf4 = nc_netcdf4
Integer, Parameter :: nf_hdf5 = nf_netcdf4 ! deprecated
Integer, Parameter :: nf_classic_model = nc_classic_model
! Netcdf4 variable flags
Integer, Parameter :: nf_chunk_seq = nc_chunk_seq
Integer, Parameter :: nf_chunk_sub = nc_chunk_sub
Integer, Parameter :: nf_chunk_sizes = nc_chunk_sizes
Integer, Parameter :: nf_endian_native = nc_endian_native
Integer, Parameter :: nf_endian_little = nc_endian_little
Integer, Parameter :: nf_endian_big = nc_endian_big
Integer, Parameter :: nf_chunked = nc_chunked
Integer, Parameter :: nf_notcontiguous = nc_notcontiguous
Integer, Parameter :: nf_contiguous = nc_contiguous
Integer, Parameter :: nf_nochecksum = nc_nochecksum
Integer, Parameter :: nf_fletcher32 = nc_fletcher32
Integer, Parameter :: nf_noshuffle = nc_noshuffle
Integer, Parameter :: nf_shuffle = nc_shuffle
Integer, Parameter :: nf_independent = nc_independent
Integer, Parameter :: nf_collective = nc_collective
! Flags for parallel I/O
Integer, Parameter :: nf_mpiio = nc_mpiio
Integer, Parameter :: nf_mpiposix = nc_mpiposix
Integer, Parameter :: nf_pnetcdf = nc_pnetcdf
! SZIP flags
Integer, Parameter :: nf_szip_ec_option_mask = nc_szip_ec_option_mask
Integer, Parameter :: nf_szip_nn_option_mask = nc_szip_nn_option_mask
! Netcdf4 error flags
Integer, Parameter :: nf_ehdferr = nc_ehdferr
Integer, Parameter :: nf_ecantread = nc_ecantread
Integer, Parameter :: nf_ecantwrite = nc_ecantwrite
Integer, Parameter :: nf_ecantcreate = nc_ecantcreate
Integer, Parameter :: nf_efilemeta = nc_efilemeta
Integer, Parameter :: nf_edimmeta = nc_edimmeta
Integer, Parameter :: nf_eattmeta = nc_eattmeta
Integer, Parameter :: nf_evarmeta = nc_evarmeta
Integer, Parameter :: nf_enocompound = nc_enocompound
Integer, Parameter :: nf_eattexists = nc_eattexists
Integer, Parameter :: nf_enotnc4 = nc_enotnc4
Integer, Parameter :: nf_estrictnc3 = nc_estrictnc3
Integer, Parameter :: nf_enotnc3 = nc_enotnc3
Integer, Parameter :: nf_enopar = nc_enopar
Integer, Parameter :: nf_eparinit = nc_eparinit
Integer, Parameter :: nf_ebadgrpid = nc_ebadgrpid
Integer, Parameter :: nf_ebadtypid = nc_ebadtypid
Integer, Parameter :: nf_etypdefined = nc_etypdefined
Integer, Parameter :: nf_ebadfield = nc_ebadfield
Integer, Parameter :: nf_ebadclass = nc_ebadclass
Integer, Parameter :: nf_emaptype = nc_emaptype
Integer, Parameter :: nf_elatefill = nc_elatefill
Integer, Parameter :: nf_elatedef = nc_elatedef
Integer, Parameter :: nf_edimscale = nc_edimscale
Integer, Parameter :: nf_enogrp = nc_enogrp
#endif
#ifndef NO_NETCDF_2
! V2 interface values
Integer, Parameter :: ncbyte = nf_byte
Integer, Parameter :: ncchar = nf_char
Integer, Parameter :: ncshort = nf_short
Integer, Parameter :: nclong = nf_int
Integer, Parameter :: ncfloat = nf_float
Integer, Parameter :: ncdouble = nf_double
Integer, Parameter :: ncrdwr = nf_write
Integer, Parameter :: nccreate = 2
Integer, Parameter :: ncexcl = 4
Integer, Parameter :: ncindef = 8
Integer, Parameter :: ncnsync = 16
Integer, Parameter :: nchsync = 32
Integer, Parameter :: ncndirty = 64
Integer, Parameter :: nchdirty = 128
Integer, Parameter :: ncfill = nf_fill
Integer, Parameter :: ncnofill = nf_nofill
Integer, Parameter :: nclink = 32768
Integer, Parameter :: ncnowrit = nf_nowrite
Integer, Parameter :: ncwrite = nf_write
Integer, Parameter :: ncclob = nf_clobber
Integer, Parameter :: ncnoclob = nf_noclobber
Integer, Parameter :: ncunlim = nf_unlimited
Integer, Parameter :: ncglobal = nf_global
Integer, Parameter :: maxncop = 64
Integer, Parameter :: maxncdim = nf_max_dims
Integer, Parameter :: maxncatt = nf_max_attrs
Integer, Parameter :: maxncvar = nf_max_vars
Integer, Parameter :: maxncnam = nf_max_name
Integer, Parameter :: maxvdims = maxncdim
Integer, Parameter :: ncnoerr = nf_noerr
Integer, Parameter :: ncebadid = nf_ebadid
Integer, Parameter :: ncenfile = -31
Integer, Parameter :: nceexist = nf_eexist
Integer, Parameter :: nceinval = nf_einval
Integer, Parameter :: nceperm = nf_eperm
Integer, Parameter :: ncenotin = nf_enotindefine
Integer, Parameter :: nceindef = nf_eindefine
Integer, Parameter :: ncecoord = nf_einvalcoords
Integer, Parameter :: ncemaxds = nf_emaxdims
Integer, Parameter :: ncename = nf_enameinuse
Integer, Parameter :: ncemaxat = nf_emaxatts
Integer, Parameter :: ncebadty = nf_ebadtype
Integer, Parameter :: ncebadd = nf_ebaddim
Integer, Parameter :: nceunlim = nf_eunlimpos
Integer, Parameter :: ncemaxvs = nf_emaxvars
Integer, Parameter :: ncenotvr = nf_enotvar
Integer, Parameter :: nceglob = nf_eglobal
Integer, Parameter :: ncnotnc = nf_enotnc
Integer, Parameter :: ncestc = nf_ests
Integer, Parameter :: ncentool = nf_emaxname
Integer, Parameter :: ncfoobar = 32
Integer, Parameter :: ncsyserr = nf_syserr
Integer, Parameter :: ncfatal = nf_fatal
Integer, Parameter :: ncverbos = nf_verbose
Integer, Parameter :: filchar = nf_fill_char
Integer(IK1), Parameter :: filbyte = nf_fill_byte
Integer(IK2), Parameter :: filshort = nf_fill_short
Integer, Parameter :: fillong = nf_fill_int
Real(RK4), Parameter :: filfloat = nf_fill_float
Real(RK8), Parameter :: fildoub = nf_fill_double
#endif
!------------------------------------------------------------------------------
End Module netcdf_nf_data

Return to the Main Unidata NetCDF page.