Skip to content

Commit 2305c62

Browse files
authored
Docstanya (#318)
* Some changes to Regrid 2, Lib, esmf, gsRegrid and horizontal * Changes made to Chapters 1-7 and sample data * fix API documentation * rename regrid2 directory and delete print message * add module API files * add future and mock requirements * get cwd for readthedocs * Changes made to API * Changes made to API * Changes made to API * Changes to API * test rtd with mock * add future for readthedocs * create git.py in ../.. * add esmf * add print statements for regrid2 * add print for libregrid2 * restore regrid2.Lib for readthedocs * add mock modules * add git.py * try with new mock list * force git.py * force git.py * try readthedocs.yml file * fix readthedocs maping file * change type pdb to pdf * typo requirements.yml * add dependencies * add dependencies and change conf.yml * change API.rst and other rst files * Changes to API * UVCDAT_ANONYMOUS_LOG set to false * check if git.py is there * add gcc to environment.yml * try docker environment.yml * remove git.py * chage Libregrid to regrid2 * revert * revert * add cdms2 class * delet cdms2 class * delet cdms2 class * change conf.py os.path * Changes to API * Changes made to API * Changes to API * Changes made to API * Changes to API * Changes made to API * Changes made to API * Changes to API * Changes to API * Changes made to API * Changes made to API * Changes made to API * push latest rst files * Changes made to API * Made some changes to API * update documentations * Changes made to API * Changes made to API * Changes made to API * Changes made to Section 2 and API * Changes made to Section 2 * Changes made to Chapter 2 * Changes made to Section 2 * Changes made to Chapters 2, 3, 4,5 and 6 * Changes made to Sections 2, 4, 7 and Appendix * Changes made to Chapter 6 and Appendix * Changes made to Section 2 * update summary table for API * add generated files * Changes made to al sections * Changes made to Section 2 and API * Changes made to 2 and API * Made changes to sections 1 and 2 * Issue#231 (#232) * fix #225 passing transiant variable as axis * Fix macOSX * fix ESMF and NPY_STRING * fix data._mask comparison for numpy 1.14 * failing test from vcs added here (#234) * failing test from vcs added here * ok test passes again * reverted for now * commented out test for @durack1 * Cdmsdocsmerge (#223) * First cdms2 documentation revamp * latest changes * add new files and work on avariable documentations * fix index order * revamp documentation * Fixing cdms documentation (docstrings) * update documentation * continue to work on docs * sphinx doctest in manual.rst * chapter 1 continu * add requirments.txt for read-the-doc * move requirements.txt into docs dir * add requirements * Chapter 2 * add chapter 3 * finish chapter 3 started chapter 4 * flake8 python files * chapter 4 regridding * cdms_4 doctest * add other chapters * finish chapter 4 * add chapter 5 * add chapter 6 * cdms chapter 6 * fix TOC * add chapter 7 and appendix * merge docs * add requirements.txt * remove cdat_info * remote cdat_info * fix latex_logo png * pin pyopenssl to 17.2.0 due to myproxyclient failure in py3 * update TOC * work on tables and setup * try to force jquery 3.1 * just copy js script in _static * add highlight python * add sample dataset page * add sample dataset page * work on tables for cdms_2.rst * continue cdms2 documentations * update cdms2 tables * update sections * update table * finish chapter 2 * fix litteral error * unlink .dodsrc for cdscan * First changes from Tanya * some change in chapter 1 and 2 * some changes in Chapter 2 * fix tables * Some changes to Chapter 2 * Some Changes to Chapter 2 * Some changes made to Chapters 1, 2 and 4 * Some changes to Chapter 2 * Some Changes made to Chapter 2 * Some changes to Chapters 2, 3 and 4 * Some changes made to 1 through Appendix * Some Changes made to Chapter 2 * Some Changes to Chapters 1, 2, 3, 6 and Appendix * Some changes made to Chapters 1 thru 7 and appendix * Some changes to Chpaters 1, 2 and 3 * Changes made to Chapters 1, 4, 5 and Appendix * Some changes to Chapter 2 and 4 * Some Changes to Images, Chapter 3 and Appendix * update logo * add my logo * fix chapter 1 test * Fix python3 slice issue(setitem) and flake8 (#243) * fix python 3 aggregation issue and flake8 (#244) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * Netcdf46 (#249) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * Revert "Netcdf46 (#249)" (#250) This reverts commit a9e29ea. * Netcdf46 (#251) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * inverse dodsrc and curl commands * move unlink above cdscan test * fix ESGF test * add new dodsrc files * create dodsrc on-demand * put back tests for unstable * Netcdf46 (#252) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * inverse dodsrc and curl commands * move unlink above cdscan test * fix ESGF test * add new dodsrc files * create dodsrc on-demand * put back tests for unstable * instal anaconda-client before calling conda-upload * Changes made to API * Made some changes to API * Changes made to API * Changes made to API * Changes made to API * Changes made to Section 2 and API * Changes made to Section 2 * Changes made to Chapter 2 * Changes made to Section 2 * Changes made to Chapters 2, 3, 4,5 and 6 * Changes made to Sections 2, 4, 7 and Appendix * Changes made to Chapter 6 and Appendix * Changes made to Section 2 * Changes made to al sections * Changes made to Section 2 and API * Changes made to 2 and API * Made changes to sections 1 and 2 * Issue#231 (#232) * fix #225 passing transiant variable as axis * Fix macOSX * fix ESMF and NPY_STRING * fix data._mask comparison for numpy 1.14 * Fix python3 slice issue(setitem) and flake8 (#243) * fix python 3 aggregation issue and flake8 (#244) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * Netcdf46 (#249) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * Revert "Netcdf46 (#249)" (#250) This reverts commit a9e29ea. * Netcdf46 (#251) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * inverse dodsrc and curl commands * move unlink above cdscan test * fix ESGF test * add new dodsrc files * create dodsrc on-demand * put back tests for unstable * Netcdf46 (#252) * Fix python3 slice issue(setitem) and flake8 * update to libnetcdf 4.6 * try circleci unstable label * try version 2 circleci * try version 2 circleci * change workflow name * change cdtime to cdms * add certificate to circleci * add fix conda-upload in circleci 2.0 * update prep_for_build version * fix curl command * fix cicleci for cdms * use unstable channel change uvcdat for cdat * build cdms on circleci 2.0 * fix circleci config.yml * change Users/distiler to /Users/denisnadeau * add gcc_linux * add LDSHARED for linux * disable cert and py results * add gcc_linux-64 * change cdscan link * fix myproxy * add esmf and esmpy to py3 env * inverse dodsrc and curl commands * move unlink above cdscan test * fix ESGF test * add new dodsrc files * create dodsrc on-demand * put back tests for unstable * instal anaconda-client before calling conda-upload * Fix table titles * Change made to Section 4 * fix bindex issue in hgrid * Changes to all * Corrections made to API Lib * Changes to API * fix ascii art * Changes to Sections 2, 4 and 5 * Changes made to all * Changes made to Sections 2, 6 and Appendix * Changes made to Section 2 * Changes made to Section 2 * Changes made to Section 2 and 5 * Changes to Sections 2, 6 and 7 * Changes to API * Changes made to API * Made Changes to API * Changes made to API * Changes made to Section 4 and 7 * Changes made to API * Changes made to API * Revisit run tests (#262) * migrate run_tests.py to use TestRunnerBase * remove accidentally added tests/coverage.json * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * revisit run_tests.py * add cacert.pem in run_tests.py when running cdms test within the lab * add cacert.pem in run_tests.py when running cdms test within the lab * add cacert.pem in run_tests.py when running cdms test within the lab * add cacert.pem in run_tests.py when running cdms test within the lab - rerun tests * add cacert.pem in run_tests.py when running cdms test within the lab - remove install from -c cdat/label/unstable * put back -c cdat/label/unstable * fix Axis.py * update documentation * fix environment dependencies * add/remote generated files * try to fix API.rst * add regrid2 to docs * Changes made to API * fix space with parameters * fix readthedocs using numpydoc * update environment * fix some autodocs * add hgrid * Changes made to API * Changes made to API * fix avariable bad location methods * Changes to Appendix and API * Changes to Chapter 1 and 2 * Changes made to Section 2 * Changes made to Section 2 * Changes made to Section 2 * Changes to sections 1, 2, 3 and 4 * Changes to section 2 * Changes made to entire docuemnt * Changes to Section 1 and 2 * Changes made to Section 2 * Changes made to Sections 2 thru 6 * Changes made to Chapters 3 and 6 * add jupyter notebook * Changes to all * Changes to Jupyter Notebooks * Changes to all * update documentation for version 3.1.0 * merge documentations * change banner and sidebar colors * Changes to API * fix style sheet * Changes to API * Changes to API * Changes to API and Sections * Changes to all * will this fix master? (#292) * Changes to Sections 1 and 2 * fix cdtime and scripts * trigger read-the-docs * fix more cdtime doc issues * fix typo Default-Calendar * fix conflicts * pass flake8 * udpate chapter1 * Changes * add jupyter notebook * jupyter chapter1 fixed * cleanup chapter 1 jupyter * add tmp_T42_to_POP43_conserv file * chapter 2 and chapter 3 * Changes to Jupyter Notebooks 1 and 2 * clean up * update chapter4 * chapter 4 regridder opendap * chapter 2 using OpenDAP * chapter 2 using OpenDAP * update all chapters * add chapter4 * Changes to Jupiter Notebooks 1 and 2 * Changes to Jupyter Notebooks 1a and 2a * Changes to Jupyter Notebooks 1a, 2a, 3a, 4a * Changes to Jupyter Notebooks 1a, 2a, 3a,4a, 5a * Changes to Jupyter Notebooks 1a thru 4a * Changes to Section 1, 2 * Changes to Sections 1 and 2 * Changes to Sections 1-3 * Changes to Jupyter Notebooks * Changes to Chapters 2, 5 and 6 * Changes to Sections 1 and 2 * Changes to API * fix double Notes section * Changes to API * Changes made to API * Change to API * Changes to API * Changes to API * Changes to Sections * Changes to Sections * Changes to Section 1 * Changes to all * Changes to Sections 2 and 4 * flake8 files * Changes to sections * update readthedocs to py3 * update environment.yml to 3.1.2 * fix environment.yml for readthedocs * add easydev to readthedocs env yaml * change sys.prefix to 3.7 * try to add lazy-object and change env * enable javascript button
1 parent 58bd609 commit 2305c62

File tree

9 files changed

+733
-1181
lines changed

9 files changed

+733
-1181
lines changed

docs/source/manual/cdms_1.rst

Lines changed: 102 additions & 142 deletions
Large diffs are not rendered by default.

docs/source/manual/cdms_2.rst

Lines changed: 346 additions & 760 deletions
Large diffs are not rendered by default.

docs/source/manual/cdms_3.rst

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Time Types
2626
The ``cdtime`` module implements the CDMS time types, methods, and
2727
calendars. These are made available with the command:
2828

29-
.. doctest::
29+
::
3030

3131
>>> import cdtime
3232

@@ -77,11 +77,11 @@ Time Constructors
7777
^^^^^^^^^^^^^^^^^
7878

7979
The following table describes the methods for creating time types.
80-
80+
8181
Time Constructors
8282
~~~~~~~~~~~~~~~~~
8383

84-
.. csv-table::
84+
.. csv-table::
8585
:header: "Type", "Constructor", "Defintion"
8686
:widths: 10, 40, 80
8787
:align: left
@@ -103,7 +103,7 @@ A component time type has six members, all of which are settable.
103103

104104
Component Time
105105
~~~~~~~~~~~~~~
106-
.. csv-table::
106+
.. csv-table::
107107
:header: "Type", "Name", "Summary"
108108
:widths: 15, 15, 50
109109

@@ -121,113 +121,113 @@ The following methods apply both to relative and component times.
121121

122122
Time Methods
123123
~~~~~~~~~~~~
124-
.. csv-table::
124+
.. csv-table::
125125
:header: "Type", "Method", "Definition"
126126
:widths: 35, 42, 80
127127
:align: left
128128

129-
"Comptime or Reltime", "``t.add(value,intervalUnits, cdtime.DefaultCalendar)``", "Add an interval of time to a time type t.
129+
"Comptime or Reltime", "``t.add(value,intervalUnits, cdtime.DefaultCalendar)``", "Add an interval of time to a time type t.
130130
Returns the same type of time.
131131
* ``value`` is the Float number of interval units.
132132
* ``intervalUnits`` is ``cdtime.
133133
* [Second (s) | Minute(s) Hour(s) | Day(s) | Week(s) | Month(s) | Season(s) | Year(s) ]``
134134
* ``calendar`` is the calendar type."
135-
"Integer", "``t.cmp(t2, cdtime.DefaultCalendar)``", "Compare time values t and t2.
135+
"Integer", "``t.cmp(t2, cdtime.DefaultCalendar)``", "Compare time values t and t2.
136136
Returns -1, 0, 1 as t is less than, equal to,
137137
or greater than t2 respectively.
138138
* ``t2`` is the time to compare.
139139
* ``calendar`` is the calendar type."
140-
"Comptime or Reltime", "``t.sub(value,intervalUnits, cdtime.DefaultCalendar)``", "Subtract an interval of time from a time type t.
140+
"Comptime or Reltime", "``t.sub(value,intervalUnits, cdtime.DefaultCalendar)``", "Subtract an interval of time from a time type t.
141141
Returns the same type of time.
142142
* ``value`` is the Float number of interval units.
143143
* ``intervalUnits`` is cdtime.[Second (s) | Minute(s) | Hour(s) | Day(s) | Week(s) | Month(s) | Season(s) | Year(s)]
144144
* ``calendar`` is the calendar type. "
145-
"Comptime", "``t.tocomp(cdtime.DefaultCalendar)``", "Convert to component time.
145+
"Comptime", "``t.tocomp(cdtime.DefaultCalendar)``", "Convert to component time.
146146
Returns the equivalent component time.
147147
* ``calendar`` is the calendar type."
148-
"Reltime", "``t.torel(units, cdtime.DefaultCalendar)``", "Convert to relative time.
148+
"Reltime", "``t.torel(units, cdtime.DefaultCalendar)``", "Convert to relative time.
149149
Returns the equivalent relative time."
150-
150+
151151

152152
Examples
153153
^^^^^^^^
154-
::
154+
155+
::
155156

156157
>>> import cdtime
157158
>>> c = cdtime.comptime(1996,2,28)
158-
>>> r = cdtime.reltime(28,"days since 1996-1-1")
159+
>>> r = cdtime.reltime(28,"days since 1996-1-1")
159160
>>> print r.add(1, cdtime.Day)
160161
29.000000 days since 1996-1-1
161162
>>> print c.add(36, cdtime.Hours)
162-
1996-2-29 12:0:0.0
163+
1996-2-29 12:0:0.0
163164

164165

165166
**Note:** When adding or subtracting intervals of months or years, only the month and year of the result are significant. The reason is that intervals in months/years are not commensurate with intervals in days or fractional days. This leads to results that may be surprising.
166167

167-
..
168+
::
169+
170+
>>> c = comptime(1979,8,31)
171+
>>> c.add(1, cdtime.Month)
172+
1979-9-1 0:0:0.0
173+
168174

169-
>>> c = comptime(1979,8,31)
170-
>>> c.add(1, cdtime.Month)
171-
1979-9-1 0:0:0.0
172-
175+
In other words, the day component of c was ignored in the addition, and the day/hour/minute components of the results are just the defaults. If the interval is in years, the interval is converted internally to months:
173176

174-
In other words, the day component of c was ignored in the addition, and the day/hour/minute components of the results are just the defaults. If the interval is in years, the interval is converted internally to months:
175-
176-
..
177+
::
177178

178-
>>> c = comptime(1979,8,31)
179-
>>> c.add(2, cdtime.Years)
180-
1981-8-1 0:0:0.0
179+
>>> c = comptime(1979,8,31)
180+
>>> c.add(2, cdtime.Years)
181+
1981-8-1 0:0:0.0
181182

182183
Compare time values.
183-
184-
..
185184

186-
>>> import cdtime
187-
>>> r = cdtime.reltime(28,"days since 1996-1-1")
188-
>>> c = cdtime.comptime(1996,2,28)
189-
>>> print c.cmp(r)
185+
::
186+
187+
>>> import cdtime
188+
>>> r = cdtime.reltime(28,"days since 1996-1-1")
189+
>>> c = cdtime.comptime(1996,2,28)
190+
>>> print c.cmp(r)
191+
1
192+
>>> print r.cmp(c)
193+
-1
194+
>>> print r.cmp(r)
190195
1
191196

192-
.. >>> print r.cmp(c)
193-
.. -1
194-
.. >>> print r.cmp(r)
195-
.. 1
196-
197197
Subtract an interval of time.
198198

199-
..
199+
::
200200

201201
>>> import cdtime
202-
>>> r = cdtime.reltime(28, "days since 1996-1-1")
203-
>>> c = cdtime.comptime(1996, 2, 28)
204-
>>> print r.sub(10, cdtime.Days)
205-
18.000000 days since 1996-1-1
206-
>>> print c.sub(30, cditme.Days)
207-
1996-1-29 0:0:0.0
208-
209-
202+
>>> r = cdtime.reltime(28, "days since 1996-1-1")
203+
>>> c = cdtime.comptime(1996, 2, 28)
204+
>>> print r.sub(10, cdtime.Days)
205+
18.000000 days since 1996-1-1
206+
>>> print c.sub(30, cditme.Days)
207+
1996-1-29 0:0:0.0
208+
209+
210210
For intervals of years or months, see the **note** under add() in the example above.
211211

212212
Convert to component time.
213213

214-
..
214+
::
215215

216-
>>> r = cdtime.reltime(28,"days since 1996-1-1")
216+
>>> r = cdtime.reltime(28,"days since 1996-1-1")
217217
>>> r.tocomp()
218-
1996-1-29 0:0:0.0
218+
1996-1-29 0:0:0.0
219219

220220

221221
Convert to relative time.
222222

223-
..
224-
225-
>>> c = comptime(1996,2,28)
226-
>>> print c.torel("days since 1996-1-1")
227-
58.000000 days since 1996-1-1
228-
>>> r = reltime(28,"days since 1996-1-1")
229-
>>> print r.torel("days since 1995")
230-
393.000000 days since 1995
231-
>>> print r.torel("days since 1995").value
232-
393.0
223+
::
224+
225+
>>> c = comptime(1996,2,28)
226+
>>> print c.torel("days since 1996-1-1")
227+
58.000000 days since 1996-1-1
228+
>>> r = reltime(28,"days since 1996-1-1")
229+
>>> print r.torel("days since 1995")
230+
393.000000 days since 1995
231+
>>> print r.torel("days since 1995").value
232+
393.0
233233

docs/source/manual/cdms_4.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ SCRIP Horizontal Regridder
116116

117117
To interpolate between grids where one or both grids is non-rectangular,
118118
CDMS provides an interface to the SCRIP regridder package developed at
119-
Los Alamos National Laboratory (https://oceans11.lanl.gov/trac/SCRIP).
119+
Los Alamos National Laboratory (https://oceans11.lanl.gov/trac/SCRIP).
120120

121121
Figure 3 illustrates the process:
122122

@@ -159,12 +159,12 @@ In this example:
159159

160160
>>> &remap_inputs
161161
>>> num_maps = 1
162-
>>>
162+
>>>
163163
>>> grid1_file = 'remap_grid_T42.nc'
164164
>>> grid2_file = 'remap_grid_POP43.nc'
165165
>>> interp_file1 = 'rmp_T42_to_POP43_conserv.nc'
166166
>>> interp_file2 = 'rmp_POP43_to_T42_conserv.nc'
167-
>>> map1_name = 'T42 to POP43 Conservative Mapping'
167+
>>> map1_name = 'T42 to POP43 Conservative Mapping'
168168
>>> map2_name = 'POP43 to T42 Conservative Mapping'
169169
>>> map_method = 'conservative'
170170
>>> normalize_opt = 'frac'
@@ -303,14 +303,14 @@ input to output grids.
303303
CDMS Regridder Constructor
304304
~~~~~~~~~~~~~~~~~~~~~~~~~~
305305

306-
.. csv-table::
306+
.. csv-table::
307307
:header: "Constructor", "Description"
308308
:widths: 50, 90
309309
:align: left
310310

311311
"``regridFunction = Regridder(inputGrid, outputGrid)``", "Create a regridder function which interpolates a data array from
312312
input to output grid.
313-
* `CDMS regridder functions`_ describes the calling sequence of this function.
313+
* `CDMS regridder functions`_ describes the calling sequence of this function.
314314
* ``inputGrid`` and ``outputGrid`` are CDMS grid objects.
315315
**Note:** To set the mask associated with inputGrid or outputGrid, use the grid setMask function."
316316

@@ -323,7 +323,7 @@ function:
323323
SCRIP Regridder Constructor
324324
~~~~~~~~~~~~~~~~~~~~~~~~~~~
325325

326-
.. csv-table::
326+
.. csv-table::
327327
:header: "Constructor", "Description"
328328
:widths: 80, 90
329329
:align: left
@@ -337,7 +337,7 @@ SCRIP Regridder Constructor
337337
* ``'distwgt'``: distance-weighted interpolation.
338338
* It is only necessary to specify the map method if it is not defined in the file.
339339
* If ``checkGrid`` is 1 (default), the grid cells are checked for convexity, and 'repaired' if necessary.
340-
* Grid cells may appear to be nonconvex if they cross a ``0 / 2pi`` boundary.
340+
* Grid cells may appear to be nonconvex if they cross a ``0 / 2pi`` boundary.
341341
* The repair consists of shifting the cell vertices to the same side modulo 360 degrees."
342342

343343
Regridder Functions
@@ -358,7 +358,7 @@ A CDMS regridder function is an instance of the CDMS ``Regridder``
358358
class. The function is associated with rectangular input and output
359359
grids. Typically its use is straightforward:
360360
* The function is passed an input array and returns the regridded array.
361-
However, when the array has missing data, or the input and/or output
361+
However, when the array has missing data, or the input and/or output
362362
grids are masked, the logic becomes more complicated.
363363

364364
Step 1
@@ -407,7 +407,7 @@ grid cells which completely overlap input grid cells with missing values
407407
CDMS Regridder Function
408408
~~~~~~~~~~~~~~~~~~~~~~~
409409

410-
.. csv-table::
410+
.. csv-table::
411411
:header: "Type", "Function", "Description"
412412
:widths: 40, 40, 80
413413
:align: left
@@ -425,13 +425,13 @@ CDMS Regridder Function
425425
* ``order`` is a string indicating the order of dimensions of the array. It has the form returned from ``variable.getOrder().``
426426
* ``mask`` is a Numpy array, of datatype Integer or Float, consisting of a fractional number between 0 and 1.
427427
* A value of 1 or 1.0 indicates that the corresponding data value is to be ignored for purposes of regridding.
428-
* A value of 0 or 0.0 indicates that the corresponding data value is valid. This is consistent with the convention for masks used by the MV2 module.
428+
* A value of 0 or 0.0 indicates that the corresponding data value is valid. This is consistent with the convention for masks used by the MV2 module.
429429
* A fractional value between 0.0 and 1.0 indicates the fraction of the data value (e.g., the corresponding cell) to be ignored when regridding. This is useful if a variable is regridded first to grid A and then to another grid B; the mask when regridding from A to B would be (1.0 - f) where f is the maskArray returned from the initial grid operation using the ``returnTuple`` argument."
430430

431431
DMS Regridder Function(cont'd)
432432
~~~~~~~~~~~~~~~~~~~~~~~
433433

434-
.. csv-table::
434+
.. csv-table::
435435
:header: "Type", "Function", "Description"
436436
:widths: 40, 40, 80
437437
:align: left
@@ -442,10 +442,10 @@ DMS Regridder Function(cont'd)
442442
Variable, a TransientVariable of the same
443443
rank as the input array is returned, otherwise
444444
a masked array is returned.
445-
* If ``mask`` is two-dimensional of the same shape as the input grid, it overrides the mask of the input grid.
446-
* If the ``mask`` has more than two dimensions, it must have the same shape as ``array``. In this case, the ``missing`` data value is also ignored. Such an ndimensional mask is useful if the pattern of missing data varies with level (e.g., ocean data) or time.
445+
* If ``mask`` is two-dimensional of the same shape as the input grid, it overrides the mask of the input grid.
446+
* If the ``mask`` has more than two dimensions, it must have the same shape as ``array``. In this case, the ``missing`` data value is also ignored. Such an ndimensional mask is useful if the pattern of missing data varies with level (e.g., ocean data) or time.
447447
**Note:** If neither ``missing`` or ``mask`` is set, the default mask is obtained from the mask of the array if any."
448-
"Array, Array", "``regridFunction (ar, missing=None, order=None, mask=None, returnTuple=1)``", "If called with the optional ``returnTuple``
448+
"Array, Array", "``regridFunction (ar, missing=None, order=None, mask=None, returnTuple=1)``", "If called with the optional ``returnTuple``
449449
argument equal to 1, the function returns a tuple ``dataArray``, ``maskArray``).
450450
* ``dataArray`` is the result data array.
451451
* ``maskArray`` is a Float32 array of the same shape as ``dataArray``, such that ``maskArray[i,j]`` is fraction of the output grid cell [i,j] overlapping a non-missing cell of the grid."
@@ -494,23 +494,23 @@ for source and target grids.
494494
SCRIP Regridder Functions
495495
~~~~~~~~~~~~~~~~~~~~~~~~~
496496

497-
.. csv-table::
497+
.. csv-table::
498498
:header: "Return Type", "Method", "Description"
499499
:widths: 30, 45, 80
500500
:align: left
501501

502-
"Array or Transient-Variable", "[conservative, bilinear, and distance-weighted regridders] ``regridFunction(array)``", "Interpolate a gridded data array to a new grid.
503-
The return value is the regridded data variable.
502+
"Array or Transient-Variable", "[conservative, bilinear, and distance-weighted regridders] ``regridFunction(array)``", "Interpolate a gridded data array to a new grid.
503+
The return value is the regridded data variable.
504504
* ``array`` is a Variable, MaskedArray, or Numpy array.
505-
* The rank of the array may be greater than the rank of the input grid, in which case the input grid shape must match a trailing portion of the array shape.
506-
* For example, if the input grid is curvilinear with shape (64,128), the last two dimensions of the array must match.
505+
* The rank of the array may be greater than the rank of the input grid, in which case the input grid shape must match a trailing portion of the array shape.
506+
* For example, if the input grid is curvilinear with shape (64,128), the last two dimensions of the array must match.
507507
* Similarly, if the input grid is generic with shape (2560,), the last dimension of the array must have that length."
508508
"Array or Transient-Variable", "[bicubic regridders] ``regridFunction(array, gradientLat, gradientLon, gradientLatLon)``", "Interpolate a gridded data array to a new grid,
509-
using a bicubic regridder.
509+
using a bicubic regridder.
510510
The return value is the regridded data variable.
511-
* ``array`` is a Variable, MaskedArray, or Numpy array.
512-
* The rank of the array may be greater than the rank of the input grid, in which case the input grid shape must match a trailing portion of the array shape.
513-
* For example, if the input grid is curvilinear with shape (64,128), the last two dimensions of the array must match.
511+
* ``array`` is a Variable, MaskedArray, or Numpy array.
512+
* The rank of the array may be greater than the rank of the input grid, in which case the input grid shape must match a trailing portion of the array shape.
513+
* For example, if the input grid is curvilinear with shape (64,128), the last two dimensions of the array must match.
514514
* Simiarly, if the input grid is generic with shape (2560,), the last dimension of the array must have that length.
515515
* ``gradientLat``: df/di (see the SCRIP documentation). Same shape as ``array``.
516516
* ``gradientLon``: df/dj. Same shape as ``array``.
@@ -519,21 +519,21 @@ SCRIP Regridder Functions
519519
SCRIP Regridder Functions(con'td)
520520
~~~~~~~~~~~~~~~~~~~~~~~~~
521521

522-
.. csv-table::
522+
.. csv-table::
523523
:header: "Return Type", "Method", "Description"
524524
:widths: 30, 45, 80
525525
:align: left
526526

527527

528-
"Numpy array", "``getDestinationArea()`` [conservative regridders only]", "Return the area of the destination (output) grid cell.
528+
"Numpy array", "``getDestinationArea()`` [conservative regridders only]", "Return the area of the destination (output) grid cell.
529529
* The array is 1-D, with length equal to the number of cells in the output grid."
530530
"Numpy array", "``getDestination Fraction()``", "Return the area fraction of the destination (output)
531-
grid cell that participates in the regridding.
531+
grid cell that participates in the regridding.
532532
* The array is 1-D, with length equal to the number of cells in the output grid."
533533
"CurveGrid or Generic-Grid", "``getInputGrid()``", "Return the input grid, or None if no input grid is associated with the regridder."
534534
"CurveGrid or Generic-Grid", "``getOutputGrid()``", "Return the output grid."
535535
"Numpy array", "``getSourceFraction()``", "Return the area fraction of the source (input)
536-
grid cell that participates in the regridding.
536+
grid cell that participates in the regridding.
537537
* The array is 1-D, with length equal to the number of cells in the input grid"
538538

539539
Examples
@@ -548,7 +548,7 @@ Regrid data to a uniform output grid.
548548

549549
::
550550

551-
551+
552552
>>> import cdms2
553553
>>> from regrid2 import Regridder
554554
>>> f = cdms2.open('clt.nc')
@@ -645,7 +645,7 @@ Generate an array of zonal mean values.
645645
Regrid an array with missing data, and calculate the area-weighted mean
646646
of the result.
647647

648-
::
648+
::
649649

650650
>>> import cdms2
651651
>>> from cdms2.MV2 import *

0 commit comments

Comments
 (0)