-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev_geospatial_templates' into dev_geospatialtesting
- Loading branch information
Showing
33 changed files
with
6,119 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.analysis | ||
========================= | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: analysis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.auto\_template | ||
=============================== | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: auto_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.calc\_block | ||
============================ | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: calc_block |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.calc\_gid | ||
========================== | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: calc_gid |
6 changes: 6 additions & 0 deletions
6
docs/source/_autosummary/pvdeg.geospatial.output_template.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.output\_template | ||
================================= | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: output_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.plot\_Europe | ||
============================= | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: plot_Europe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.plot\_USA | ||
========================== | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: plot_USA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
.. Please when editing this file make sure to keep it matching the | ||
docs in ../configuration.rst:reference_to_examples | ||
pvdeg.geospatial | ||
================ | ||
|
||
.. automodule:: pvdeg.geospatial | ||
|
||
.. this is crazy | ||
Function Overview | ||
----------------- | ||
|
||
.. autosummary:: | ||
:toctree: | ||
:nosignatures: | ||
|
||
|
||
pvdeg.geospatial.analysis | ||
pvdeg.geospatial.auto_template | ||
pvdeg.geospatial.calc_block | ||
pvdeg.geospatial.calc_gid | ||
pvdeg.geospatial.output_template | ||
pvdeg.geospatial.plot_Europe | ||
pvdeg.geospatial.plot_USA | ||
pvdeg.geospatial.start_dask | ||
pvdeg.geospatial.template_parameters | ||
pvdeg.geospatial.zero_template | ||
|
||
|
||
|
||
|
||
.. this is crazy | ||
.. | ||
Functions | ||
--------- | ||
|
||
|
||
.. autofunction:: analysis | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.analysis: | ||
|
||
.. minigallery:: pvdeg.geospatial.analysis | ||
:add-heading: | ||
|
||
.. autofunction:: auto_template | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.auto_template: | ||
|
||
.. minigallery:: pvdeg.geospatial.auto_template | ||
:add-heading: | ||
|
||
.. autofunction:: calc_block | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.calc_block: | ||
|
||
.. minigallery:: pvdeg.geospatial.calc_block | ||
:add-heading: | ||
|
||
.. autofunction:: calc_gid | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.calc_gid: | ||
|
||
.. minigallery:: pvdeg.geospatial.calc_gid | ||
:add-heading: | ||
|
||
.. autofunction:: output_template | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.output_template: | ||
|
||
.. minigallery:: pvdeg.geospatial.output_template | ||
:add-heading: | ||
|
||
.. autofunction:: plot_Europe | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.plot_Europe: | ||
|
||
.. minigallery:: pvdeg.geospatial.plot_Europe | ||
:add-heading: | ||
|
||
.. autofunction:: plot_USA | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.plot_USA: | ||
|
||
.. minigallery:: pvdeg.geospatial.plot_USA | ||
:add-heading: | ||
|
||
.. autofunction:: start_dask | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.start_dask: | ||
|
||
.. minigallery:: pvdeg.geospatial.start_dask | ||
:add-heading: | ||
|
||
.. autofunction:: template_parameters | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.template_parameters: | ||
|
||
.. minigallery:: pvdeg.geospatial.template_parameters | ||
:add-heading: | ||
|
||
.. autofunction:: zero_template | ||
|
||
.. _sphx_glr_backref_pvdeg.geospatial.zero_template: | ||
|
||
.. minigallery:: pvdeg.geospatial.zero_template | ||
:add-heading: | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.start\_dask | ||
============================ | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: start_dask |
6 changes: 6 additions & 0 deletions
6
docs/source/_autosummary/pvdeg.geospatial.template_parameters.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.template\_parameters | ||
===================================== | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: template_parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pvdeg.geospatial.zero\_template | ||
=============================== | ||
|
||
.. currentmodule:: pvdeg.geospatial | ||
|
||
.. autofunction:: zero_template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _geospatial-templates: | ||
|
||
Geospatial Analysis | ||
=================== | ||
Using 3 dimensional labeled arrays (`Xarray`) we are able to run calculations using meteorological data across many points at once. This process has been parallelized using `dask` and `xarray`. Both of these packages can be run locally or on cloud HPC environments. | ||
|
||
This presents a new issue, our models produce outputs in many different shapes and sizes. We can have single numerical results, multiple numeric results or a timeseries of numeric results at each location. To parallelize this process, we cannot wait until runtime to know what shape to store the outputs in. This is where the need for `templates` arises. | ||
|
||
Previously, ``pvdeg.geospatial`` provided minimal templates and forced users to create their own for each function they wanted to use in a geospatial calculation. | ||
|
||
Auto-templating: allows users to skip creating templates for most functions within pvdeg by using ``pvdeg.geospatial.autotemplate`` to generate templates on the spot, instead of figuring out the output shape. For any given function within the source code decorated with `geospatial_result_type`, we can use `pvdeg.geospatial.autotemplate` | ||
|
||
|
||
Example | ||
-------- | ||
|
||
Here we are providing a function to autotemplate along with an ``Xarray.Dataset`` of weather data. Combining these two will give us enough information to produce an output template. | ||
|
||
Autotemplate approach to creating a template | ||
|
||
.. code-block:: Python | ||
edge_seal_template = pvdeg.geospatial.auto_template( | ||
func=pvdeg.design.edge_seal_width, | ||
ds_gids=geo_weather | ||
) | ||
Manual Approach to Creating the Sample Template | ||
|
||
.. code-block:: Python | ||
shapes = { | ||
"width" : ("gid",) # one return value at each datapoint, only dependent on datapoint, not time | ||
} | ||
template = pvdeg.geospatial.output_template( | ||
ds_gids=geo_weather, # xarray dataset | ||
shapes=shapes, # output shapes | ||
) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
v0.3.1 (2024-05-06) | ||
v0.3.3 (2024-05-06) | ||
======================= | ||
|
||
Bug Fixes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
v0.3.4 (2024-07-26) | ||
======================= | ||
|
||
Bug Fixes | ||
--------- | ||
* Fix incorrect keyword arguments in `pvdeg.standards.T98_estimate` | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
* Tobin Ford (:ghuser:`tobin-ford`) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
v0.4.0 (2024-07-29) | ||
======================= | ||
|
||
Enhancements | ||
--------- | ||
* Autotemplating system for geospatial analysis using `pvdeg.geospatial.autotemplate` | ||
* New module `pvdeg.decorators` that contains `pvdeg` specific decorator functions. | ||
* Implemented `geospatial_result_type` decorator to update functions and preform runtime introspection to determine if a function is autotemplate-able. | ||
* `Geospatial Templates.ipynb` notebook to showcase new and old templating functionality for users. | ||
|
||
Bug Fixes | ||
--------- | ||
* Added type hinting to many `pvdeg` functions | ||
* Replaced deprecated numba `jit(nopython=True)` calls with `njit` | ||
* Fixed whatsnew `v0.3.5` author | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
* Tobin Ford (:ghuser:`tobin-ford`) | ||
|
||
|
Oops, something went wrong.