8000 Replace freq '1M' with '1MS' by AdamRJensen · Pull Request #2266 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Replace freq '1M' with '1MS' #2266

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

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Remove conversion from datetime to date for d/M freqs
  • Loading branch information
AdamRJensen committed Mar 20, 2025
commit 2af1a2b4c407880115458342e08966a5ce87e124
6 changes: 1 addition & 5 deletions pvlib/iotools/sodapro.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_cams(latitude, longitude, start, end, email, identifier='mcclear',
======================== ====== =========================================
**Mapped field names are returned when the map_variables argument is True**
---------------------------------------------------------------------------
Observation period str Start of time period
Observation period str Start of the time period (left labeled)
TOA, ghi_extra float Horizontal radiation at top of atmosphere
Clear sky GHI, ghi_clear float Clear sky global radiation on horizontal
Clear sky BHI, bhi_clear float Clear sky beam radiation on horizontal
Expand Down Expand Up @@ -301,10 +301,6 @@ def parse_cams(fbuf, integrated=False, map_variables=True):
# Set index as the start observation time (left) and localize to UTC
data.index = pd.to_datetime(obs_period.str[0], utc=True)

# For time_steps '1d' and '1MS' drop timezone and round to nearest midnight
if (time_step == '1d') | time_step.endswith('MS'): # noqa
data.index = pd.DatetimeIndex(data.index.date)

if not integrated: # Convert radiation values from Wh/m2 to W/m2
integrated_cols = [c for c in CAMS_INTEGRATED_COLUMNS
if c in data.columns]
Expand Down
0