Skip to content

Commit

Permalink
Merge pull request #29 from NREL/development
Browse files Browse the repository at this point in the history
geospatial analysis via dask
  • Loading branch information
martin-springer authored Dec 4, 2023
2 parents 401dceb + 16f454a commit ce10f94
Show file tree
Hide file tree
Showing 22 changed files with 10,361 additions and 1,112 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ demo/chunk_files/
demo/logs/
demo/old

TEMP/
TEMP/

# Slurm log files
slurm-*.out
1 change: 1 addition & 0 deletions pvdeg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from . import degradation
from . import design
from . import fatigue
from . import geospatial
from . import humidity
from . import letid
from .scenario import Scenario
Expand Down
14 changes: 7 additions & 7 deletions pvdeg/fatigue.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def _avg_daily_temp_change(time_range, temp_cell):
Average of Daily Maximum Temperature for 1-year (Celsius)
"""

if time_range.dtype == 'object':
time_range = pd.to_datetime(time_range)

# Setup frame for vector processing
timeAndTemp_df = pd.DataFrame(columns=['Cell Temperature'])
timeAndTemp_df['Cell Temperature'] = temp_cell
Expand Down Expand Up @@ -111,7 +111,7 @@ def solder_fatigue(weather_df, meta,
This function uses the default values for 60-min input intervals from Table 4 of the above
paper. For other use cases, please refer to the paper for recommended values of C1 and
the reversal temperature.
Parameters
------------
weather_df : pd.dataframe
Expand Down Expand Up @@ -143,9 +143,9 @@ def solder_fatigue(weather_df, meta,
"""

# TODO this, and many other functions with temp_cell or temp_module would benefit from an
# TODO this, and many other functions with temp_cell or temp_module would benefit from an
# optional parameter "conf = 'open_rack_glass_glass' or equivalent"

# TODO Make this function have more utility.
# People want to run all the scenarios from the bosco paper.
# Currently have everything hard coded for hourly calculation
Expand All @@ -158,10 +158,10 @@ def solder_fatigue(weather_df, meta,

if time_range is None:
time_range = weather_df.index

if temp_cell is None:
temp_cell = temperature.cell(weather_df, meta)

temp_amplitude, temp_max_avg = _avg_daily_temp_change(time_range, temp_cell)

temp_max_avg = convert_temperature(temp_max_avg, 'Celsius', 'Kelvin')
Expand Down
Loading

0 comments on commit ce10f94

Please sign in to comment.