-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Update MIDC variable mapping #2006
Conversation
Test failures are related to upload to Codecov |
To be clear, MIDC no longer offers data from those old instruments through their API? Or, are the old data still available somehow, and there are also data from new instruments? |
The latter. At some periods that may be two of the same type of measurement, e.g. DNI, so we need to decide which gets mapped to "dni". |
If someone requests old data (prior to these MIDC changes), they will get old data. If they also ask for variable mapping, pvlib will rename any of the current fields, and leave the old ones alone. Is that right? |
Correct. No data is changed. But if you upgrade your pvlib version, the dni data may seem to have changed because the data is renamed from a different column in some instances. |
It's not obvious to me that pvlib.iotools should be in the business of choosing which of several DNI options is the "blessed" channel that gets mapped to be mapped to the special name |
I believe so. In this case we could maybe do |
I could support this. The alternative I see is to not map at all in cases like this where there are several options. |
I want to emphasize that it is the data provider doing it in this case. So I don't see a problem with it. Also in this case there's a significant improvements in accuracy (thus a clear choice) and one instrument was decommissioned |
@kandersolar I've implemented a bit of a compromise. For the stations that have multiple pyrheliometers, I have implemented subscripts for the instrument type, e.g., For the case when the new column does not denote the instrument type, e.g., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for cases like the MIDC where there are potentially multiple instruments, the rule should be to always append the instrument name when it is known, even if there is only one measurement of that type? So for example, BMS (which has only one GHI measurement listed) would have 'Global CMP22 (vent/cor) [W/m^2]': 'ghi_cmp22'
.
This seems somewhat more consistent to me, and has the added benefit of being future-proof if/when the MIDC adds more instruments again in the future.
Side note: doesn't the BMS have dozens of instruments? Why do we only map 1-2 of each type?
I don't think it is future proof given that SRRL for example has multiple of the same type, so it would have to be
Yes, I expect they have 20+ GHI sensors, so I think that's not useful to map. However, they specify one instrument as the main instrument, which is what we map in this case. I acknowledge that it is not ideal, but I still think that merging this PR is the current best option |
I agree |
[ ] Closes #xxxx[ ] Tests added[ ] Updates entries indocs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.I got the following comments from the personnel responsible for operating MIDC. This PR implements the requested changes, which I think makes good sense.
Note, the change in how instruments are mapped is in a way a breaking change,