Constants

class ocgis.constants.AttributeName[source]
ORIGINAL_SPATIAL_BOUNDS = '_ocgis_original_bounds_name'
START_INDEX = 'start_index'
UNIQUE_GEOMETRY_IDENTIFIER = 'ocgis_geom_uid'
class ocgis.constants.BackTransform[source]
ROTATED_POLE = <BackTransform.ROTATED_POLE: 'rotated pole'>
ocgis.constants.CALC_MONTH_CENTROID = 16

The day value to use for month centroids.

ocgis.constants.CALC_YEAR_CENTROID_DAY = 1

The default day value for year centroids.

ocgis.constants.CALC_YEAR_CENTROID_MONTH = 7

The month value to use for year centroids.

class ocgis.constants.CFName[source]
AXIS = 'axis'
GRID_MAPPING = 'grid_mapping'
LONG_NAME = 'long_name'
STANDARD_NAME = 'standard_name'
class StandardName[source]
HEIGHT = 'height'
LATITUDE = 'latitude'
LONGITUDE = 'longitude'
TIME = ('time',)
UNITS = 'units'
X = ['x', 'xc', 'longitude', 'lon']
Y = ['y', 'yc', 'latitude', 'lat']
Z = ['z', 'zc', 'level', 'lvl', 'height']
classmethod get_axis_mapping()[source]
class ocgis.constants.ConversionFactor[source]
DEG_TO_RAD = 0.017453292519943295
RAD_TO_DEG = 57.29577951308232
class ocgis.constants.ConversionTarget[source]
GEOMETRY_COORDS = <ConversionTarget.GEOMETRY_COORDS: 'geometry_coords'>
GEOMETRY_VARIABLE = <ConversionTarget.GEOMETRY_VARIABLE: 'geometry_variable'>
ocgis.constants.DEFAULT_NAME_COL_COORDINATES = 'xc'

Default column coordinate name.

ocgis.constants.DEFAULT_NAME_CORNERS_DIMENSION = 'corners'

Default corners dimension name.

ocgis.constants.DEFAULT_NAME_LVL_COORDINATES = 'zc'

Default level coordinate name.

ocgis.constants.DEFAULT_NAME_ROW_COORDINATES = 'yc'

Default row coordinate name.

ocgis.constants.DEFAULT_NP_FLOAT

alias of __builtin__.float

ocgis.constants.DEFAULT_NP_INT

alias of __builtin__.int

ocgis.constants.DEFAULT_SAMPLE_SIZE_LONG_NAME = 'Statistical Sample Size'

Default sample size variable long name.

ocgis.constants.DEFAULT_SAMPLE_SIZE_STANDARD_NAME = 'sample_size'

Default sample size variable standard name.

ocgis.constants.DEFAULT_TEMPORAL_CALENDAR = 'standard'

Default temporal calendar.

ocgis.constants.DEFAULT_TEMPORAL_NAME = 'time'

Default name for the time dimension.

ocgis.constants.DEFAULT_TEMPORAL_UNITS = 'days since 0001-01-01 00:00:00'

Default temporal units.

class ocgis.constants.DMK[source]

Here for convenience.

class ocgis.constants.DataType[source]
DIMENSION_SRC_INDEX

alias of numpy.int32

class ocgis.constants.DimensionMapKey[source]
ATTRIBUTE_HOST = 'attribute_host'
ATTRS = 'attrs'
BOUNDS = 'bounds'
CRS = 'crs'
DIMENSION = 'dimension'
DRIVER = 'driver'
ELEMENT_NODE_CONNECTIVITY = 'element_node_connectivity'
GEOM = 'geom'
GRID_ABSTRACTION = 'grid_abstraction'
GROUPS = 'groups'
IS_ISOMORPHIC = 'is_isomorphic'
LEVEL = 'level'
REALIZATION = 'realization'
SECTION = 'section'
SPATIAL_MASK = 'spatial_mask'
TIME = 'time'
TOPOLOGY = 'topology'
VARIABLE = 'variable'
X = 'x'
Y = 'y'
classmethod get_axis_mapping()[source]
classmethod get_element_keys()[source]
classmethod get_entry_keys()[source]
classmethod get_special_entry_keys()[source]
class ocgis.constants.DimensionName[source]
GEOMETRY_DIMENSION = 'ocgis_ngeom'
TEMPORAL = 'time'
UGRID_MAX_ELEMENT_COORDS = 'ocgis_max_element_coords'
UNIONED_GEOMETRY = 'ocgis_geom_union'
class ocgis.constants.DriverKey[source]
BASE = 'base'
CSV = 'csv'
NETCDF = 'netcdf'
NETCDF_CF = 'netcdf-cf'
NETCDF_ESMF_UNSTRUCT = 'netcdf-esmf-unstruct'
NETCDF_SCRIP = 'netcdf-scrip'
NETCDF_UGRID = 'netcdf-ugrid'
VECTOR = 'vector'
ocgis.constants.ENABLED_NUMPY_UFUNCS = ('exp', 'log', 'abs', 'power')

