Skip to content

io module: add macc-rad reader #271

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

Closed
dacoex opened this issue Dec 1, 2016 · 3 comments
Closed

io module: add macc-rad reader #271

dacoex opened this issue Dec 1, 2016 · 3 comments

Comments

@dacoex
Copy link
Contributor

dacoex commented Dec 1, 2016

Upstream data source
http://www.soda-pro.com/web-services/radiation/cams-radiation-service

Git repository with examples
https://github.com/dacoex/pvlib_data/tree/master/MACC-RAD
(Soda-pro website was changed after the example data was downloaded.)

Related
Issues: #261 & #29
PR: #270

Previous comments
taken from:
#270 (comment)

The header section of the maccrad file looks like it could be of variable length, so you probably don't want to hardcode the 40. The leading # can be used to let read_csv skip the variable header section, but unfortunately the column names would be lost that way too. Is the number of columns always the same? In that case I would suggest using header=None and providing a standard name for each column.

Your dateparser looks like it returns text. Does this produce a datetime index for the dataframe?

I the time zone for the data in the file? "# Time reference: Universal time (UT)" Maybe the dataframe could be localized with this?

dacoex pushed a commit to dacoex/pvlib-python that referenced this issue Dec 1, 2016
responding to comments in pvlib#271
- improved metadata retrieval and location setting
- added better options to output

responding to comments in pvlib#270
- moved some functions to general iotools
@dacoex
Copy link
Contributor Author

dacoex commented Dec 1, 2016

The file maccrad format doesn't look like it was designed for ease of parsing.

It says that there is some standard befind:

_ Encoding partly from D2.8.III.13-14 INSPIRE Data Specification on Atmospheric Conditions and Meteorological Geographical Features – Technical Guidelines, 2013-12-10; and CF (Climate and Forecast) metadata (2013-11-11) CF Standard Names registry of ObservablePropertyValue_

Is the number of columns always the same?

Yes.

Your dateparser looks like it returns text. Does this produce a datetime index for the dataframe?

Yes.

I the time zone for the data in the file? "# Time reference: Universal time (UT)" Maybe the dataframe >could be localized with this?

Thanks, I'd forgot but now implemented.
The functions also add metadata to the dataframe (df.df_name = "MACC-RAD v2.7 Solar Irradiation") and set a default location name (loc.name = "MACC-RAD v2.7 Solar Irradiation @ lat (deg. N), lon (deg. E): 44.083, 5.059")

If the file structure & functions settle down I will add

  • io module documentation
  • whatsnew

@wholmgren
Copy link
Member

Please add the discussion above to the new PR that I requested in #271, and then close the issue.

@dacoex
Copy link
Contributor Author

dacoex commented Dec 2, 2016

closed in favour of #274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants