Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fef3d51

Browse filesBrowse files
committed
Merge TMY changes after fixing pvl_ephemeris conflict
1 parent c105527 commit fef3d51
Copy full SHA for fef3d51

File tree

Expand file treeCollapse file tree

10 files changed

+1985
-519
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+1985
-519
lines changed

‎pvlib/__init__.py

Copy file name to clipboard
+54-55Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,57 @@
11

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

5857

‎pvlib/location.py

Copy file name to clipboard
+62Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
"""
2+
This module contains the Location class.
3+
"""
4+
5+
import logging
6+
pvl_logger = logging.getLogger('pvlib')
7+
8+
import datetime
9+
10+
import pytz
11+
12+
class Location(object):
13+
"""
14+
Location objects are convenient containers for latitude, longitude,
15+
timezone, and altitude data associated with a particular
16+
geographic location. You can also assign a name to a location object.
17+
18+
Location objects have two timezone attributes:
19+
* ``location.tz`` is a IANA timezone string.
20+
* ``location.pytz`` is a pytz timezone object.
21+
22+
Location objects support the print method.
23+
"""
24+
25+
def __init__(self, latitude, longitude, tz='US/Mountain', altitude=100,
26+
name=None):
27+
"""
28+
:param latitude: float. Positive is north of the equator.
29+
Use decimal degrees notation.
30+
:param longitude: float. Positive is east of the prime meridian.
31+
Use decimal degrees notation.
32+
:param tz: string or pytz.timezone. See
33+
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
34+
for a list of valid time zones.
35+
pytz.timezone objects will be converted to strings.
36+
:param alitude: float. Altitude from sea level in meters.
37+
:param name: None or string.
38+
"""
39+
40+
pvl_logger.debug('creating Location object')
41+
42+
self.latitude = latitude
43+
self.longitude = longitude
44+
45+
if isinstance(tz, str):
46+
self.tz = tz
47+
self.pytz = pytz.timezone(tz)
48+
elif isinstance(tz, datetime.tzinfo):
49+
self.tz = tz.zone
50+
self.pytz = tz
51+
else:
52+
raise TypeError('Invalid tz specification')
53+
54+
self.altitude = altitude
55+
56+
self.name = name
57+
58+
59+
def __str__(self):
60+
return ('{}: latitude={}, longitude={}, tz={}, altitude={}'
61+
.format(self.name, self.latitude, self.longitude,
62+
self.tz, self.altitude))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.