| Description | Python Solar Radiation model |
| Author | aqreed aqreed@protonmail.com |
| Version | 0.1.3 |
| Python Version | 3.6 |
| Requires | Numpy, Matplotlib |
This packages aims to provide a reliable solar radiation model, mainly based on the work of Duffie, J.A., and Beckman, W. A., 1974, "Solar energy thermal processes".
The main purpose is to generate a solar beam irradiance (W/m2) prediction on:
- any plane, thanks to the calculation of the solar vector in NED (North East Down) coordinates, suitable for its use in flight dynamics simulations...
- any place of the earth, taking into account the solar time wrt the standard time, geometric altitude, the latitude influence on solar azimuth and solar altitude as well as sunset/sunrise time and hour angle, etc.
- any day of the year, taking into account the variations of the extraterrestrial radiation, the equation of time, the declination, etc., throughout the year
Example 1
Solar irradiance on the southern hemisphere on October 17, at sea-level 13.01UTC (plane pointing upwards)?
import numpy as np
from solarpy import irradiance_on_plane
from datetime import datetime
vnorm = np.array([0, 0, -1]) # plane pointing zenith
h = 0 # sea-level
date = datetime(2019, 10, 17, 13, 1) # year, month, day, hour, minute
lat = -23.5 # southern hemisphere
irradiance_on_plane(vnorm, h, date, lat)
A dedicated Jupyter Notebook on beam irradiance can be found here.
Example 2
Power output (in W) of a solar panel with the following characteristics:
- surface of 2.1 sqm
- efficiency of 0.2
- pointing upwards
- in NYC
- on December 25, at 16.15
from numpy import array
from solarpy import solar_panel
from datetime import datetime
panel = solar_panel(2.1, 0.2, id_name='NYC_xmas') # surface, efficiency and name
panel.set_orientation(array([0, 0, -1])) # upwards
panel.set_position(40.73, -73.93, 0) # NYC latitude, longitude, altitude
panel.set_datetime(datetime(2019, 12, 25, 16, 15)) # Christmas Day!
panel.power()
Example 3
Solar declination on August 5?
from solarpy import declination
from datetime import datetime
date = datetime(2019, 8, 5) # August 5
declination(date)
Please find more notebooks on the 'examples' folder that you can open locally, or just try to launch online interactive Jupyter notebooks.
NOTE: solarpy is under development and might change in the near future.
Dependencies
This package depends on Python, NumPy and Matplotlib and is usually tested on Linux with the following versions:
Python 3.6, NumPy 1.16, Matplotlib 3.0
Installation
solarpy has been written in Python3, and its version v0.1 is available in PyPi. It can be installed using:
$ pip install solarpy
To install in development mode:
$ git clone https://github.com/aqreed/solarpy.git
$ cd solarpy
$ pip install -e .
Testing
solarpy recommends py.test for running the test suite. Running from the top directory:
$ pytest
To test coverage (also from the top directory):
$ pytest --cov
Bug reporting
Please feel free to open an issue on GitHub!
License
MIT (see COPYING)
Metadata
Release files for solarpy 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solarpy-0.1.3.tar.gz | 9.1 kB | Without provenance | Details for solarpy-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solarpy-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for solarpy-0.1.3-py3-none-any.whl |
Total release size: 19.7 kB
Release files / solarpy-0.1.3.tar.gz
| Download URL | solarpy-0.1.3.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fbdf0dc8733909af007c02751c372fe73f0b67ff62dc19a1e46b35a2a890835
|
|
BLAKE2b-256 checksum How to use checksums |
b35355b16995c68bf381066eb9b2e55486ff46305099ef005cf9f312226390bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9
|
Release files / solarpy-0.1.3-py3-none-any.whl
| Download URL | solarpy-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f4812cf1a73451d2e898d85fcdf8d6ae4dd622d35accaa8232683f661a8fdfe
|
|
BLAKE2b-256 checksum How to use checksums |
37603558e32bd8a1ce0211b3c9a850ada9b1bc7e83088f39c0f5ec26ce2e6eba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9
|
Security for solarpy 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.