Skip to content

Commit

Permalink
Deploying to gh-pages from @ 1d801ce 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchin committed Oct 23, 2024
1 parent 8310947 commit fa97c27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 90 deletions.
61 changes: 5 additions & 56 deletions dev-doc/grids.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ <h2 id="notes">Notes</h2>
static polygons in order to extract their plate IDs.</p></div>
</dd>
<dt id="gplately.grids.read_netcdf_grid"><code class="name flex">
<span>def <span class="ident">read_netcdf_grid</span></span>(<span>filename, return_grids=False, realign=False, resample=None, resize=None, x_dimension_name: str = '', y_dimension_name: str = '', data_variable_name: str = '')</span>
<span>def <span class="ident">read_netcdf_grid</span></span>(<span>filename, return_grids=False, realign=False, resample=None, resize=None)</span>
</code></dt>
<dd>
<div class="desc"><p>Read a <code>netCDF</code> (.nc) grid from a given <code>filename</code> and return its data as a
Expand Down Expand Up @@ -269,16 +269,6 @@ <h2 id="parameters">Parameters</h2>
<dt><strong><code>resize</code></strong> :&ensp;<code>tuple</code>, optional, default=<code>None</code></dt>
<dd>If passed as <code>resample = (resX, resY)</code>, the given <code>netCDF</code> grid is resized
to the number of columns (resX) and rows (resY).</dd>
<dt><strong><code>x_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "x", "lon", "lons" or "longitude", you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.</dd>
<dt><strong><code>y_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "y", "lat", "lats" or "latitude", you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.</dd>
<dt><strong><code>data_variable_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
Expand All @@ -294,7 +284,7 @@ <h2 id="returns">Returns</h2>
</dl></div>
</dd>
<dt id="gplately.grids.reconstruct_grid"><code class="name flex">
<span>def <span class="ident">reconstruct_grid</span></span>(<span>grid, partitioning_features, rotation_model, to_time, from_time=0.0, extent='global', origin=None, fill_value=None, threads=1, anchor_plate_id=0, x_dimension_name: str = '', y_dimension_name: str = '', data_variable_name: str = '')</span>
<span>def <span class="ident">reconstruct_grid</span></span>(<span>grid, partitioning_features, rotation_model, to_time, from_time=0.0, extent='global', origin=None, fill_value=None, threads=1, anchor_plate_id=0)</span>
</code></dt>
<dd>
<div class="desc"><p>Reconstruct a gridded dataset to a given reconstruction time.</p>
Expand Down Expand Up @@ -336,16 +326,6 @@ <h2 id="parameters">Parameters</h2>
<dd>Number of threads to use for certain computationally heavy routines.</dd>
<dt><strong><code>anchor_plate_id</code></strong> :&ensp;<code>int</code>, default <code>0</code></dt>
<dd>ID of the anchored plate.</dd>
<dt><strong><code>x_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "x", "lon", "lons" or "longitude", you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.</dd>
<dt><strong><code>y_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "y", "lat", "lats" or "latitude", you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.</dd>
<dt><strong><code>data_variable_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.</dd>
</dl>
<h2 id="returns">Returns</h2>
<dl>
Expand Down Expand Up @@ -468,7 +448,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="gplately.grids.Raster"><code class="flex name class">
<span>class <span class="ident">Raster</span></span>
<span>(</span><span>data=None, plate_reconstruction=None, extent='global', realign=False, resample=None, resize=None, time=0.0, origin=None, x_dimension_name: str = '', y_dimension_name: str = '', data_variable_name: str = '', **kwargs)</span>
<span>(</span><span>data=None, plate_reconstruction=None, extent='global', realign=False, resample=None, resize=None, time=0.0, origin=None, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>A class for working with raster data.</p>
Expand Down Expand Up @@ -578,16 +558,6 @@ <h2 id="parameters_1">Parameters</h2>
<dt><strong><code>origin</code></strong> :&ensp;<code>{'lower', 'upper'}</code>, optional</dt>
<dd>When <code>data</code> is an array, use this parameter to specify the origin
(upper left or lower left) of the data (overriding <code>extent</code>).</dd>
<dt><strong><code>x_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "x", "lon", "lons" or "longitude", you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.</dd>
<dt><strong><code>y_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "y", "lat", "lats" or "latitude", you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.</dd>
<dt><strong><code>data_variable_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.</dd>
<dt><strong><code>**kwargs</code></strong></dt>
<dd>Handle deprecated arguments such as <code>PlateReconstruction_object</code>,
<code>filename</code>, and <code>array</code>.</dd>
Expand Down Expand Up @@ -701,9 +671,6 @@ <h2 id="parameters_1">Parameters</h2>
resize=None,
time=0.0,
origin=None,
x_dimension_name: str = &#34;&#34;,
y_dimension_name: str = &#34;&#34;,
data_variable_name: str = &#34;&#34;,
**kwargs,
):
&#34;&#34;&#34;Constructs all necessary attributes for the raster object.
Expand Down Expand Up @@ -743,19 +710,6 @@ <h2 id="parameters_1">Parameters</h2>
When `data` is an array, use this parameter to specify the origin
(upper left or lower left) of the data (overriding `extent`).

