URI:
       tIO_Flags.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
  HTML git clone git://src.adamsgaard.dk/pism
   DIR Log
   DIR Files
   DIR Refs
   DIR LICENSE
       ---
       tIO_Flags.hh (2793B)
       ---
            1 /* Copyright (C) 2014, 2015, 2018, 2019 PISM Authors
            2  *
            3  * This file is part of PISM.
            4  *
            5  * PISM is free software; you can redistribute it and/or modify it under the
            6  * terms of the GNU General Public License as published by the Free Software
            7  * Foundation; either version 3 of the License, or (at your option) any later
            8  * version.
            9  *
           10  * PISM is distributed in the hope that it will be useful, but WITHOUT ANY
           11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
           12  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
           13  * details.
           14  *
           15  * You should have received a copy of the GNU General Public License
           16  * along with PISM; if not, write to the Free Software
           17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
           18  */
           19 
           20 #ifndef _IO_FLAGS_H_
           21 #define _IO_FLAGS_H_
           22 
           23 namespace pism {
           24 
           25 // I/O Flags used by File and NCFile. They are used in both interfaces,
           26 // but I want to be able to create Python wrappers for File without
           27 // exposing NCFile, and NCFile should compile without File, so it does
           28 // not belong in either File.hh or NCFile.hh.
           29 
           30 // This is a subset of NetCDF data-types.
           31 enum IO_Type {
           32   PISM_NAT    = 0,              /* NAT = 'Not A Type' (c.f. NaN) */
           33   PISM_BYTE   = 1,              /* signed 1 byte integer */
           34   PISM_CHAR   = 2,              /* ISO/ASCII character */
           35   PISM_SHORT  = 3,              /* signed 2 byte integer */
           36   PISM_INT    = 4,              /* signed 4 byte integer */
           37   PISM_FLOAT  = 5,              /* single precision floating point number */
           38   PISM_DOUBLE = 6               /* double precision floating point number */
           39 };
           40 
           41 enum IO_Backend {PISM_GUESS, PISM_NETCDF3, PISM_NETCDF4_PARALLEL, PISM_PNETCDF,
           42                  PISM_PIO_PNETCDF, PISM_PIO_NETCDF, PISM_PIO_NETCDF4C, PISM_PIO_NETCDF4P};
           43 
           44 // This is a subset of NetCDF file modes. Use values that don't match
           45 // NetCDF flags so that we can detect errors caused by passing these
           46 // straight to NetCDF.
           47 enum IO_Mode {
           48   PISM_READONLY          = 7,   //!< open an existing file for reading only
           49   PISM_READWRITE         = 8,   //!< open an existing file for reading and writing
           50   PISM_READWRITE_CLOBBER = 9,   //!< create a file for writing, overwrite if present
           51   PISM_READWRITE_MOVE    = 10   //!< create a file for writing, move foo.nc to foo.nc~ if present
           52 };
           53 
           54 // This is the special value corresponding to the "unlimited" dimension length.
           55 // Gets cast to "int", so it should match the value used by NetCDF.
           56 enum Dim_Length {
           57   PISM_UNLIMITED = 0
           58 };
           59 
           60 // "Fill" mode. Gets cast to "int", so it should match values used by NetCDF.
           61 enum Fill_Mode {
           62   PISM_FILL   = 0,
           63   PISM_NOFILL = 0x100
           64 };
           65 
           66 enum RegriddingFlag {OPTIONAL, OPTIONAL_FILL_MISSING, CRITICAL, CRITICAL_FILL_MISSING};
           67 
           68 } // end of namespace pism
           69 
           70 #endif /* _IO_FLAGS_H_ */