Skip to content

Commit

Permalink
Update weather.py
Browse files Browse the repository at this point in the history
Put in code to start a get_satellite function
  • Loading branch information
MDKempe committed Jan 3, 2024
1 parent b10d37e commit 1837f73
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pvdeg/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def get(database, id=None, geospatial=False, **kwargs):

if type(id) is tuple:
location = id
if satellite=None
satellite, gid = get_satellite(location)
gid = None
lat = location[0]
lon = location[1]
Expand Down Expand Up @@ -581,3 +583,31 @@ def is_leap_year(year):
return False
else:
return True

def get_satellite(location)

"""
identify a satellite to use for a given lattitude and longitude. This is to provide default values worldwide, but a more
experienced user may want to specify a specific satellite to get better data.
Provide a location tuple.
Parameters:
-----------
location : (tuple)
(latitude, longitude) for the desired location
Returns:
--------
satellite : (str)
'GOES', 'METEOSAT', 'Himawari', 'SUNY', 'CONUS', 'Americas'
gid : (int)
gid for the desired location
"""

# this is just a placeholder till the actual code gets programmed.
satellite="americas"

gid = f.lat_lon_gid(location)

return satellite, gid

0 comments on commit 1837f73

Please sign in to comment.