SolarUtils 0.3__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. {SolarUtils-0.3 → solarutils-0.4.8}/CHANGES.rst +57 -42
  2. {SolarUtils-0.3 → solarutils-0.4.8}/LICENSE +28 -28
  3. {SolarUtils-0.3 → solarutils-0.4.8}/MANIFEST.in +8 -8
  4. solarutils-0.4.8/PKG-INFO +106 -0
  5. {SolarUtils-0.3 → solarutils-0.4.8}/README.rst +80 -80
  6. solarutils-0.4.8/SolarUtils.egg-info/PKG-INFO +106 -0
  7. {SolarUtils-0.3 → solarutils-0.4.8}/SolarUtils.egg-info/SOURCES.txt +0 -5
  8. solarutils-0.4.8/SolarUtils.egg-info/requires.txt +4 -0
  9. {SolarUtils-0.3 → solarutils-0.4.8}/setup.cfg +7 -7
  10. {SolarUtils-0.3 → solarutils-0.4.8}/setup.py +203 -192
  11. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/NREL_DISCLAIMERS-COPYRIGHTS-LICENSES.txt +60 -60
  12. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/__init__.py +15 -15
  13. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/core.py +301 -301
  14. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/darwin.mk +115 -115
  15. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/Makefile +216 -216
  16. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/conf.py +303 -303
  17. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/core.rst +53 -53
  18. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/exceptions.rst +22 -22
  19. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/index.rst +27 -27
  20. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/make.bat +263 -263
  21. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/dummy.c +12 -12
  22. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/exceptions.py +122 -122
  23. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/linux.mk +70 -70
  24. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/README.rst +64 -64
  25. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/solpos/README.md +6 -6
  26. {SolarUtils-0.3/solar_utils/src → solarutils-0.4.8/solar_utils/src/orig/solpos}/solpos.c +999 -999
  27. {SolarUtils-0.3/solar_utils/src → solarutils-0.4.8/solar_utils/src/orig/solpos}/solpos00.h +364 -364
  28. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/spectrl2/README.md +7 -7
  29. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/spectrl2/spectest.c +188 -188
  30. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/spectrl2/spectrl2_2.c +496 -496
  31. {SolarUtils-0.3/solar_utils/src → solarutils-0.4.8/solar_utils/src/orig/spectrl2}/spectrl2_2.h +178 -178
  32. {SolarUtils-0.3/solar_utils/src/orig/solpos → solarutils-0.4.8/solar_utils/src}/solpos.c +999 -999
  33. {SolarUtils-0.3/solar_utils/src/orig/solpos → solarutils-0.4.8/solar_utils/src}/solpos00.h +364 -364
  34. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/solposAM.c +118 -118
  35. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/spectest.c +188 -188
  36. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/spectrl2.c +153 -155
  37. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/spectrl2_2.c +500 -500
  38. {SolarUtils-0.3/solar_utils/src/orig/spectrl2 → solarutils-0.4.8/solar_utils/src}/spectrl2_2.h +178 -178
  39. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/stest00.c +297 -297
  40. solarutils-0.4.8/solar_utils/tests/__init__.py +5 -0
  41. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/tests/test_cdlls.py +225 -224
  42. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/tests/test_spectrl2_data.json +153 -153
  43. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/win32.mk +83 -83
  44. SolarUtils-0.3/PKG-INFO +0 -94
  45. SolarUtils-0.3/SolarUtils.egg-info/PKG-INFO +0 -94
  46. SolarUtils-0.3/SolarUtils.egg-info/requires.txt +0 -4
  47. SolarUtils-0.3/solar_utils/docs/_build/html/_static/file.png +0 -0
  48. SolarUtils-0.3/solar_utils/docs/_build/html/_static/minus.png +0 -0
  49. SolarUtils-0.3/solar_utils/docs/_build/html/_static/plus.png +0 -0
  50. SolarUtils-0.3/solar_utils/docs/example.png +0 -0
  51. SolarUtils-0.3/solar_utils/docs/sp_2014_logo_black_orange_rgb.png +0 -0
  52. SolarUtils-0.3/solar_utils/tests/__init__.py +0 -7
  53. {SolarUtils-0.3 → solarutils-0.4.8}/SolarUtils.egg-info/dependency_links.txt +0 -0
  54. {SolarUtils-0.3 → solarutils-0.4.8}/SolarUtils.egg-info/top_level.txt +0 -0
  55. {SolarUtils-0.3/solar_utils/docs/_build/html/_images → solarutils-0.4.8/solar_utils/docs}/example.png +0 -0
  56. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/docs/favicon.ico +0 -0
  57. {SolarUtils-0.3/solar_utils/docs/_build/html/_static → solarutils-0.4.8/solar_utils/docs}/sp_2014_logo_black_orange_rgb.png +0 -0
  58. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/solpos/SOLPOS Documentation.pdf +0 -0
  59. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/solpos/stest00.c +0 -0
  60. {SolarUtils-0.3 → solarutils-0.4.8}/solar_utils/src/orig/spectrl2/SPECTRL2 documentation.pdf +0 -0