x_dimension_name : str, optional, default=&#34;&#34;
If the grid file uses comman names, such as &#34;x&#34;, &#34;lon&#34;, &#34;lons&#34; or &#34;longitude&#34;, you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.

y_dimension_name : str, optional, default=&#34;&#34;
If the grid file uses comman names, such as &#34;y&#34;, &#34;lat&#34;, &#34;lats&#34; or &#34;latitude&#34;, you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.

data_variable_name : str, optional, default=&#34;&#34;
The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.

**kwargs
Handle deprecated arguments such as `PlateReconstruction_object`,
`filename`, and `array`.
Expand Down Expand Up @@ -819,9 +773,6 @@ <h2 id="parameters_1">Parameters</h2>
realign=realign,
resample=resample,
resize=resize,
x_dimension_name=x_dimension_name,
y_dimension_name=y_dimension_name,
data_variable_name=data_variable_name,
)
self._lons = lons
self._lats = lats
Expand All @@ -836,7 +787,7 @@ <h2 id="parameters_1">Parameters</h2>
self._lats = np.linspace(extent[2], extent[3], self.data.shape[0])
if realign:
# realign to -180,180 and flip grid
self._data, self._lons, self._lats = _realign_grid(
self._data, self._lons, self._lats = realign_grid(
self._data, self._lons, self._lats
)

Expand Down Expand Up @@ -1191,9 +1142,7 @@ <h2 id="parameters_1">Parameters</h2>
def save_to_netcdf4(self, filename, significant_digits=None, fill_value=np.nan):
&#34;&#34;&#34;Saves the grid attributed to the `Raster` object to the given `filename` (including
the &#34;.nc&#34; extension) in netCDF4 format.&#34;&#34;&#34;
write_netcdf_grid(
str(filename), self.data, self.extent, significant_digits, fill_value
)
write_netcdf_grid(str(filename), self.data, self.extent, significant_digits, fill_value)

def reconstruct(
self,
Expand Down
37 changes: 3 additions & 34 deletions dev-doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9976,7 +9976,7 @@ <h2 id="returns">Returns</h2>
</dd>
<dt id="gplately.Raster"><code class="flex name class">
<span>class <span class="ident">Raster</span></span>
<span>(</span><span>data=None, plate_reconstruction=None, extent='global', realign=False, resample=None, resize=None, time=0.0, origin=None, x_dimension_name: str = '', y_dimension_name: str = '', data_variable_name: str = '', **kwargs)</span>
<span>(</span><span>data=None, plate_reconstruction=None, extent='global', realign=False, resample=None, resize=None, time=0.0, origin=None, **kwargs)</span>
</code></dt>
<dd>
<div class="desc"><p>A class for working with raster data.</p>
Expand Down Expand Up @@ -10086,16 +10086,6 @@ <h2 id="parameters_1">Parameters</h2>
<dt><strong><code>origin</code></strong> :&ensp;<code>{'lower', 'upper'}</code>, optional</dt>
<dd>When <code>data</code> is an array, use this parameter to specify the origin
(upper left or lower left) of the data (overriding <code>extent</code>).</dd>
<dt><strong><code>x_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "x", "lon", "lons" or "longitude", you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.</dd>
<dt><strong><code>y_dimension_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>If the grid file uses comman names, such as "y", "lat", "lats" or "latitude", you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.</dd>
<dt><strong><code>data_variable_name</code></strong> :&ensp;<code>str</code>, optional, default=<code>""</code></dt>
<dd>The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.</dd>
<dt><strong><code>**kwargs</code></strong></dt>
<dd>Handle deprecated arguments such as <code>PlateReconstruction_object</code>,
<code>filename</code>, and <code>array</code>.</dd>
Expand Down Expand Up @@ -10209,9 +10199,6 @@ <h2 id="parameters_1">Parameters</h2>
resize=None,
time=0.0,
origin=None,
x_dimension_name: str = &#34;&#34;,
y_dimension_name: str = &#34;&#34;,
data_variable_name: str = &#34;&#34;,
**kwargs,
):
&#34;&#34;&#34;Constructs all necessary attributes for the raster object.
Expand Down Expand Up @@ -10251,19 +10238,6 @@ <h2 id="parameters_1">Parameters</h2>
When `data` is an array, use this parameter to specify the origin
(upper left or lower left) of the data (overriding `extent`).

x_dimension_name : str, optional, default=&#34;&#34;
If the grid file uses comman names, such as &#34;x&#34;, &#34;lon&#34;, &#34;lons&#34; or &#34;longitude&#34;, you need not set this parameter.
Otherwise, you need to tell us what the x dimension name is.

y_dimension_name : str, optional, default=&#34;&#34;
If the grid file uses comman names, such as &#34;y&#34;, &#34;lat&#34;, &#34;lats&#34; or &#34;latitude&#34;, you need not set this parameter.
Otherwise, you need to tell us what the y dimension name is.

data_variable_name : str, optional, default=&#34;&#34;
The program will try its best to determine the data variable name.
However, it would be better if you could tell us what the data variable name is.
Otherwise, the program will guess. The result may/may not be correct.

**kwargs
Handle deprecated arguments such as `PlateReconstruction_object`,
`filename`, and `array`.
Expand Down Expand Up @@ -10327,9 +10301,6 @@ <h2 id="parameters_1">Parameters</h2>
realign=realign,
resample=resample,
resize=resize,
x_dimension_name=x_dimension_name,
y_dimension_name=y_dimension_name,
data_variable_name=data_variable_name,
)
self._lons = lons
self._lats = lats
Expand All @@ -10344,7 +10315,7 @@ <h2 id="parameters_1">Parameters</h2>
self._lats = np.linspace(extent[2], extent[3], self.data.shape[0])
if realign:
# realign to -180,180 and flip grid
self._data, self._lons, self._lats = _realign_grid(
self._data, self._lons, self._lats = realign_grid(
self._data, self._lons, self._lats
)

Expand Down Expand Up @@ -10699,9 +10670,7 @@ <h2 id="parameters_1">Parameters</h2>
def save_to_netcdf4(self, filename, significant_digits=None, fill_value=np.nan):
&#34;&#34;&#34;Saves the grid attributed to the `Raster` object to the given `filename` (including
the &#34;.nc&#34; extension) in netCDF4 format.&#34;&#34;&#34;
write_netcdf_grid(
str(filename), self.data, self.extent, significant_digits, fill_value
)
write_netcdf_grid(str(filename), self.data, self.extent, significant_digits, fill_value)

def reconstruct(
self,
Expand Down

0 comments on commit fa97c27

Please sign in to comment.