Skip to content

Commit

Permalink
Merge pull request #67 from NREL/Kempe_Standoff
Browse files Browse the repository at this point in the history
Bug fix weather.py
  • Loading branch information
martin-springer authored Feb 15, 2024
2 parents afe636e + fd1e903 commit a17cd1d
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 44 deletions.
13 changes: 8 additions & 5 deletions pvdeg/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def get(database, id=None, geospatial=False, **kwargs):
# e.g. temp_air vs. air_temperature
# "map variables" will guarantee PVLIB conventions (automatic in coming update) which is "temp_air"
if database == "NSRDB":
print(kwargs)
weather_df, meta = get_NSRDB(gid=gid, location=location, **kwargs)
elif database == "PVGIS":
weather_df, _, meta, _ = iotools.get_pvgis_tmy(
Expand Down Expand Up @@ -95,13 +94,17 @@ def get(database, id=None, geospatial=False, **kwargs):
print("\r", end="")

# map meta-names as needed

for key in [*meta.keys()]:
if key in META_MAP.keys():
meta[META_MAP[key]] = meta.pop(key)
if meta["Source"] == "NSRDB":
meta["wind_height"] = 2
elif meta["Source"] == "PVGIS":
meta["wind_height"] = 10

if database == 'NSRDB' or database == 'PSM3':
meta['wind_height']=2
meta['Source']='NSRDB'
elif database == 'PVGIS':
meta['wind_height']=10
meta['Source']='PVGIS'
else:
meta["wind_height"] = None

Expand Down
Loading

0 comments on commit a17cd1d

Please sign in to comment.