question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

reading bug on '*_TMY3.epw' file

See original GitHub issue

Describe the bug When a tmy3 file formatted in epw is read, the precipitable_water is not converted from mm to cm, and it results in diverging results for spectral mismatch factor (like negative factor for instance), then resulting in negative ‘effective_irradiance’ results

To Reproduce Steps to reproduce the behavior:

  1. Create a ChainModel object with a .epw weather file, coming from TMY3 data and imported with ‘pvlib.iotools.epw.read_epw()’
  2. Run the model
  3. Check for inconsistencies in effective_irradiance with ‘chain1.effective_irradiance.loc[chain1.effective_irradiance<0]’

or

  1. Run the code attached

Expected behavior All the effective_irradiance should be positive or null.

bug_report_read_epw.txt

Versions:

  • pvlib.__version__: 0.6.3+24.gbbb4580.dirty
  • pandas.__version__: 0.23.4
  • python: 3.7.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
cwhansecommented, Oct 9, 2019

@wholmgren and I talked about this in person (still happens sometimes 😃. Neither of us are strongly opposed to any of the following options:

  1. add a note to read_epw about older TMY files from energyplus.net
  2. add pw = np.minimum(pw, max_pw) to first_solar_spectral_correction and expose max_pw as a kwarg. Could use this opportunity to also implement min_pw, min_am and max_am but that could be done in a later PR. Default of 8. Return np.nan when inputs are outside the accepted pw range, and warning.

We both think the better course for read_epw is to return exactly what is in the EPW file, rather than attempt to check or correct the content.

1reaction
cwhansecommented, Oct 3, 2019

I don’t think that the read_epw function should attempt to correct errors in EPW data files. I think that will only cause trouble for pvlib down the road.

I’m OK if we want to add a Note to the docstring about TMY3 files from energyplus.net having a known error, and providing helpful suggestions for handling the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Users Manual for TMY3 Data Sets - NREL
The data-filling process was designed to provide serially complete records as input for modeling the solar radiation fields. Filled meteorological data fields ( ......
Read more >
EPW map bug - searching for a specific weather file prevents ...
Hi all, I may have found a bug with the epw map. ... Ann Arbor and Detroit weather files are active, but not...
Read more >
Import epw - Ladybug - Component for Grasshopper
Name ID Type Output readMe! String Latitude latitude Goo Location location Goo
Read more >
EnergyPlus Weather File (EPW) Data Dictionary
The “data dictionary” for EnergyPlus Weather Data is shown below. ... Briefly, we have similar “\” conventions that are important for reading the...
Read more >
What's New — pvlib python 0.9.3 documentation
pvlib.iotools.read_tmy3() can now only read local data files because the NREL RREDC server hosting the TMY3 dataset has been retired. For fetching TMY...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found