diff --git a/chapter6.ipynb b/chapter6.ipynb index 8c4888c1..f3adf69c 100644 --- a/chapter6.ipynb +++ b/chapter6.ipynb @@ -339,8 +339,8 @@ "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.15" + "pygments_lexer": "ipython3", + "version": "3.6.8" } }, "nbformat": 4, diff --git a/docs/source/_static/agogo.css_t b/docs/source/_static/agogo.css_t index 1c28bb89..6f3c3709 100644 --- a/docs/source/_static/agogo.css_t +++ b/docs/source/_static/agogo.css_t @@ -21,6 +21,11 @@ table { tr:nth-child(even){background-color: #f2f2f2} tr td:first-child { font-weight: bold } +td { + vertical-align: top; + text-align: left; +} + th { background-color: #01796F; color: #f8f8ba; diff --git a/docs/source/generated/cdms2.avariable.AbstractVariable.dump.rst b/docs/source/generated/cdms2.avariable.AbstractVariable.dump.rst deleted file mode 100644 index feeb3ff4..00000000 --- a/docs/source/generated/cdms2.avariable.AbstractVariable.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.avariable:AbstractVariable -================================ - -.. currentmodule:: cdms2.avariable - -.. automethod:: AbstractVariable.dump diff --git a/docs/source/generated/cdms2.axis.AbstractAxis.dump.rst b/docs/source/generated/cdms2.axis.AbstractAxis.dump.rst deleted file mode 100644 index 9bd12c1f..00000000 --- a/docs/source/generated/cdms2.axis.AbstractAxis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:AbstractAxis -======================= - -.. currentmodule:: cdms2.axis - -.. automethod:: AbstractAxis.dump diff --git a/docs/source/generated/cdms2.axis.Axis.dump.rst b/docs/source/generated/cdms2.axis.Axis.dump.rst deleted file mode 100644 index c6315752..00000000 --- a/docs/source/generated/cdms2.axis.Axis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:Axis -=============== - -.. currentmodule:: cdms2.axis - -.. automethod:: Axis.dump diff --git a/docs/source/generated/cdms2.axis.FileAxis.dump.rst b/docs/source/generated/cdms2.axis.FileAxis.dump.rst deleted file mode 100644 index b686660b..00000000 --- a/docs/source/generated/cdms2.axis.FileAxis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:FileAxis -=================== - -.. currentmodule:: cdms2.axis - -.. automethod:: FileAxis.dump diff --git a/docs/source/generated/cdms2.axis.FileVirtualAxis.dump.rst b/docs/source/generated/cdms2.axis.FileVirtualAxis.dump.rst deleted file mode 100644 index ded958a3..00000000 --- a/docs/source/generated/cdms2.axis.FileVirtualAxis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:FileVirtualAxis -========================== - -.. currentmodule:: cdms2.axis - -.. automethod:: FileVirtualAxis.dump diff --git a/docs/source/generated/cdms2.axis.TransientAxis.dump.rst b/docs/source/generated/cdms2.axis.TransientAxis.dump.rst deleted file mode 100644 index 0589036f..00000000 --- a/docs/source/generated/cdms2.axis.TransientAxis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:TransientAxis -======================== - -.. currentmodule:: cdms2.axis - -.. automethod:: TransientAxis.dump diff --git a/docs/source/generated/cdms2.axis.TransientVirtualAxis.dump.rst b/docs/source/generated/cdms2.axis.TransientVirtualAxis.dump.rst deleted file mode 100644 index 6a9f13ea..00000000 --- a/docs/source/generated/cdms2.axis.TransientVirtualAxis.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.axis:TransientVirtualAxis -=============================== - -.. currentmodule:: cdms2.axis - -.. automethod:: TransientVirtualAxis.dump diff --git a/docs/source/generated/cdms2.database.AbstractDatabase.dump.rst b/docs/source/generated/cdms2.database.AbstractDatabase.dump.rst deleted file mode 100644 index 695fb3d7..00000000 --- a/docs/source/generated/cdms2.database.AbstractDatabase.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.database:AbstractDatabase -=============================== - -.. currentmodule:: cdms2.database - -.. automethod:: AbstractDatabase.dump diff --git a/docs/source/generated/cdms2.database.LDAPDatabase.dump.rst b/docs/source/generated/cdms2.database.LDAPDatabase.dump.rst deleted file mode 100644 index 894dd450..00000000 --- a/docs/source/generated/cdms2.database.LDAPDatabase.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.database:LDAPDatabase -=========================== - -.. currentmodule:: cdms2.database - -.. automethod:: LDAPDatabase.dump diff --git a/docs/source/generated/cdms2.dataset.CdmsFile.dump.rst b/docs/source/generated/cdms2.dataset.CdmsFile.dump.rst deleted file mode 100644 index e4090726..00000000 --- a/docs/source/generated/cdms2.dataset.CdmsFile.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.dataset:CdmsFile -====================== - -.. currentmodule:: cdms2.dataset - -.. automethod:: CdmsFile.dump diff --git a/docs/source/generated/cdms2.dataset.Dataset.dump.rst b/docs/source/generated/cdms2.dataset.Dataset.dump.rst deleted file mode 100644 index 990b680c..00000000 --- a/docs/source/generated/cdms2.dataset.Dataset.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.dataset:Dataset -===================== - -.. currentmodule:: cdms2.dataset - -.. automethod:: Dataset.dump diff --git a/docs/source/generated/cdms2.fvariable.FileVariable.dump.rst b/docs/source/generated/cdms2.fvariable.FileVariable.dump.rst deleted file mode 100644 index 10ea57c5..00000000 --- a/docs/source/generated/cdms2.fvariable.FileVariable.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.fvariable:FileVariable -============================ - -.. currentmodule:: cdms2.fvariable - -.. automethod:: FileVariable.dump diff --git a/docs/source/generated/cdms2.grid.AbstractGrid.dump.rst b/docs/source/generated/cdms2.grid.AbstractGrid.dump.rst deleted file mode 100644 index 508c1814..00000000 --- a/docs/source/generated/cdms2.grid.AbstractGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.grid:AbstractGrid -======================= - -.. currentmodule:: cdms2.grid - -.. automethod:: AbstractGrid.dump diff --git a/docs/source/generated/cdms2.grid.AbstractRectGrid.dump.rst b/docs/source/generated/cdms2.grid.AbstractRectGrid.dump.rst deleted file mode 100644 index 753e3c62..00000000 --- a/docs/source/generated/cdms2.grid.AbstractRectGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.grid:AbstractRectGrid -=========================== - -.. currentmodule:: cdms2.grid - -.. automethod:: AbstractRectGrid.dump diff --git a/docs/source/generated/cdms2.grid.FileRectGrid.dump.rst b/docs/source/generated/cdms2.grid.FileRectGrid.dump.rst deleted file mode 100644 index f4bf8200..00000000 --- a/docs/source/generated/cdms2.grid.FileRectGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.grid:FileRectGrid -======================= - -.. currentmodule:: cdms2.grid - -.. automethod:: FileRectGrid.dump diff --git a/docs/source/generated/cdms2.grid.TransientRectGrid.dump.rst b/docs/source/generated/cdms2.grid.TransientRectGrid.dump.rst deleted file mode 100644 index 8c64d0d0..00000000 --- a/docs/source/generated/cdms2.grid.TransientRectGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.grid:TransientRectGrid -============================ - -.. currentmodule:: cdms2.grid - -.. automethod:: TransientRectGrid.dump diff --git a/docs/source/generated/cdms2.hgrid.AbstractCurveGrid.dump.rst b/docs/source/generated/cdms2.hgrid.AbstractCurveGrid.dump.rst deleted file mode 100644 index 07e15b8c..00000000 --- a/docs/source/generated/cdms2.hgrid.AbstractCurveGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.hgrid:AbstractCurveGrid -============================= - -.. currentmodule:: cdms2.hgrid - -.. automethod:: AbstractCurveGrid.dump diff --git a/docs/source/generated/cdms2.hgrid.AbstractHorizontalGrid.dump.rst b/docs/source/generated/cdms2.hgrid.AbstractHorizontalGrid.dump.rst deleted file mode 100644 index 115d17ab..00000000 --- a/docs/source/generated/cdms2.hgrid.AbstractHorizontalGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.hgrid:AbstractHorizontalGrid -================================== - -.. currentmodule:: cdms2.hgrid - -.. automethod:: AbstractHorizontalGrid.dump diff --git a/docs/source/generated/cdms2.hgrid.DatasetCurveGrid.dump.rst b/docs/source/generated/cdms2.hgrid.DatasetCurveGrid.dump.rst deleted file mode 100644 index 3bb733f5..00000000 --- a/docs/source/generated/cdms2.hgrid.DatasetCurveGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.hgrid.DatasetCurveGrid -============================ - -.. currentmodule:: cdms2.hgrid.DatasetCurveGrid - -.. automethod:: .dump diff --git a/docs/source/generated/cdms2.hgrid.FileCurveGrid.dump.rst b/docs/source/generated/cdms2.hgrid.FileCurveGrid.dump.rst deleted file mode 100644 index 7d505d82..00000000 --- a/docs/source/generated/cdms2.hgrid.FileCurveGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.hgrid.FileCurveGrid -========================= - -.. currentmodule:: cdms2.hgrid.FileCurveGrid - -.. automethod:: .dump diff --git a/docs/source/generated/cdms2.hgrid.TransientCurveGrid.dump.rst b/docs/source/generated/cdms2.hgrid.TransientCurveGrid.dump.rst deleted file mode 100644 index 59e24cd3..00000000 --- a/docs/source/generated/cdms2.hgrid.TransientCurveGrid.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.hgrid:TransientCurveGrid -============================== - -.. currentmodule:: cdms2.hgrid - -.. automethod:: TransientCurveGrid.dump diff --git a/docs/source/generated/cdms2.tvariable.TransientVariable.dump.rst b/docs/source/generated/cdms2.tvariable.TransientVariable.dump.rst deleted file mode 100644 index 48893384..00000000 --- a/docs/source/generated/cdms2.tvariable.TransientVariable.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.tvariable:TransientVariable -================================= - -.. currentmodule:: cdms2.tvariable - -.. automethod:: TransientVariable.dump diff --git a/docs/source/generated/cdms2.tvariable.TransientVariable.var.rst b/docs/source/generated/cdms2.tvariable.TransientVariable.var.rst deleted file mode 100644 index 5d91475e..00000000 --- a/docs/source/generated/cdms2.tvariable.TransientVariable.var.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.tvariable:TransientVariable -================================= - -.. currentmodule:: cdms2.tvariable - -.. automethod:: TransientVariable.var diff --git a/docs/source/generated/cdms2.variable.DatasetVariable.dump.rst b/docs/source/generated/cdms2.variable.DatasetVariable.dump.rst deleted file mode 100644 index 2c25ab62..00000000 --- a/docs/source/generated/cdms2.variable.DatasetVariable.dump.rst +++ /dev/null @@ -1,6 +0,0 @@ -cdms2.variable:DatasetVariable -============================== - -.. currentmodule:: cdms2.variable - -.. automethod:: DatasetVariable.dump diff --git a/docs/source/index.rst b/docs/source/index.rst index a02825da..6353bf42 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -12,7 +12,6 @@ manual/cdms_2 manual/cdms_3 manual/cdms_4 - manual/cdms_5 manual/cdms_6 manual/cdms_7 manual/cdms_appendix diff --git a/docs/source/manual/cdms_1.rst b/docs/source/manual/cdms_1.rst index 0c6974d2..ab4f9f69 100644 --- a/docs/source/manual/cdms_1.rst +++ b/docs/source/manual/cdms_1.rst @@ -21,15 +21,12 @@ the `Python Foundation's homepage `__. Variables ^^^^^^^^^ -The basic unit of computation in CDMS is the variable. A variable is -essentially a multidimensional data array, augmented with a domain, a -set of attributes, and optionally a spatial and/or temporal coordinate -system (see `Coordinate Axes <#coordinate-axes>`__). As a data array, a variable can -be sliced to obtain a portion of the data, and can be used in arithmetic -computations. For example, if ``u`` and ``v`` are variables representing -the eastward and northward components of wind speed, respectively, and -both variables are functions of time, latitude, and longitude, then the -velocity for time 0 (first index) can be calculated as: +The basic unit of computation in CDMS is the variable. A variable is essentially a multidimensional data array, +augmented with a domain, a set of attributes, and optionally a spatial and/or temporal coordinate system +(see `Coordinate Axes <#coordinate-axes>`__). As a data array, a variable can be sliced to obtain a portion of the +data, and can be used in arithmetic computations. For example, if ``u`` and ``v`` are variables representing +the eastward and northward components of wind speed, respectively, and both variables are functions of time, +latitude, and longitude, then the velocity for time 0 (first index) can be calculated as: :: @@ -303,7 +300,7 @@ variables ``missing_value`` attribute. The data and ``missing_value`` attribute are then written to the file. Masking is covered in `Section 2.9 `__. See also the -documentation of the Python Numpy and MA modules, on which ``cdms.MV`` +documentation of the Python Numpy and MA modules, on which ``cdms2.MV2`` is based, at `https://www.numpy.org/ `__. @@ -707,7 +704,7 @@ Time Types ^^^^^^^^^^ CDMS provides extensive support for time values in the cdtime module. -cdtime also defines a set of calendars , specifying the number of days +cdtime also defines a set of calendars, specifying the number of days in a given month. Two time types are available: relative time and component time . @@ -731,7 +728,7 @@ units=" days since 1996-1-1". To create a relative time type: 'days since 1996-1-1' A component time consists of the integer fields year, month, day, hour, -minute , and the floating-point field second . For example: +minute, and the floating-point field second. For example: :: @@ -745,7 +742,7 @@ minute , and the floating-point field second . For example: The conversion functions tocomp and torel convert between the two representations. For instance, suppose that the time axis of a variable -is represented in units " days since 1979" . To find the coordinate +is represented in units " days since 1979". To find the coordinate value corresponding to January 1, 1990: :: diff --git a/docs/source/manual/cdms_2.rst b/docs/source/manual/cdms_2.rst index 6b9f2596..bd55bbf6 100644 --- a/docs/source/manual/cdms_2.rst +++ b/docs/source/manual/cdms_2.rst @@ -299,7 +299,7 @@ Cdms Module Functions(cont'd) a ``CdmsFile`` is returned. * If the URL protocol is 'http', the file must be a '.xml' or '.cdml' file, and the mode must be 'r'. * If the protocol is 'file' or is omitted, a local file or dataset is opened. - * ``mode`` is the open mode. See `Open Modes <#table-open-modes>`__ + * ``mode`` is the open mode. See `Open Modes <#id7>`__ **Example:** Open an existing dataset: ``f = cdms.open('sampleset.xml')`` @@ -386,8 +386,6 @@ to the internal, non-persistent attributes of an object, which are built-in and predefined. When a CDMS object is written to a file, the external attributes are written, but not the internal attributes. -**Example**: Get a list of all external attributes of obj. - Attributes Common to All CDMS Objects ------------------------------------- @@ -426,9 +424,9 @@ It may be contained in a file or dataset, or may be transient file, and referencing a file CoordinateAxis slice reads data from the file. Axis objects are also used to define the domain of a Variable. -CDMS defines several different types of CoordinateAxis objects. See `MV module <#id3>`_ +CDMS defines several different types of CoordinateAxis objects. See `MV module <#id8>`_ documents methods that are common to all CoordinateAxis -types. See `HorizontalGrid <#id4>`_ specifies methods that are unique to 1D +types. See `HorizontalGrid <#id10>`_ specifies methods that are unique to 1D Axis objects. CoordinateAxis Types @@ -506,7 +504,7 @@ CoordinateAxis Methods "Array", ``array = axis[i:j]``", "Read a slice of data from the external file or dataset. * Data is returned in the physical ordering defined in the dataset. - * See `Variable Slice Operators <#table-variable-slice-operators>`_ for a description of slice operators." + * See `Variable Slice Operators <#id22>`_ for a description of slice operators." "None", "``axis[i:j] = array``", "Write a slice of data to the external file. * Dataset axes are read-only." "None", "``assignValue(array)``", "Set the entire value of the axis. @@ -703,7 +701,7 @@ CdmsFile Constructors "Constructor", "Description" "``fileobj = cdms.open(path, mode)``", "Open the file specified by path returning a CdmsFile object. * ``path`` is the file pathname, a string. - * ``mode`` is the open mode indicator, as listed in `Open Modes <#table-open-modes>`_." + * ``mode`` is the open mode indicator, as listed in `Open Modes <#id7>`_." "``fileobj = cdms.createDataset(path)``", "Create the file specified by path, a string." CdmsFile Methods @@ -718,7 +716,7 @@ CdmsFile Methods "Transient-Variable", "``fileobj(varname, selector)``", "Calling a ``CdmsFile`` object as a function reads the region of data specified by the ``selector``. The result is a transient variable, unless ``raw = 1`` is specified. - See `Selectors <#selectors>`_. + See `Selectors <#id24>`_. **Example:** The following reads data for variable 'prc', year 1980: >>> f = cdms.open('test.nc') @@ -774,7 +772,7 @@ CdmsFile Methods(cont'd) * ``lon`` is a longitude axis in the file. * ``order`` is a string with value ``'yx'`` (the latitude) or ``'xy'`` (the first grid dimension is longitude). - * ``type`` is one of ``'gaussian'``,\ ``'unif orm'``,\ ``'equalarea'`` , or ``'generic'``. + * ``type`` is one of ``'gaussian'``,\ ``'uniform'``,\ ``'equalarea'`` , or ``'generic'``. * If specified, ``mask`` is a two-dimensional, logical Numpy array (all values are zero or one) with the same shape as the grid." @@ -801,8 +799,7 @@ CdmsFile Methods(cont'd) * If unspecified, the returned variable has the same name as ``var``. **Note:** Unlike copyAxis, the actual data is not copied to the new variable." "CurveGrid or Generic-Grid", "``readScripGrid (self,whichGrid= 'destination',check-Grid=1)``", "Read a curvilinear or generic grid from a SCRIP netCDF file. - The file can be a SCRIP grid file or remapping file. - + The file can be a SCRIP grid file or remapping file. * If a mapping file, ``whichGrid`` chooses the grid to read, either ``'source'`` or ``'destination'``. * If ``checkGrid`` is ``1`` (default), the grid cells are checked for convexity, and 'repaired' if necessary. * Grid cells may appear to be nonconvex if they cross a ``0 / 2pi`` boundary. @@ -849,7 +846,6 @@ CDMS Datatypes "CdShort", "short integer" - Dataset ^^^^^^^ A Dataset is a virtual file. It consists of a metafile, in CDML/XML @@ -884,7 +880,7 @@ Dataset Constructors :widths: 50, 80 :align: left - "``datasetobj = cdms.open(String uri, String mode='r')``", "Open the dataset specified by the Universal Resource Indicator, a CDML file. Returns a Dataset object. mode is one of the indicators listed in `Open Modes <#table-open-modes>`__ . ``openDataset`` is a synonym for ``open``" + "``datasetobj = cdms.open(String uri, String mode='r')``", "Open the dataset specified by the Universal Resource Indicator, a CDML file. Returns a Dataset object. mode is one of the indicators listed in `Open Modes <#id7>`__ . ``openDataset`` is a synonym for ``open``" Open Modes @@ -910,16 +906,16 @@ Dataset Methods "Transient-Variable", "``datasetobj(varname, selector)``", "Calling a Dataset object as a function reads the region of data defined by the selector. The result is a transient variable, unless - ``raw = 1`` is specified. See 'Selectors'. + ``raw = 1`` is specified. See <#selectors>`_. **Example:** The following reads data for variable 'prc', year 1980: - >>> f = cdms.open('test. xml') + >>> f = cdms.open('test.xml') >>> x = f('prc', time=('1980-1','1981-1'))" "Variable, Axis, or Grid", "``datasetobj['id']``", "The square bracket operator applied to a dataset gets the persistent variable, axis or grid object having the string identifier. This does not read the data for a variable. Returns ``None`` if not found. **Example:** - >>> f = cdms.open('sampl e.xml') + >>> f = cdms.open('sample.xml') >>> v = f['prc'] * gets the persistent variable v, equivalent to ``v =f.variab les['prc']``. @@ -992,7 +988,7 @@ The command Allows use of MV commands without any prefix. -Table `Variable Constructors in module MV <#table-variable-constructors-in-module-mv>`_, lists the constructors in MV. All functions return +Table `Variable Constructors in module MV <#id9>`_, lists the constructors in MV. All functions return a transient variable. In most cases the keywords axes, attributes, and id are available. Axes is a list of axis objects which specifies the domain of the variable. Attributes is a dictionary. id is a special @@ -1152,8 +1148,8 @@ RectGrid Constructors "``cdms.createRectGrid(lat, lon, order, type='generic', mask=None)``", "Create a grid not associated with a file or dataset. See `A First Example`_" - "``CdmsFile.createRectGrid(id, lat, lon, order, type='generic', mask=None)``", "Create a grid associated with a file. See `CdmsFile Constructors <#table-cdmsfile-constructors>`_" - "``Dataset.createRectGrid(id, lat, lon, order, type='generic', mask=None)``", "Create a grid associated with a dataset. See `Dataset Constructors <#table-dataset-constructors>`_ " + "``CdmsFile.createRectGrid(id, lat, lon, order, type='generic', mask=None)``", "Create a grid associated with a file. See `CdmsFile Constructors <#cdmsfile-constructors>`_" + "``Dataset.createRectGrid(id, lat, lon, order, type='generic', mask=None)``", "Create a grid associated with a dataset. See `Dataset Constructors <#dataset-constructors>`_ " "``cdms.createGaussianGrid (nlats, xorigin=0.0, order='yx')``", "See `A First Example`_" "``cdms.createGenericGrid (latArray, lonArray, latBounds=None, lonBounds=None, order='yx', mask=None)``", "See `A First Example`_" "``cdms.createGlobalMeanGrid (grid)``", "See `A First Example`_" @@ -1258,13 +1254,10 @@ RectGrid Methods, Additional to HorizontalGrid Methods :header: "Type", "Method", "Description" :widths: 30, 30, 80 - "String", "``getOrder()``", "Get the grid ordering, either 'yx' if latitude is the first axis, - or 'xy' if longitude is the first axis. - String ``getType()`` - * Get the grid type, either 'gaussian', 'uniform', 'equalarea', or 'generic'. - * (Array,Array) ``getWeights()`` - * Get the normalized area weight arrays, as a tuple ``(latWeights, lonWeights)``. - * It is assumed that the latitude and longitude axes are defined in degrees. + "String", "``getOrder()``", "Get the grid ordering, either 'yx' if latitude is the first axis, or 'xy' if longitude is the first axis." + "String", "``getType()``", "Get the grid type, either 'gaussian', 'uniform', 'equalarea', or 'generic'." + "(Array,Array)", "``getWeights()``", "Get the normalized area weight arrays, as a tuple ``(latWeights, lonWeights)``. + It is assumed that the latitude and longitude axes are defined in degrees. The latitude weights are defined as: * ``latWeights[i] = 0.5 * abs(sin(latBounds[i+1]) - sin(latBounds[i]))`` The longitude weights are defined as: @@ -1277,7 +1270,7 @@ RectGrid Methods, Additional to HorizontalGrid Methods * latwts, lonwts = gri d.getWeights() * weights = MV.outerproduct(latwts, lonwts) * Also see the function ``area_weights`` in module ``pcmdi.weighting``." - "None", "``setType (gridtype)``", "Set the grid type. + "None", "``setType (gridtype)``", "Set the grid type. * ``gridtype`` is one of 'gaussian', 'uniform', 'equalarea', or 'generic'." RectGrid Methods, Additional to HorizontalGrid Methods(cont'd) @@ -1382,13 +1375,13 @@ Variable Methods in a transient variable. * Singleton dimensions are 'squeezed' out. * Data is returned in the physical ordering defined in the dataset. - * The forms of the slice operator are listed in `Variable Slice Operators <#table-variable-slice-operators>`_" + * The forms of the slice operator are listed in `Variable Slice Operators <#id22>`_" "None", "``var[ i:j, m:n] = array``", "Write a slice of data to the external dataset. * The forms of the slice operator are listed in `Result Entry Methods <#table-resultentry-methods>`_ . (Variables in CdmsFiles only)" "Variable", "``tvar = var(selector)``", "Calling a variable as a function reads the region of data defined by the selector. * The result is a transient variable, unless raw=1 keyword is specified. - * See `Selectors' <#selectors>`_ ." + * See `Selectors <#id24>`_ ." "None", "``assignValue(Array ar)``", "Write the entire data array. Equivalent to ``var[:] = ar``. (Variables in CdmsFiles only)." "Variable", "``astype(typecode)``", "Cast the variable to a new datatype. * Typecodes are as for MV, MV2, and Numpy modules." @@ -1543,7 +1536,7 @@ Variable Methods(cont'd) * If trailing dimensions are omitted, all values of those dimensions are retrieved. * If an axis is circular (axis.isCircular() is true) or cycle is specified (see below), then data will be read with wraparound in that dimension. * Only one axis may be read with wraparound. - * A coordinate interval has one of the forms listed in `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ . + * A coordinate interval has one of the forms listed in `Index and Coordinate Intervals <#id23>`_ . * Also see ``axis.mapIntervalExt``." Variable Methods(cont'd) @@ -1715,7 +1708,7 @@ selector can be used with any variable. If the corresponding axis is not found, the selector component is ignored. This is very useful for writing general purpose scripts. The required keyword overrides this behavior. These keywords take values that are coordinate ranges or index -ranges as defined in See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_. +ranges as defined in See `Index and Coordinate Intervals <#id23>`_. The following keywords are available: Another form of selector components is the positional form, where the component order corresponds @@ -1729,16 +1722,16 @@ Selector Keywords :header: "Keyword", "Description", "Value" :widths: 30, 80, 80 - "axisid", "Restrict the axis with ID axisid to a value or range of values.", See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ + "axisid", "Restrict the axis with ID axisid to a value or range of values.", See `Index and Coordinate Intervals <#id23>`_ "grid", "Regrid the result to the grid.", "Grid object" - "latitude", "Restrict latitude values to a value or range. Short form: lat", See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ - "level", "Restrict vertical levels to a value or range. Short form: lev",See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ - "longitude", "Restrict longitude values to a value or range. Short form: lon", See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ + "latitude", "Restrict latitude values to a value or range. Short form: lat", See `Index and Coordinate Intervals <#id23>`_ + "level", "Restrict vertical levels to a value or range. Short form: lev",See `Index and Coordinate Intervals <#id23>`_ + "longitude", "Restrict longitude values to a value or range. Short form: lon", See `Index and Coordinate Intervals <#id23>`_ "order", "Reorder the result.", "Order string, e.g., 'tzyx'" "raw", "Return a masked array (MV2.array) rather than a transient variable.", "0: return a transient variable (default); =1: return a masked array." "required", "Require that the axis IDs be present.", "List of axis identifiers." "squeeze", "Remove singleton dimensions from the result.", "0: leave singleton dimensions (default); 1: remove singleton dimensions." - "time", "Restrict time values to a value or range.", See `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ + "time", "Restrict time values to a value or range.", See `Index and Coordinate Intervals <#id23>`_ Another form of selector components is the positional form, where the component order corresponds to the axis order of a variable. For @@ -1752,7 +1745,7 @@ example: Reads data for the range (‘1979-1-1’,’1979-2-1’) of the first axis, and coordinate value 1000.0 of the second axis. Non-keyword arguments of the -form(s) listed in `Index and Coordinate Intervals <#table-index-and-coordinate-intervals>`_ are treated as positional. Such +form(s) listed in `Index and Coordinate Intervals <#id23>`_ are treated as positional. Such selectors are more concise, but not as general or flexible as the other types described in this section. diff --git a/docs/source/manual/cdms_appendix.rst b/docs/source/manual/cdms_appendix.rst index 46883120..7c0de232 100644 --- a/docs/source/manual/cdms_appendix.rst +++ b/docs/source/manual/cdms_appendix.rst @@ -48,16 +48,7 @@ Quick Start (Cheat Sheet) :scale: 25% :alt: cheat sheet -:download:`cdms quick start ` - - -VCS Quick Reference (Cheat Sheet) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. figure:: /manual/images/vcs_quick_ref.jpg - :scale: 25% - :alt: VCS Cheat Sheet - +https://cdms.readthedocs.io/en/latest/_downloads/793595691d2eefda847bfe76ce04238e/cdms_quick_start.pdf Release Notes diff --git a/docs/source/tvariable.rst b/docs/source/tvariable.rst index 8b0f7d13..26b541aa 100644 --- a/docs/source/tvariable.rst +++ b/docs/source/tvariable.rst @@ -131,6 +131,5 @@ tvariable TransientVariable.trace TransientVariable.transpose TransientVariable.unshare_mask - TransientVariable.var TransientVariable.view