Skip to content

Commit 1ff113f

Browse files
committed
Change freq M to MS
1 parent d702353 commit 1ff113f

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

pvlib/iotools/bsrn.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ def get_bsrn(station, start, end, username, password,
162162
end = pd.to_datetime(end)
163163

164164
# Generate list files to download based on start/end (SSSMMYY.dat.gz)
165-
filenames = pd.date_range(
166-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1M')\
165+
filenames = pd.date_range(start, end, freq='1MS')\
167166
.strftime(f"{station}%m%y.dat.gz").tolist()
168167

169168
# Create FTP connection

pvlib/iotools/srml.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,7 @@ def get_srml(station, start, end, filetype='PO', map_variables=True,
236236
end = pd.to_datetime(end)
237237

238238
# Generate list of months
239-
months = pd.date_range(
240-
start, end.replace(day=1) + pd.DateOffset(months=1), freq='1M')
239+
months = pd.date_range(start, end, freq='1MS')
241240
months_str = months.strftime('%y%m')
242241

243242
# Generate list of filenames

tests/test_clearsky.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ def test_lookup_linke_turbidity_months():
234234

235235

236236
def test_lookup_linke_turbidity_months_leapyear():
237-
times = pd.date_range(start='2016-04-01', end='2016-07-01',
238-
freq='1M', tz='America/Phoenix')
237+
times = pd.date_range(start='2014-05-01', end='2014-07-01',
238+
freq='1ME', tz='America/Phoenix')
239239
expected = pd.Series(
240240
np.array([2.89918032787, 2.97540983607, 3.19672131148]), index=times
241241
)

0 commit comments

Comments
 (0)