PISM, A Parallel Ice Sheet Model
stable v2.0.6 committed by Constantine Khrulev on 2023-01-23 15:14:38 -0900
src
util
io
IO_Flags.hh
Go to the documentation of this file.
1
/* Copyright (C) 2014, 2015, 2018, 2019, 2020 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_SERIAL
,
PISM_NETCDF4_PARALLEL
,
42
PISM_PNETCDF
,
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
//! open an existing file for reading only
49
PISM_READONLY
= 7,
50
//! open an existing file for reading and writing
51
PISM_READWRITE
= 8,
52
//! create a file for writing, overwrite if present
53
PISM_READWRITE_CLOBBER
= 9,
54
//! create a file for writing, move foo.nc to foo.nc~ if present
55
PISM_READWRITE_MOVE
= 10
56
};
57
58
// This is the special value corresponding to the "unlimited" dimension length.
59
// Gets cast to "int", so it should match the value used by NetCDF.
60
enum
Dim_Length
{
61
PISM_UNLIMITED
= 0
62
};
63
64
// "Fill" mode. Gets cast to "int", so it should match values used by NetCDF.
65
enum
Fill_Mode
{
66
PISM_FILL
= 0,
67
PISM_NOFILL
= 0x100
68
};
69
70
enum
RegriddingFlag
{
OPTIONAL
,
OPTIONAL_FILL_MISSING
,
CRITICAL
,
CRITICAL_FILL_MISSING
};
71
72
}
// end of namespace pism
73
74
#endif
/* _IO_FLAGS_H_ */
pism::IO_Type
IO_Type
Definition:
IO_Flags.hh:31
pism::PISM_BYTE
@ PISM_BYTE
Definition:
IO_Flags.hh:33
pism::PISM_INT
@ PISM_INT
Definition:
IO_Flags.hh:36
pism::PISM_NAT
@ PISM_NAT
Definition:
IO_Flags.hh:32
pism::PISM_DOUBLE
@ PISM_DOUBLE
Definition:
IO_Flags.hh:38
pism::PISM_SHORT
@ PISM_SHORT
Definition:
IO_Flags.hh:35
pism::PISM_FLOAT
@ PISM_FLOAT
Definition:
IO_Flags.hh:37
pism::PISM_CHAR
@ PISM_CHAR
Definition:
IO_Flags.hh:34
pism::Dim_Length
Dim_Length
Definition:
IO_Flags.hh:60
pism::PISM_UNLIMITED
@ PISM_UNLIMITED
Definition:
IO_Flags.hh:61
pism::RegriddingFlag
RegriddingFlag
Definition:
IO_Flags.hh:70
pism::CRITICAL_FILL_MISSING
@ CRITICAL_FILL_MISSING
Definition:
IO_Flags.hh:70
pism::OPTIONAL_FILL_MISSING
@ OPTIONAL_FILL_MISSING
Definition:
IO_Flags.hh:70
pism::OPTIONAL
@ OPTIONAL
Definition:
IO_Flags.hh:70
pism::CRITICAL
@ CRITICAL
Definition:
IO_Flags.hh:70
pism::Fill_Mode
Fill_Mode
Definition:
IO_Flags.hh:65
pism::PISM_NOFILL
@ PISM_NOFILL
Definition:
IO_Flags.hh:67
pism::PISM_FILL
@ PISM_FILL
Definition:
IO_Flags.hh:66
pism::IO_Backend
IO_Backend
Definition:
IO_Flags.hh:41
pism::PISM_GUESS
@ PISM_GUESS
Definition:
IO_Flags.hh:41
pism::PISM_PIO_NETCDF
@ PISM_PIO_NETCDF
Definition:
IO_Flags.hh:42
pism::PISM_PIO_PNETCDF
@ PISM_PIO_PNETCDF
Definition:
IO_Flags.hh:42
pism::PISM_PIO_NETCDF4P
@ PISM_PIO_NETCDF4P
Definition:
IO_Flags.hh:42
pism::PISM_NETCDF3
@ PISM_NETCDF3
Definition:
IO_Flags.hh:41
pism::PISM_PIO_NETCDF4C
@ PISM_PIO_NETCDF4C
Definition:
IO_Flags.hh:42
pism::PISM_NETCDF4_PARALLEL
@ PISM_NETCDF4_PARALLEL
Definition:
IO_Flags.hh:41
pism::PISM_PNETCDF
@ PISM_PNETCDF
Definition:
IO_Flags.hh:42
pism::PISM_NETCDF4_SERIAL
@ PISM_NETCDF4_SERIAL
Definition:
IO_Flags.hh:41
pism::IO_Mode
IO_Mode
Definition:
IO_Flags.hh:47
pism::PISM_READWRITE_CLOBBER
@ PISM_READWRITE_CLOBBER
create a file for writing, overwrite if present
Definition:
IO_Flags.hh:53
pism::PISM_READWRITE_MOVE
@ PISM_READWRITE_MOVE
create a file for writing, move foo.nc to foo.nc~ if present
Definition:
IO_Flags.hh:55
pism::PISM_READWRITE
@ PISM_READWRITE
open an existing file for reading and writing
Definition:
IO_Flags.hh:51
pism::PISM_READONLY
@ PISM_READONLY
open an existing file for reading only
Definition:
IO_Flags.hh:49
pism
Definition:
AgeColumnSystem.cc:24
Generated by
1.9.1