8000 sam iotools #1371 by shirubana · Pull Request #1556 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

sam iotools #1371 #1556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Anton's suggestion
  • Loading branch information
shirubana committed Sep 23, 2022
commit ebded8351eb468c02dbd0959188af5883bdc17a2
15 changes: 5 additions & 10 deletions pvlib/iotools/sam.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,19 @@ def _fillYearSAMStyle(df, freq='60T'):
savedata['Tdry'] = temp_amb

if 'dni' in data:
dni = list(data.dni)
savedata['DHI'] = dni
savedata['DHI'] = data.dni.values

if 'dhi' in data:
dhi = list(data.dhi)
savedata['DNI'] = dhi
savedata['DNI'] = data.dhi.values

if 'ghi' in data:
ghi = list(data.ghi)
savedata['GHI'] = ghi
savedata['GHI'] = data.ghi.values

if 'poa' in data:
poa = list(data.poa)
savedata['POA'] = poa
savedata['POA'] = data.poa.values

if 'albedo' in data:
albedo = list(data.albedo)
savedata['Albedo'] = albedo
savedata['Albedo'] = data.albedo.values

# Not elegant but seems to work for the standardSAM format
if standardSAM and savedata.Albedo.iloc[0] == 0:
Expand Down
0