NumPy functions enabled for functions evaluated from string representations.

class ocgis.constants.ESMFGridClass[source]
GRID = <ESMFGridClass.GRID: 'grid'>
MESH = <ESMFGridClass.MESH: 'mesh'>
class ocgis.constants.GridAbstraction[source]
AUTO = 'auto'
LINE = 'line'
POINT = 'point'
POLYGON = 'polygon'
class ocgis.constants.GridChunkerConstants[source]
BUFFER_RESOLUTION_MODIFIER = 2.0
class IndexFile[source]
ESMF_ROLE_DST_BOUNDS_X = 'dst_x_split_bounds'
ESMF_ROLE_DST_BOUNDS_Y = 'dst_y_split_bounds'
ESMF_ROLE_SRC_BOUNDS_X = 'src_x_split_bounds'
ESMF_ROLE_SRC_BOUNDS_Y = 'src_y_split_bounds'
NAME_DESTINATION_VARIABLE = 'grid_chunker_destination'
NAME_DSTIDX_GUID = 'dstidx_guid'
NAME_DST_GRID_SHAPE = 'dst_grid_shape'
NAME_INDEX_VARIABLE = 'grid_chunker_index'
NAME_SOURCE_VARIABLE = 'grid_chunker_source'
NAME_SRCIDX_GUID = 'srcidx_guid'
NAME_SRC_GRID_SHAPE = 'src_grid_shape'
NAME_WEIGHTS_VARIABLE = 'grid_chunker_weights'
NAME_X_DST_BOUNDS_VARIABLE = 'dst_x_bounds'
NAME_X_SRC_BOUNDS_VARIABLE = 'src_x_bounds'
NAME_Y_DST_BOUNDS_VARIABLE = 'dst_y_bounds'
NAME_Y_SRC_BOUNDS_VARIABLE = 'src_y_bounds'
class ocgis.constants.HeaderName[source]
CALCULATION_KEY = 'CALC_KEY'
CALCULATION_SOURCE_VARIABLE = 'SRC_VAR'
DATASET_IDENTIFER = 'DID'
ID_GEOMETRY = 'GID'
ID_SELECTION_GEOMETRY = 'UGID'
LEVEL = 'LEVEL'
LEVEL_BOUNDS = ['LB_LEVEL', 'UB_LEVEL']
REALIZATION = 'RLZ'
TEMPORAL = 'TIME'
TEMPORAL_BOUNDS = ['LB_TIME', 'UB_TIME']
TEMPORAL_DAY = 'DAY'
TEMPORAL_MONTH = 'MONTH'
TEMPORAL_YEAR = 'YEAR'
VALUE = 'VALUE'
VARIABLE = 'VARIABLE'
ocgis.constants.ICCLIM_PREFIX_FUNCTION_KEY = 'icclim'

Function key prefix for the icclim indices library.

