Skip to content

Commit fd36485

Browse files
committed
remove default values for year
1 parent 6e6a71b commit fd36485

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

pvlib/iotools/psm4.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373

7474
def get_nsrdb_psm4_aggregated(latitude, longitude, api_key, email,
75-
year='2023', time_step=60,
75+
year, time_step=60,
7676
parameters=PARAMETERS, leap_day=True,
7777
full_name=PVLIB_PYTHON,
7878
affiliation=PVLIB_PYTHON,
@@ -96,7 +96,7 @@ def get_nsrdb_psm4_aggregated(latitude, longitude, api_key, email,
9696
email : str
9797
NREL API uses this to automatically communicate messages back
9898
to the user only if necessary
99-
year : str, default '2023'
99+
year : int or str
100100
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
101101
allowed values update periodically, so consult the NSRDB reference
102102
below for the current set of options. Called ``names`` in NSRDB API.
@@ -314,9 +314,6 @@ def get_nsrdb_psm4_tmy(latitude, longitude, api_key, email, year='tmy',
314314
latitude = ('%8.4f' % latitude).strip()
315315
# TODO: make format_WKT(object_type, *args) in tools.py
316316

317-
# convert to string to accomodate integer years being passed in
318-
year = str(year)
319-
320317
# convert pvlib names in parameters to PSM4 convention
321318
parameters = [REQUEST_VARIABLE_MAP.get(a, a) for a in parameters]
322319

@@ -354,7 +351,7 @@ def get_nsrdb_psm4_tmy(latitude, longitude, api_key, email, year='tmy',
354351
return read_nsrdb_psm4(fbuf, map_variables)
355352

356353

357-
def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
354+
def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year,
358355
time_step=60, parameters=PARAMETERS, leap_day=True,
359356
full_name=PVLIB_PYTHON, affiliation=PVLIB_PYTHON,
360357
utc=False, map_variables=True, url=None, timeout=30):
@@ -376,7 +373,7 @@ def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
376373
email : str
377374
NREL API uses this to automatically communicate messages back
378375
to the user only if necessary
379-
year : str, default '2023'
376+
year : int or str
380377
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
381378
allowed values update periodically, so consult the NSRDB reference
382379
below for the current set of options. Called ``names`` in NSRDB API.
@@ -494,7 +491,7 @@ def get_nsrdb_psm4_conus(latitude, longitude, api_key, email, year='2023',
494491

495492

496493
def get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email,
497-
year='2023', time_step=60,
494+
year, time_step=60,
498495
parameters=PARAMETERS, leap_day=True,
499496
full_name=PVLIB_PYTHON,
500497
affiliation=PVLIB_PYTHON, utc=False,
@@ -517,7 +514,7 @@ def get_nsrdb_psm4_full_disc(latitude, longitude, api_key, email,
517514
email : str
518515
NREL API uses this to automatically communicate messages back
519516
to the user only if necessary
520-
year : str, default '2023'
517+
year : int or str
521518
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
522519
allowed values update periodically, so consult the NSRDB reference
523520
below for the current set of options. Called ``names`` in NSRDB API.

0 commit comments

Comments
 (0)