Skip to content

Commit e74644b

Browse files
committed
Re-Name and Update
1 parent d6a474d commit e74644b

File tree

144 files changed

+32021
-5878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+32021
-5878
lines changed

pvlib_python/.gitignore renamed to .gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
33
*.py[cod]
4+
*.ipynb
45

56
# C extensions
67
*.so
@@ -16,6 +17,8 @@ lib64/
1617
parts/
1718
sdist/
1819
var/
20+
Drafts/
21+
1922
*.egg-info/
2023
.installed.cfg
2124
*.egg
@@ -46,5 +49,5 @@ coverage.xml
4649
*.log
4750
*.pot
4851

49-
# Sphinx documentation
50-
docs/_build/
52+
# HDF tables
53+
*.h5

MANIFEST

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# file GENERATED by distutils, do NOT edit
2+
CHANGES.txt
3+
README.txt
4+
setup.py
5+
pvlpy/04725.tm2
6+
pvlpy/723650TY.csv
7+
pvlpy/__init__.py
8+
pvlpy/pvl_alt2pres.py
9+
pvlpy/pvl_calcparams_desoto.py
10+
pvlpy/pvl_disc.py
11+
pvlpy/pvl_ephemeris.py
12+
pvlpy/pvl_ephemeris_new_code_check.py
13+
pvlpy/pvl_extraradiation.py
14+
pvlpy/pvl_getaoi.py
15+
pvlpy/pvl_globalinplane.py
16+
pvlpy/pvl_grounddiffuse.py
17+
pvlpy/pvl_leapyear.py
18+
pvlpy/pvl_makelocationstruct.py
19+
pvlpy/pvl_perez.py
20+
pvlpy/pvl_pres2alt.py
21+
pvlpy/pvl_readtmy2.py
22+
pvlpy/pvl_readtmy3.py
23+
pvlpy/pvl_relativeairmass.py
24+
pvlpy/pvl_retreiveSAM.py
25+
pvlpy/pvl_sapm.py
26+
pvlpy/pvl_sapmcelltemp.py
27+
pvlpy/pvl_singlediode.py
28+
pvlpy/pvl_snlinverter.py
29+
pvlpy/pvl_systemdef.py
30+
pvlpy/pvl_tools.py
31+
pvlpy/test/703165TY.csv
32+
pvlpy/test/__init__.py
33+
pvlpy/test/test_pvl_absoluteairmass.py
34+
pvlpy/test/test_pvl_disc.py
35+
pvlpy/test/test_pvl_ephemeris.py
36+
pvlpy/test/test_pvl_extraradiation.py
37+
pvlpy/test/test_pvl_leapyear.py
38+
pvlpy/test/test_pvl_makelocationstruct.py
39+
pvlpy/test/test_pvl_pres2alt.py
40+
pvlpy/test/test_pvl_readtmy2.py
41+
pvlpy/test/test_pvl_relativeairmass.py
42+
pvlpy/test/test_pvl_singlediode.py
43+
pvlpy/test/test_pvl_tools.py

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
include *.txt
2+
recursive-include pvlpy *.csv
3+
recursive-include pvlpy *.tm2
4+
25
recursive-include docs *.txt

pvlib/04725.tm2

Lines changed: 8761 additions & 0 deletions
Large diffs are not rendered by default.
File renamed without changes.

pvlib/725280TY.csv

Lines changed: 8762 additions & 0 deletions
Large diffs are not rendered by default.

pvlib/Act_Zenith.csv

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Date,Topocentric zenith angle,Top. azimuth angle (westward from S),Surface incidence angle
2+
7/23/1980 0:00:00,116.831179,174.382857,116.831179
3+
7/23/1980 1:00:00,116.404997,-169.857983,116.404997
4+
7/23/1980 2:00:00,113.069936,-154.777333,113.069936
5+
7/23/1980 3:00:00,107.240889,-141.103074,107.240889
6+
7/23/1980 4:00:00,99.487124,-129.000459,99.487124
7+
7/23/1980 5:00:00,89.907297,-118.222676,89.907297
8+
7/23/1980 6:00:00,80.200942,-108.324645,80.200942
9+
7/23/1980 7:00:00,69.581433,-98.762516,69.581433
10+
7/23/1980 8:00:00,58.657460,-88.861134,58.657460
11+
7/23/1980 9:00:00,47.777857,-77.638349,47.777857
12+
7/23/1980 10:00:00,37.438988,-63.392110,37.438988
13+
7/23/1980 11:00:00,28.623718,-42.985629,28.623718
14+
7/23/1980 12:00:00,23.418668,-12.708603,23.418668
15+
7/23/1980 13:00:00,24.385047,22.461627,24.385047
16+
7/23/1980 14:00:00,30.936431,49.720202,30.936431
17+
7/23/1980 15:00:00,40.352486,67.906454,40.352486
18+
7/23/1980 16:00:00,50.925777,81.025862,50.925777
19+
7/23/1980 17:00:00,61.868548,91.727685,61.868548
20+
7/23/1980 18:00:00,72.751832,101.442103,72.751832
21+
7/23/1980 19:00:00,83.228389,111.033435,83.228389
22+
7/23/1980 20:00:00,93.197375,121.129036,93.197375
23+
7/23/1980 21:00:00,102.008768,132.248965,102.008768
24+
7/23/1980 22:00:00,109.293812,144.801747,109.293812
25+
7/23/1980 23:00:00,114.487526,158.945287,114.487526
26+
7/24/1980 0:00:00,117.038067,174.359067,117.038067
27+
7/24/1980 1:00:00,116.611880,-169.831850,116.611880
28+
7/24/1980 2:00:00,113.268172,-154.707301,113.268172
29+
7/24/1980 3:00:00,107.425255,-141.000717,107.425255
30+
7/24/1980 4:00:00,99.656289,-128.876187,99.656289
31+
7/24/1980 5:00:00,90.041514,-118.082679,90.041514
32+
7/24/1980 6:00:00,80.344311,-108.170914,80.344311
33+
7/24/1980 7:00:00,69.718528,-98.593738,69.718528
34+
7/24/1980 8:00:00,58.792584,-88.673517,58.792584
35+
7/24/1980 9:00:00,47.917620,-77.427020,47.917620
36+
7/24/1980 10:00:00,37.593055,-63.157322,37.593055
37+
7/24/1980 11:00:00,28.804429,-42.761244,28.804429
38+
7/24/1980 12:00:00,23.626900,-12.628814,23.626900
39+
7/24/1980 13:00:00,24.585209,22.301477,24.585209
40+
7/24/1980 14:00:00,31.104079,49.471254,31.104079
41+
7/24/1980 15:00:00,40.496209,67.667536,40.496209
42+
7/24/1980 16:00:00,51.058196,80.813570,51.058196
43+
7/24/1980 17:00:00,61.998668,91.538404,61.998668
44+
7/24/1980 18:00:00,72.885845,101.270411,72.885845
45+
7/24/1980 19:00:00,83.369777,110.875769,83.369777
46+
7/24/1980 20:00:00,93.353536,120.984655,93.353536
47+
7/24/1980 21:00:00,102.180691,132.120812,102.180691
48+
7/24/1980 22:00:00,109.482655,144.697371,109.482655
49+
7/24/1980 23:00:00,114.691312,158.876407,114.691312
50+
7/25/1980 0:00:00,117.250609,174.337341,117.250609
51+
7/25/1980 1:00:00,116.823875,-169.802176,116.823875
52+
7/25/1980 2:00:00,113.470770,-154.632659,113.470770
53+
7/25/1980 3:00:00,107.613200,-140.893188,107.613200
54+
7/25/1980 4:00:00,99.828349,-128.746525,99.828349
55+
7/25/1980 5:00:00,90.177165,-117.937207,90.177165
56+
7/25/1980 6:00:00,80.489661,-108.011610,80.489661
57+
7/25/1980 7:00:00,69.857474,-98.419181,69.857474
58+
7/25/1980 8:00:00,58.929597,-88.479750,58.929597
59+
7/25/1980 9:00:00,48.059555,-77.208993,48.059555
60+
7/25/1980 10:00:00,37.749902,-62.915228,37.749902
61+
7/25/1980 11:00:00,28.988918,-42.529378,28.988918
62+
7/25/1980 12:00:00,23.840152,-12.542328,23.840152
63+
7/25/1980 13:00:00,24.791438,22.145310,24.791438
64+
7/25/1980 14:00:00,31.277991,49.222203,31.277991
65+
7/25/1980 15:00:00,40.645903,67.426541,40.645903
66+
7/25/1980 16:00:00,51.196297,80.598660,51.196297
67+
7/25/1980 17:00:00,62.134298,91.346482,62.134298
68+
7/25/1980 18:00:00,73.025300,101.096229,73.025300
69+
7/25/1980 19:00:00,83.516520,110.715852,83.516520
70+
7/25/1980 20:00:00,93.515296,120.838360,93.515296
71+
7/25/1980 21:00:00,102.358350,131.991258,102.358350
72+
7/25/1980 22:00:00,109.677345,144.592396,109.677345
73+
7/25/1980 23:00:00,114.900932,158.808120,114.900932

pvlib/LinkeTurbidities.mat

19.4 MB
Binary file not shown.