class ocgis.constants.KeywordArgument[source]
ABSTRACTION = 'abstraction'
ADD_BOUNDS = 'add_bounds'
ADD_GEOM_UID = 'add_geom_uid'
ALLOW_MASKED = 'allow_masked'
ATTRS = 'attrs'
BOUNDS_NAMES = 'bounds_names'
CASCADE = 'cascade'
CHECK_VALUE = 'check_value'
COMM = 'comm'
CREATE = 'create'
CRS = 'crs'
DATASET = 'dataset'
DATASET_KWARGS = 'dataset_kwargs'
DATA_MODEL = 'data_model'
DIMENSIONS = 'dimensions'
DIMENSION_MAP = 'dimension_map'
DIR_OUTPUT = 'dir_output'
DIST = 'dist'
DRIVER = 'driver'
DRIVER_KWARGS = 'driver_kwargs'
DTYPE = 'dtype'
class Defaults[source]
ABSTRACTION = 'auto'
IS_DATA = False
STANDARDIZE = True
EAGER = 'eager'
EXCLUDE = 'exclude'
FIELD_NAME = 'field_name'
FILE_ONLY = 'file_only'
FOLLOWERS = 'followers'
FORMAT = 'format'
FORMAT_TIME = 'format_time'
GEOM = 'geom'
GEOM_TYPE = 'geom_type'
GRID = 'grid'
GRID_ABSTRACTION = 'grid_abstraction'
HEADER_MAP = 'header_map'
INIT_VALUE = 'init_value'
INPLACE = 'inplace'
INTERSECTS_CHECK = 'intersects_check'
INVERSE = 'inverse'
IS_DATA = 'is_data'
IS_EMPTY = 'is_empty'
ITER_KWARGS = 'iter_kwargs'
KEEP_TOUCHES = 'keep_touches'
MASK = 'mask'
MELTED = 'melted'
NAME = 'name'
OPTIMIZED_BBOX_SUBSET = 'optimized_bbox_subset'
ORIGINAL_MASK = 'original_mask'
OUTPUT_FORMAT = 'output_format'
PARENT = 'parent'
PATH = 'path'
POS = 'pos'
PREFIX = 'prefix'
PRIMARY_MASK = 'primary_mask'
RANKS_TO_WRITE = 'ranks_to_write'
REGRID_DESTINATION = 'regrid_destination'
REGRID_SOURCE = 'regrid_source'
RENAME_VARIABLE = 'rename_variable'
REPEATERS = 'repeaters'
RETURN_SLICE = 'return_slice'
ROTATED_POLE_PRIORITY = 'rotated_pole_priority'
SIZE = 'size'
SNIPPET = 'snippet'
STANDARDIZE = 'standardize'
STRICT = 'strict'
TAG = 'tag'
UGID = 'ugid'
UID = 'uid'
UNION = 'union'
UNLIMITED_TO_FIXED_SIZE = 'unlimited_to_fixedsize'
UPDATE = 'update'
URI = 'uri'
USE_BOUNDS = 'use_bounds'
VALUE = 'value'
VARIABLE = 'variable'
VARIABLE_KWARGS = 'variable_kwargs'
WITH_PROJ4 = 'with_proj4'
WRAPPED_STATE = 'wrapped_state'
WRITE_MODE = 'write_mode'
X = 'x'
Y = 'y'
YIELD_BASE = 'yield_base'
Z = 'z'
ocgis.constants.MERIDIAN_180TH = 180.0

The value for the 180th meridian to use when wrapping.

class ocgis.constants.MPIOps[source]
SUM = <MPIOps.SUM: 0>
class ocgis.constants.MPITag[source]
ARANGE_FROM_DIMENSION = <MPITag.ARANGE_FROM_DIMENSION: 10>
CREATE_DIST_DIM = <MPITag.CREATE_DIST_DIM: 9>
OVERLAP_CHECK = <MPITag.OVERLAP_CHECK: 0>
REDUCE_REINDEX_CHILD_FINISHED = <MPITag.REDUCE_REINDEX_CHILD_FINISHED: 3>
REDUCE_REINDEX_FOUND = <MPITag.REDUCE_REINDEX_FOUND: 4>
REDUCE_REINDEX_SUCCESS = <MPITag.REDUCE_REINDEX_SUCCESS: 2>
SELECT_SEND_SIZE = <MPITag.SELECT_SEND_SIZE: 12>
START_INDEX = <MPITag.START_INDEX: 11>
class ocgis.constants.MPIWriteMode[source]
APPEND = <MPIWriteMode.APPEND: 2>
ASYNCHRONOUS = <MPIWriteMode.ASYNCHRONOUS: 3>
NORMAL = <MPIWriteMode.NORMAL: 0>
TEMPLATE = <MPIWriteMode.TEMPLATE: 1>
class ocgis.constants.MiscName[source]
DEFAULT_FIELD_NAME = 'ocgis_field'
ocgis.constants.NETCDF_DEFAULT_DATA_MODEL = 'NETCDF4'

