Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bnb/meta_enum' into pp/tline_upd…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
ppinchuk committed May 30, 2024
2 parents f6c9594 + b267dac commit 6b3b581
Show file tree
Hide file tree
Showing 38 changed files with 1,627 additions and 1,130 deletions.
10 changes: 6 additions & 4 deletions reV/SAM/SAM.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
)
from rex.utilities.utilities import check_res_file

from reV.utilities import ResourceMetaField
from reV.utilities.exceptions import (
ResourceError,
SAMExecutionError,
Expand Down Expand Up @@ -796,11 +797,10 @@ def _parse_meta(meta):
location. Should include values for latitude, longitude, elevation,
and timezone. Can be None for econ runs.
"""

if isinstance(meta, pd.DataFrame):
msg = (
"Meta data must only be for a single site but received: {}"
.format(meta)
"Meta data must only be for a single site but received: "
f"{meta}"
)
assert len(meta) == 1, msg
meta = meta.iloc[0]
Expand Down Expand Up @@ -861,7 +861,9 @@ def outputs_to_utc_arr(self):

if self._is_hourly(output):
n_roll = int(
-1 * self.meta["timezone"] * self.time_interval
-1
* self.meta[ResourceMetaField.TIMEZONE]
* self.time_interval
)
output = np.roll(output, n_roll)

Expand Down
Loading

0 comments on commit 6b3b581

Please sign in to comment.