pvlib/__init__.py

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
import pvl_tools
3+
4+
'''
5+
Irradiance and atmosperhic functions
6+
====================================
7+
'''
8+
9+
from pvl_alt2pres import pvl_alt2pres
10+
from pvl_pres2alt import pvl_pres2alt
11+
from pvl_getaoi import pvl_getaoi
12+
from pvl_disc import pvl_disc
13+
from pvl_ephemeris import pvl_ephemeris
14+
from pvl_spa import pvl_spa
15+
from pvl_extraradiation import pvl_extraradiation
16+
from pvl_globalinplane import pvl_globalinplane
17+
from pvl_grounddiffuse import pvl_grounddiffuse
18+
from pvl_makelocationstruct import pvl_makelocationstruct
19+
from pvl_relativeairmass import pvl_relativeairmass
20+
from pvl_absoluteairmass import pvl_absoluteairmass
21+
from pvl_clearsky_ineichen import pvl_clearsky_ineichen
22+
from pvl_clearsky_haurwitz import pvl_clearsky_haurwitz
23+
'''
24+
Irradiance Translation Functions
25+
================================
26+
'''
27+
28+
from pvl_perez import pvl_perez
29+
from pvl_haydavies1980 import pvl_haydavies1980
30+
from pvl_isotropicsky import pvl_isotropicsky
31+
from pvl_kingdiffuse import pvl_kingdiffuse
32+
from pvl_klucher1979 import pvl_klucher1979
33+
from pvl_reindl1990 import pvl_reindl1990
34+
35+
'''
36+
Data Handling
37+
==============
38+
'''
39+
40+
from pvl_readtmy2 import pvl_readtmy2
41+
from pvl_readtmy3 import pvl_readtmy3
42+
'''
43+
System Modelling functions
44+
==========================
45+
'''
46+
47+
from pvl_physicaliam import pvl_physicaliam
48+
from pvl_ashraeiam import pvl_ashraeiam
49+
from pvl_calcparams_desoto import pvl_calcparams_desoto
50+
from pvl_retreiveSAM import pvl_retreiveSAM
51+
from pvl_sapm import pvl_sapm
52+
from pvl_sapmcelltemp import pvl_sapmcelltemp
53+
from pvl_singlediode import pvl_singlediode
54+
from pvl_snlinverter import pvl_snlinverter
55+
from pvl_systemdef import pvl_systemdef
56+

pvlib/pvl_absoluteairmass.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
2+
3+
4+
import numpy as np
5+
import pvl_tools as pvt
6+
7+
def pvl_absoluteairmass(AMrelative,Pressure):
8+
'''
9+
Determine absolute (pressure corrected) airmass from relative airmass and pressure
10+
11+
Gives the airmass for locations not at sea-level (i.e. not at standard
12+
pressure). The input argument "AMrelative" is the relative airmass. The
13+
input argument "pressure" is the pressure (in Pascals) at the location
14+
of interest and must be greater than 0. The calculation for
15+
absolute airmass is:
16+
absolute airmass = (relative airmass)*pressure/101325
17+
18+
Parameters
19+
----------
20+
21+
AMrelative : float or DataFrame
22+
23+
The airmass at sea-level which can be calculated using the
24+
PV_LIB function pvl_relativeairmass.
25+
26+
pressure : float or DataFrame
27+
28+
a scalar or vector of values providing the site pressure in
29+
Pascal. If pressure is a vector it must be of the same size as all
30+
other vector inputs. pressure must be >=0. Pressure may be measured
31+
or an average pressure may be calculated from site altitude.
32+
33+
Returns
34+
-------
35+
36+
AMa : float or DataFrame
37+
38+
Absolute (pressure corrected) airmass
39+
40+
References
41+
----------
42+
43+
[1] C. Gueymard, "Critical analysis and performance assessment of
44+
clear sky solar irradiance models using theoretical and measured data,"
45+
Solar Energy, vol. 51, pp. 121-138, 1993.
46+
47+
See also
48+
---------
49+
pvl_relativeairmass
50+
51+
'''
52+
53+
Vars=locals()
54+
Expect={'AMrelative': ('array','num'),
55+
'Pressure': ('array', 'num', 'x>0')}
56+
57+
var=pvt.Parse(Vars,Expect)
58+
59+
AMa=var.AMrelative.dot(var.Pressure) / 101325
60+
61+
return AMa

pvlib/pvl_alt2pres.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
import numpy as np
3+
import pvl_tools as pvt
4+
import pdb
5+
def pvl_alt2pres(altitude):
6+
'''
7+
Determine site pressure from altitude
8+
9+
Parameters
10+
----------
11+
Altitude: scalar, vector or DataFrame
12+
Altitude in meters above sea level
13+
14+
Returns
15+
-------
16+
Pressure : scalar, vector or DataFrame
17+
Atomspheric pressure (Pascals)
18+
19+
Notes
20+
------
21+
The following assumptions are made
22+
23+
============================ ================
24+
Parameter Value
25+
============================ ================
26+
Base pressure 101325 Pa
27+
Temperature at zero altitude 288.15 K
28+
Gravitational acceleration 9.80665 m/s^2
29+
Lapse rate -6.5E-3 K/m
30+
Gas constant for air 287.053 J/(kgK)
31+
Relative Humidity 0%
32+
============================ ================
33+
34+
References
35+
-----------
36+
37+
"A Quick Derivation relating altitude to air pressure" from Portland
38+
State Aerospace Society, Version 1.03, 12/22/2004.
39+
40+
See also
41+
--------
42+
pvl_alt2pres ,pvl_makelocationstruct
43+
'''
44+
Vars=locals()
45+
Expect={'altitude': 'num'}
46+
var=pvt.Parse(Vars,Expect)
47+
48+
Press=100 * ((44331.514 - var.altitude) / 11880.516) ** (1 / 0.1902632)
49+
50+
return Press

0 commit comments

Comments
 (0)