Default netCDF4 output file type

ocgis.constants.OCGIS_UNIQUE_GEOMETRY_IDENTIFIER = 'UGID'

Standard name for the unique identifier in GIS files.

class ocgis.constants.OcgisConvention[source]
class Name[source]
COORDSYS = 'ocgis_coordinate_system'
ELEMENT_NODE_COUNT = 'ocgis_element_node_count'
MULTI_BREAK_VALUE = 'multi_break_value'
OCGIS_ROLE = 'ocgis_role'
PROJ4 = 'proj4'
XC_DIMENSION = 'xdim'
YC_DIMENSION = 'ydim'
class Value[source]
MULTI_BREAK_VALUE = -8
ROLE_COORDSYS = 'coordinate_system'
class ocgis.constants.OcgisUnits[source]
DEGREES = <OcgisUnits.DEGREES: 'degrees'>
RADIANS = <OcgisUnits.RADIANS: 'radians'>
class ocgis.constants.OutputFormatName[source]
CSV = 'csv'
CSV_SHAPEFILE = 'csv-shp'
ESMPY_GRID = 'esmpy'
GEOJSON = 'geojson'
METADATA_JSON = 'meta-json'
METADATA_OCGIS = 'meta-ocgis'
NETCDF = 'nc'
OCGIS = 'ocgis'
SHAPEFILE = 'shp'
ocgis.constants.PROJ4_ROTATED_POLE_ELLPS = 'sphere'

Default rotated pole ellipse for transformation.

ocgis.constants.RESOLUTION_LIMIT = 100

The number of values to use when calculating data resolution.

class ocgis.constants.RegriddingRole[source]
DESTINATION = <RegriddingRole.DESTINATION: 'dst'>
SOURCE = <RegriddingRole.SOURCE: 'src'>
class ocgis.constants.SourceIndexType[source]
BOUNDS = <SourceIndexType.BOUNDS: 0>
FANCY = <SourceIndexType.FANCY: 1>
class ocgis.constants.SubcommName[source]
FIELD_GET = <SubcommName.FIELD_GET: '__ocgis_field_get__'>
FIELD_SUBSET = <SubcommName.FIELD_SUBSET: '__ocgis_field_subset__'>
NONSPATIAL_SUBSET = <SubcommName.NONSPATIAL_SUBSET: '__ocgis_nonspatial_subset__'>
SPATIAL_AVERAGE = <SubcommName.SPATIAL_AVERAGE: '__ocgis_spatial_average__'>
UGEOM_WRITE = <SubcommName.UGEOM_WRITE: '__ocgis_ugeom_write__'>
class ocgis.constants.TagName[source]
DATA_VARIABLES = '_ocgis_data_variables'
class ocgis.constants.Topology[source]
ocgis.constants.VECTOR_OUTPUT_FORMATS = ['geojson', 'shp', 'csv-shp']

These output formats are considered vector output formats affected by operations manipulation vector GIS data. For example, vector GIS outputs are always wrapped to -180 to 180 if there is a spherical coordinate system.

class ocgis.constants.VariableName[source]
GEOMETRY_LINE = 'ocgis_line'
GEOMETRY_POINT = 'ocgis_point'
GEOMETRY_POLYGON = 'ocgis_polygon'
GEOMETRY_VARIABLE = 'ocgis_geom'
SPATIAL_MASK = 'ocgis_spatial_mask'
UGRID_HOST_VARIABLE = 'ocgis_mesh_host'
class ocgis.constants.WrapAction[source]
UNWRAP = <WrapAction.UNWRAP: 2>
WRAP = <WrapAction.WRAP: 1>
class ocgis.constants.WrappedState[source]
UNKNOWN = <WrappedState.UNKNOWN: 3>
UNWRAPPED = <WrappedState.UNWRAPPED: 2>
WRAPPED = <WrappedState.WRAPPED: 1>