@@ -1,42 +1,57 @@
1
- Changes
2
- =======
3
-
4
- For more recent changes, please see
5
- `GitHub Releases <https://github.com/SunPower/SolarUtils/releases>`_.
6
-
7
- v0.2.1 - Bartenders (2016-07-11)
8
- --------------------------------
9
- * add documentation
10
- * add BSD 3-clause license
11
- * add NREL license and disclaimers
12
- * fix #5 - Wheel made after ``build_ext`` doesn't contain libs
13
-
14
- v0.2 - Bakers (2016-02-23)
15
- --------------------------
16
- * one source for all platforms
17
-
18
- v0.1.4 - Artists (2016-02-22)
19
- ------------------------------
20
- * fixes ``@rpath`` issue with darwin
21
-
22
- v0.1.3 - Actuaries (2016-02-19)
23
- -------------------------------
24
- * compatibility with Python-3
25
-
26
- v0.1.2 - Animal Trainers (2016-02-12)
27
- -------------------------------------
28
- * fix package names not platform specific
29
- * change linux to linux2 everywhere
30
-
31
- v0.1.1 - Actors (2016-02-12)
32
- ----------------------------
33
- * Linux x86-64 wheel with binaries in addition to MS Windows x86-64 wheel
34
- * fixed some namespace clashes
35
- * changed ``solar_utils.py`` to ``core.py``
36
- * changed ``solar_utils_exceptions.py`` to ``exceptions.py``
37
- * conformed to variable naming conventions, removed camelcase, use underscores
38
- * change use of builtin keyword ``code`` as variable to ``err_code``
39
-
40
- v0.1 - Astronauts (2016-02-12)
41
- -------------------------------------
42
- * use pip or setuptools to install
1
+ Changes
2
+ =======
3
+
4
+ For more recent changes, please see
5
+ `GitHub Releases <https://github.com/mikofski/SolarUtils/releases>`_.
6
+
7
+ v0.4.8 - Dentists (2026-10-22)
8
+ ------------------------------
9
+ * use pytest
10
+ * publish to PyPI
11
+ * publish docs
12
+
13
+ v0.4 - Doctors (2026-10-08)
14
+ ---------------------------
15
+ * apply conda-forge patches
16
+ * create github actions
17
+
18
+ v0.3 - Carpenters (2019-05-22)
19
+ ------------------------------
20
+ * adds ``get_solposAM`` and ``get_solpos8760``
21
+
22
+ v0.2.1 - Bartenders (2016-07-11)
23
+ --------------------------------
24
+ * add documentation
25
+ * add BSD 3-clause license
26
+ * add NREL license and disclaimers
27
+ * fix #5 - Wheel made after ``build_ext`` doesn't contain libs
28
+
29
+ v0.2 - Bakers (2016-02-23)
30
+ --------------------------
31
+ * one source for all platforms
32
+
33
+ v0.1.4 - Artists (2016-02-22)
34
+ ------------------------------
35
+ * fixes ``@rpath`` issue with darwin
36
+
37
+ v0.1.3 - Actuaries (2016-02-19)
38
+ -------------------------------
39
+ * compatibility with Python-3
40
+
41
+ v0.1.2 - Animal Trainers (2016-02-12)
42
+ -------------------------------------
43
+ * fix package names not platform specific
44
+ * change linux to linux2 everywhere
45
+
46
+ v0.1.1 - Actors (2016-02-12)
47
+ ----------------------------
48
+ * Linux x86-64 wheel with binaries in addition to MS Windows x86-64 wheel
49
+ * fixed some namespace clashes
50
+ * changed ``solar_utils.py`` to ``core.py``
51
+ * changed ``solar_utils_exceptions.py`` to ``exceptions.py``
52
+ * conformed to variable naming conventions, removed camelcase, use underscores
53
+ * change use of builtin keyword ``code`` as variable to ``err_code``
54
+
55
+ v0.1 - Astronauts (2016-02-12)
56
+ -------------------------------------
57
+ * use pip or setuptools to install
@@ -1,28 +1,28 @@
1
- Copyright (c) 2016, SunPower Corp.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without
5
- modification, are permitted provided that the following conditions are met:
6
-
7
- 1. Redistributions of source code must retain the above copyright notice,
8
- this list of conditions and the following disclaimer.
9
-
10
- 2. Redistributions in binary form must reproduce the above copyright notice,
11
- this list of conditions and the following disclaimer in the documentation
12
- and/or other materials provided with the distribution.
13
-
14
- 3. Neither the name of the copyright holder nor the names of its contributors
15
- may be used to endorse or promote products derived from this software without
16
- specific prior written permission.
17
-
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
- POSSIBILITY OF SUCH DAMAGE.
1
+ Copyright (c) 2026, Mark Mikofski Corp.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ 1. Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+
10
+ 2. Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors
15
+ may be used to endorse or promote products derived from this software without
16
+ specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
+ POSSIBILITY OF SUCH DAMAGE.
@@ -1,8 +1,8 @@
1
- include LICENSE
2
- include CHANGES.rst
3
- include solar_utils/docs/conf.py
4
- include solar_utils/docs/Makefile
5
- include solar_utils/docs/make.bat
6
- include solar_utils/docs/favicon.ico
7
- recursive-include solar_utils/docs *.png
8
- recursive-include solar_utils/docs *.rst
1
+ include LICENSE
2
+ include CHANGES.rst
3
+ include solar_utils/docs/conf.py
4
+ include solar_utils/docs/Makefile
5
+ include solar_utils/docs/make.bat
6
+ include solar_utils/docs/favicon.ico
7
+ recursive-include solar_utils/docs *.png
8
+ recursive-include solar_utils/docs *.rst
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: SolarUtils
3
+ Version: 0.4.8
4
+ Summary: Python wrappers around NREL SOLPOS and SPECTRL2
5
+ Home-page: https://github.com/mikofski/SolarUtils
6
+ Author: Mark Mikofski
7
+ Author-email: bwana.marko@yahoo.com
8
+ License: BSD 3-Clause
9
+ Platform: win32
10
+ Platform: linux
11
+ Platform: linux2
12
+ Platform: darwin
13
+ License-File: LICENSE
14
+ Provides-Extra: test
15
+ Requires-Dist: numpy; extra == "test"
16
+ Requires-Dist: pytest; extra == "test"
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: home-page
21
+ Dynamic: license
22
+ Dynamic: license-file
23
+ Dynamic: platform
24
+ Dynamic: provides-extra
25
+ Dynamic: summary
26
+
27
+ .. image:: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml/badge.svg
28
+ :target: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml
29
+
30
+ SolarUtils is set of Python wrappers around the publicly available
31
+ `NREL <http://www.nrel.gov/>`_
32
+ `SOLPOS <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/>`_ and
33
+ `SPECTRL2 <http://rredc.nrel.gov/solar/models/spectral/>`_ C-language computer
34
+ programs that calculate solar position and spectral decomposition. Please read
35
+ the `NREL disclaimer and license <http://www.nrel.gov/disclaimer.html>`_. Usage
36
+ of this software implies acceptance of the terms.
37
+
38
+ Installation
39
+ ============
40
+ Use ``pip`` to install
41
+ `SolarUtils from the PyPI <https://pypi.python.org/pypi/SolarUtils>`_::
42
+
43
+ pip install SolarUtils
44
+
45
+ You can also download a source distribution from PyPI or clone the repository
46
+ and use Python ``distutils``::
47
+
48
+ python setup.py install
49
+
50
+ Requirements
51
+ ============
52
+ SolarUtils has no requirements for usage however for installation, testing and
53
+ to build the documentaiton you will need the following pacakges:
54
+
55
+ * NumPy
56
+ * PyTest
57
+ * Sphinx
58
+
59
+ Usage
60
+ =====
61
+ See `SOLPOS Documentation <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/aboutsolpos.html>`_
62
+ and
63
+ `SPECTRL2 Documentation <http://rredc.nrel.gov/solar/models/spectral/spectrl2/documentation.html>`_
64
+ for more detail.
65
+
66
+ Examples
67
+ --------
68
+
69
+ >>> from solar_utils import *
70
+ >>> import pandas as pd
71
+ >>> location = [35.56836, -119.2022, -8.0]
72
+ >>> datetime = [2013, 6, 5, 12, 31, 0]
73
+ >>> weather = [1015.62055, 40.0]
74
+ >>> (angles, airmass) = solposAM(location, datetime, weather)
75
+ >>> zenith, azimuth = angles
76
+ >>> zenith
77
+ 15.074043273925781
78
+ >>> azimuth
79
+ 213.29042053222656]
80
+ >>> am, amp = airmass
81
+ >>> am
82
+ 1.0352272987365723
83
+ >>> amp
84
+ 1.0379053354263306]
85
+
86
+ >>> units = 1
87
+ >>> location = [33.65, -84.43, -5.0]
88
+ >>> datetime = [1999, 7, 22, 9, 45, 37]
89
+ >>> weather = [1006.0, 27.0]
90
+ >>> orientation = [33.65, 135.0]
91
+ >>> atmospheric_conditions = [1.14, 0.65, -1.0, 0.2, 1.36]
92
+ >>> albedo = [0.3, 0.7, 0.8, 1.3, 2.5, 4.0] + ([0.2] * 6)
93
+ >>> specdif, specdir, specetr, specglo, specx = spectrl2(
94
+ ... units, location, datetime, weather, orientation,
95
+ ... atmospheric_conditions, albedo
96
+ ... )
97
+ >>> spec = pd.DataFrame(
98
+ ... {'DIF': specdif, 'DIR': specdir, 'ETR': specetr, 'GLO': specglo},
99
+ ... index=specx
100
+ ... )
101
+ >>> f = spec.plot()
102
+ >>> f.set_title('Solar Spectrum Example')
103
+ >>> f.set_xlabel('Wavelength, $\lambda [\mu m]$')
104
+ >>> f.set_ylabel('Spectral Irradiance, $I_{\lambda} [W/m^2/\mu m]$')
105
+ >>> f.grid(True)
106
+ >>> f.figure.show()
@@ -1,80 +1,80 @@
1
- .. image:: https://travis-ci.org/SunPower/SolarUtils.svg?branch=master
2
- :target: https://travis-ci.org/SunPower/SolarUtils
3
-
4
- SolarUtils is set of Python wrappers around the publicly available
5
- `NREL <http://www.nrel.gov/>`_
6
- `SOLPOS <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/>`_ and
7
- `SPECTRL2 <http://rredc.nrel.gov/solar/models/spectral/>`_ C-language computer
8
- programs that calculate solar position and spectral decomposition. Please read
9
- the `NREL disclaimer and license <http://www.nrel.gov/disclaimer.html>`_. Usage
10
- of this software implies acceptance of the terms.
11
-
12
- Installation
13
- ============
14
- Use ``pip`` to install
15
- `SolarUtils from the PyPI <https://pypi.python.org/pypi/SolarUtils>`_::
16
-
17
- pip install SolarUtils
18
-
19
- You can also download a source distribution from PyPI or clone the repository
20
- and use Python ``distutils``::
21
-
22
- python setup.py install
23
-
24
- Requirements
25
- ============
26
- SolarUtils has no requirements for usage however for installation, testing and
27
- to build the documentaiton you will need the following pacakges:
28
-
29
- * NumPy
30
- * PyTest
31
- * Sphinx
32
-
33
- Usage
34
- =====
35
- See `SOLPOS Documentation <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/aboutsolpos.html>`_
36
- and
37
- `SPECTRL2 Documentation <http://rredc.nrel.gov/solar/models/spectral/spectrl2/documentation.html>`_
38
- for more detail.
39
-
40
- Examples
41
- --------
42
-
43
- >>> from solar_utils import *
44
- >>> import pandas as pd
45
- >>> location = [35.56836, -119.2022, -8.0]
46
- >>> datetime = [2013, 6, 5, 12, 31, 0]
47
- >>> weather = [1015.62055, 40.0]
48
- >>> (angles, airmass) = solposAM(location, datetime, weather)
49
- >>> zenith, azimuth = angles
50
- >>> zenith
51
- 15.074043273925781
52
- >>> azimuth
53
- 213.29042053222656]
54
- >>> am, amp = airmass
55
- >>> am
56
- 1.0352272987365723
57
- >>> amp
58
- 1.0379053354263306]
59
-
60
- >>> units = 1
61
- >>> location = [33.65, -84.43, -5.0]
62
- >>> datetime = [1999, 7, 22, 9, 45, 37]
63
- >>> weather = [1006.0, 27.0]
64
- >>> orientation = [33.65, 135.0]
65
- >>> atmospheric_conditions = [1.14, 0.65, -1.0, 0.2, 1.36]
66
- >>> albedo = [0.3, 0.7, 0.8, 1.3, 2.5, 4.0] + ([0.2] * 6)
67
- >>> specdif, specdir, specetr, specglo, specx = spectrl2(
68
- ... units, location, datetime, weather, orientation,
69
- ... atmospheric_conditions, albedo
70
- ... )
71
- >>> spec = pd.DataFrame(
72
- ... {'DIF': specdif, 'DIR': specdir, 'ETR': specetr, 'GLO': specglo},
73
- ... index=specx
74
- ... )
75
- >>> f = spec.plot()
76
- >>> f.set_title('Solar Spectrum Example')
77
- >>> f.set_xlabel('Wavelength, $\lambda [\mu m]$')
78
- >>> f.set_ylabel('Spectral Irradiance, $I_{\lambda} [W/m^2/\mu m]$')
79
- >>> f.grid(True)
80
- >>> f.figure.show()
1
+ .. image:: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml/badge.svg
2
+ :target: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml
3
+
4
+ SolarUtils is set of Python wrappers around the publicly available
5
+ `NREL <http://www.nrel.gov/>`_
6
+ `SOLPOS <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/>`_ and
7
+ `SPECTRL2 <http://rredc.nrel.gov/solar/models/spectral/>`_ C-language computer
8
+ programs that calculate solar position and spectral decomposition. Please read
9
+ the `NREL disclaimer and license <http://www.nrel.gov/disclaimer.html>`_. Usage
10
+ of this software implies acceptance of the terms.
11
+
12
+ Installation
13
+ ============
14
+ Use ``pip`` to install
15
+ `SolarUtils from the PyPI <https://pypi.python.org/pypi/SolarUtils>`_::
16
+
17
+ pip install SolarUtils
18
+
19
+ You can also download a source distribution from PyPI or clone the repository
20
+ and use Python ``distutils``::
21
+
22
+ python setup.py install
23
+
24
+ Requirements
25
+ ============
26
+ SolarUtils has no requirements for usage however for installation, testing and
27
+ to build the documentaiton you will need the following pacakges:
28
+
29
+ * NumPy
30
+ * PyTest
31
+ * Sphinx
32
+
33
+ Usage
34
+ =====
35
+ See `SOLPOS Documentation <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/aboutsolpos.html>`_
36
+ and
37
+ `SPECTRL2 Documentation <http://rredc.nrel.gov/solar/models/spectral/spectrl2/documentation.html>`_
38
+ for more detail.
39
+
40
+ Examples
41
+ --------
42
+
43
+ >>> from solar_utils import *
44
+ >>> import pandas as pd
45
+ >>> location = [35.56836, -119.2022, -8.0]
46
+ >>> datetime = [2013, 6, 5, 12, 31, 0]
47
+ >>> weather = [1015.62055, 40.0]
48
+ >>> (angles, airmass) = solposAM(location, datetime, weather)
49
+ >>> zenith, azimuth = angles
50
+ >>> zenith
51
+ 15.074043273925781
52
+ >>> azimuth
53
+ 213.29042053222656]
54
+ >>> am, amp = airmass
55
+ >>> am
56
+ 1.0352272987365723
57
+ >>> amp
58
+ 1.0379053354263306]
59
+
60
+ >>> units = 1
61
+ >>> location = [33.65, -84.43, -5.0]
62
+ >>> datetime = [1999, 7, 22, 9, 45, 37]
63
+ >>> weather = [1006.0, 27.0]
64
+ >>> orientation = [33.65, 135.0]
65
+ >>> atmospheric_conditions = [1.14, 0.65, -1.0, 0.2, 1.36]
66
+ >>> albedo = [0.3, 0.7, 0.8, 1.3, 2.5, 4.0] + ([0.2] * 6)
67
+ >>> specdif, specdir, specetr, specglo, specx = spectrl2(
68
+ ... units, location, datetime, weather, orientation,
69
+ ... atmospheric_conditions, albedo
70
+ ... )
71
+ >>> spec = pd.DataFrame(
72
+ ... {'DIF': specdif, 'DIR': specdir, 'ETR': specetr, 'GLO': specglo},
73
+ ... index=specx
74
+ ... )
75
+ >>> f = spec.plot()
76
+ >>> f.set_title('Solar Spectrum Example')
77
+ >>> f.set_xlabel('Wavelength, $\lambda [\mu m]$')
78
+ >>> f.set_ylabel('Spectral Irradiance, $I_{\lambda} [W/m^2/\mu m]$')
79
+ >>> f.grid(True)
80
+ >>> f.figure.show()
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: SolarUtils
3
+ Version: 0.4.8
4
+ Summary: Python wrappers around NREL SOLPOS and SPECTRL2
5
+ Home-page: https://github.com/mikofski/SolarUtils
6
+ Author: Mark Mikofski
7
+ Author-email: bwana.marko@yahoo.com
8
+ License: BSD 3-Clause
9
+ Platform: win32
10
+ Platform: linux
11
+ Platform: linux2
12
+ Platform: darwin
13
+ License-File: LICENSE
14
+ Provides-Extra: test
15
+ Requires-Dist: numpy; extra == "test"
16
+ Requires-Dist: pytest; extra == "test"
17
+ Dynamic: author
18
+ Dynamic: author-email
19
+ Dynamic: description
20
+ Dynamic: home-page
21
+ Dynamic: license
22
+ Dynamic: license-file
23
+ Dynamic: platform
24
+ Dynamic: provides-extra
25
+ Dynamic: summary
26
+
27
+ .. image:: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml/badge.svg
28
+ :target: https://github.com/mikofski/SolarUtils/actions/workflows/python-test.yml
29
+
30
+ SolarUtils is set of Python wrappers around the publicly available
31
+ `NREL <http://www.nrel.gov/>`_
32
+ `SOLPOS <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/>`_ and
33
+ `SPECTRL2 <http://rredc.nrel.gov/solar/models/spectral/>`_ C-language computer
34
+ programs that calculate solar position and spectral decomposition. Please read
35
+ the `NREL disclaimer and license <http://www.nrel.gov/disclaimer.html>`_. Usage
36
+ of this software implies acceptance of the terms.
37
+
38
+ Installation
39
+ ============
40
+ Use ``pip`` to install
41
+ `SolarUtils from the PyPI <https://pypi.python.org/pypi/SolarUtils>`_::
42
+
43
+ pip install SolarUtils
44
+
45
+ You can also download a source distribution from PyPI or clone the repository
46
+ and use Python ``distutils``::
47
+
48
+ python setup.py install
49
+
50
+ Requirements
51
+ ============
52
+ SolarUtils has no requirements for usage however for installation, testing and
53
+ to build the documentaiton you will need the following pacakges:
54
+
55
+ * NumPy
56
+ * PyTest
57
+ * Sphinx
58
+
59
+ Usage
60
+ =====
61
+ See `SOLPOS Documentation <http://rredc.nrel.gov/solar/codesandalgorithms/solpos/aboutsolpos.html>`_
62
+ and
63
+ `SPECTRL2 Documentation <http://rredc.nrel.gov/solar/models/spectral/spectrl2/documentation.html>`_
64
+ for more detail.
65
+
66
+ Examples
67
+ --------
68
+
69
+ >>> from solar_utils import *
70
+ >>> import pandas as pd
71
+ >>> location = [35.56836, -119.2022, -8.0]
72
+ >>> datetime = [2013, 6, 5, 12, 31, 0]
73
+ >>> weather = [1015.62055, 40.0]
74
+ >>> (angles, airmass) = solposAM(location, datetime, weather)
75
+ >>> zenith, azimuth = angles
76
+ >>> zenith
77
+ 15.074043273925781
78
+ >>> azimuth
79
+ 213.29042053222656]
80
+ >>> am, amp = airmass
81
+ >>> am
82
+ 1.0352272987365723
83
+ >>> amp
84
+ 1.0379053354263306]
85
+
86
+ >>> units = 1
87
+ >>> location = [33.65, -84.43, -5.0]
88
+ >>> datetime = [1999, 7, 22, 9, 45, 37]
89
+ >>> weather = [1006.0, 27.0]
90
+ >>> orientation = [33.65, 135.0]
91
+ >>> atmospheric_conditions = [1.14, 0.65, -1.0, 0.2, 1.36]
92
+ >>> albedo = [0.3, 0.7, 0.8, 1.3, 2.5, 4.0] + ([0.2] * 6)
93
+ >>> specdif, specdir, specetr, specglo, specx = spectrl2(
94
+ ... units, location, datetime, weather, orientation,
95
+ ... atmospheric_conditions, albedo
96
+ ... )
97
+ >>> spec = pd.DataFrame(
98
+ ... {'DIF': specdif, 'DIR': specdir, 'ETR': specetr, 'GLO': specglo},
99
+ ... index=specx
100
+ ... )
101
+ >>> f = spec.plot()
102
+ >>> f.set_title('Solar Spectrum Example')
103
+ >>> f.set_xlabel('Wavelength, $\lambda [\mu m]$')
104
+ >>> f.set_ylabel('Spectral Irradiance, $I_{\lambda} [W/m^2/\mu m]$')
105
+ >>> f.grid(True)
106
+ >>> f.figure.show()
@@ -26,11 +26,6 @@ solar_utils/docs/favicon.ico
26
26
  solar_utils/docs/index.rst
27
27
  solar_utils/docs/make.bat
28
28
  solar_utils/docs/sp_2014_logo_black_orange_rgb.png
29
- solar_utils/docs/_build/html/_images/example.png
30
- solar_utils/docs/_build/html/_static/file.png
31
- solar_utils/docs/_build/html/_static/minus.png
32
- solar_utils/docs/_build/html/_static/plus.png
33
- solar_utils/docs/_build/html/_static/sp_2014_logo_black_orange_rgb.png
34
29
  solar_utils/src/README.rst
35
30
  solar_utils/src/solpos.c
36
31
  solar_utils/src/solpos00.h
@@ -0,0 +1,4 @@
1
+
2
+ [test]
3
+ numpy
4
+ pytest
@@ -1,7 +1,7 @@
1
- [tool:pytest]
2
- norecursedirs = .git build dist venv
3
-
4
- [egg_info]
5
- tag_build =
6
- tag_date = 0
7
-
1
+ [tool:pytest]
2
+ norecursedirs = .git build dist venv
3
+
4
+ [egg_info]
5
+ tag_build =
6
+ tag_date = 0
7
+