Skip to content

CSV file with UTC Time Zone interpreted as local time in pvdeg.weather.read #162

Description

@alecote

First of all, I would like to say that this is all great work!

Context:
Using PVDegradationTools for calculating standoff distances in the context of IEC TS 63126. The tmy-2023 data used comes from a CSV file downloaded using NSRDB Viewer. The option "Convert UTC to Local Time" in NSRDB was NOT selected when downloading the file.

Issue:
When using pvdeg.weather.read(file, 'CSV'), the file is read and analysis can proceed but the Time Zone metadata is not accounted for, leading to bad datetimes which then leads to bad sun positions (i.e. peak irradiance at 19h30 UTC-7 instead of 12h30 UTC-7). The issue disappears if the user selects the option "Convert UTC to Local Time" in NSRDB when downloading the CSV file.

When using pvdeg.weather.read(file, 'PSM'), the code works and the issue does not appear. Looking at the code, it looks like weather.csv_read() does not attempt to adjust the time based on the timezone.

Based on the tutorials, I could not tell which file type to use with CSV files downloaded using NSRDB Viewer.

Suggestions:
1- Provide more guidance in the tutorials and documentation when reading local files, such as the proper file type to input in weather.read() depending on the data source such as NSRDB. Should it be PSM? CSV?
2- Modify the weather.csv_read() function to look for the timezone and local time metadata and adjust the datetimes accordingly.

EDIT: I have also realized that this may not be the only issue with using data downloaded from NSRDB. There is no "wind_height" metadata, which means that temperature.temperature() discards the user input wind_factor and sets the wind_speed_factor to 1.

Metadata

Metadata

Labels

Clarity for usersThings that help the user implement the code more easily.bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions