8000 Add sodapro.get_cams_radiation by AdamRJensen · Pull Request #1175 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Add sodapro.get_cams_radiation #1175

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

Merged
merged 59 commits into from
Jun 13, 2021
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d7deb80
Add cams.get_cams_radiation function
Feb 22, 2021
510f08e
Revert "Add cams.get_cams_radiation function"
Feb 22, 2021
84e820c
Add cams.get_cams_mcclear
Feb 22, 2021
0a92f72
Update v0.9.0.rst
Feb 22, 2021
e8d1098
Reference correct pull request in whatsnew
Feb 23, 2021
2092f8b
Add test file for monthly data
Feb 23, 2021
ff9cece
Create sub-functions parse and read
Feb 23, 2021
0c28299
Fixed stickler
Feb 23, 2021
75e575f
Update constants names
Feb 25, 2021
1f2ec30
Fixed monthly integration of values
Feb 25, 2021
641fc97
Improvement to meta-data parsing
Feb 25, 2021
527fa1c
Update test file to be during the day
Feb 26, 2021
673bf3b
Convert to get_cams to add support for CAMS Radiation
Feb 26, 2021
c6764d3
Fixed stickler issues
Feb 26, 2021
225b0e1
Update function names to just 'cams'
Feb 26, 2021
924c58a
Update return description
Feb 27, 2021
cbc116d
Rename to cams_radiation
Feb 27, 2021
294c14a
Convert print statements to warnings
Feb 27, 2021
d28143a
Update function names
Feb 27, 2021
f263184
Fixed stickler
Feb 27, 2021
9b26d91
Fixed stickler
Feb 27, 2021
e3cb60d
Improvements to documentation
Feb 27, 2021
af66bbe
Raise warning for unrecognized time step
AdamRJensen Feb 27, 2021
2949cb1
Reworked URL formatting & comments on HTTP status
Mar 6, 2021
19fcdb8
Fixed stickler
Mar 6, 2021
328c86e
Add tests for cams.read_cams_radiation
Mar 7, 2021
1df6830
Add tests coverage for metadata
AdamRJensen Mar 7, 2021
f518246
Update docs/sphinx/source/whatsnew/v0.9.0.rst
AdamRJensen Mar 7, 2021
96e3719
Add reference to parsing function in whatsnew
AdamRJensen Mar 7, 2021
5f952c0
Update module and function names
AdamRJensen May 31, 2021
b4a686d
Update iotools init file with new names
AdamRJensen May 31, 2021
1ccbe70
update test file name
AdamRJensen May 31, 2021
5c9ef69
Add ".." to conftest import and update function documentation
AdamRJensen Jun 4, 2021
bb34a25
Change asterisk to † in documentation
AdamRJensen Jun 4, 2021
7c7ec0b
Merge branch 'master' into cams_mcclear
AdamRJensen Jun 4, 2021
71c3a64
Update from master
AdamRJensen Jun 4, 2021
9f6195e
Merge remote-tracking branch 'upstream/master' into cams_mcclear
AdamRJensen Jun 4, 2021
e335730
Add mock tests
AdamRJensen Jun 4, 2021
5a018ca
Stickler fixes and add import of requests_mock
AdamRJensen Jun 4, 2021
d0a2571
Remove import request_mock in test_sodapro.py
AdamRJensen Jun 4, 2021
e642399
Added requests-mock to setup.py and CI requirements files
AdamRJensen Jun 4, 2021
9e69d3e
Add requests-mock to ci\azure\posix.yml
AdamRJensen Jun 4, 2021
e085373
Move requests-mock to pip install section
AdamRJensen Jun 4, 2021
51b6ab9
Move requests-mock to pip install section for py36 and py36-min
AdamRJensen Jun 5, 2021
9814cae
Add additional tests for full coverage
AdamRJensen Jun 5, 2021
1d28d1a
Update stickler
AdamRJensen Jun 5, 2021
1d115db
Add timeout option to get_cams
AdamRJensen Jun 7, 2021
8e53165
Add timeout option to get_cams
AdamRJensen Jun 7, 2021
3714e62
Extent tests to cover label, integrated, map_variables arguments
AdamRJensen Jun 7, 2021
cc5347d
Fix stickler
AdamRJensen Jun 7, 2021
9fc945f
Updates to documentation
AdamRJensen Jun 7, 2021
8d85f0b
Update to documentation
AdamRJensen Jun 7, 2021
857bd91
Reformat data inputs, set index name to None
AdamRJensen Jun 7, 2021
15e097c
Remove rounding when converting from integrated values
AdamRJensen Jun 7, 2021
e80cbde
Minor updates to mock tests
AdamRJensen Jun 7, 2021
6aadd5c
Remove round(4)
AdamRJensen Jun 7, 2021
f194905
Change meta variable name to metadata
AdamRJensen Jun 11, 2021
128c3f9
Change start_date/end_date to start/end
AdamRJensen Jun 11, 2021
1e6d262
Make stickler happy
AdamRJensen Jun 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extent tests to cover label, integrated, map_variables arguments
  • Loading branch information
AdamRJensen committed Jun 7, 2021
commit 3714e62665c564b6841f468ea8920800db4996f8
33 changes: 22 additions & 11 deletions pvlib/tests/iotools/test_sodapro.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@

columns_radiation_verbose_unmapped = [
'Observation period', 'TOA', 'Clear sky GHI', 'Clear sky BHI',
'Clear sky DHI', 'Clear sky BNI', 'sza', 'summer/winter split', 'tco3',
'tcwv', 'AOD BC', 'AOD DU', 'AOD SS', 'AOD OR', 'AOD SU', 'AOD NI',
'AOD AM', 'alpha', 'Aerosol type', 'fiso', 'fvol', 'fgeo', 'albedo']
'Clear sky DHI', 'Clear sky BNI', 'GHI', 'BHI', 'DHI', 'BNI',
'Reliability', 'sza', 'summer/winter split', 'tco3', 'tcwv', 'AOD BC',
'AOD DU', 'AOD SS', 'AOD OR', 'AOD SU', 'AOD NI', 'AOD AM', 'alpha',
'Aerosol type', 'fiso', 'fvol', 'fgeo', 'albedo', 'Cloud optical depth',
'Cloud coverage', 'Cloud type', 'GHI no corr', 'BHI no corr',
'DHI no corr', 'BNI no corr']

columns_radiation = [
'Observation period', 'ghi_extra', 'ghi_clear', 'bhi_clear', 'dhi_clear',
Expand Down Expand Up @@ -122,6 +125,12 @@
np.nan, -1, 0.1668, 0.0912, 0.0267, 0.1359, 0.0, 0, 5, 846.564, 751.554,
95.01, 919.614]])

values_radiation_verbose_integrated = np.copy(values_radiation_verbose)
values_radiation_verbose_integrated[:,1:10] = \
values_radiation_verbose_integrated[:,1:10].astype(float)/60
values_radiation_verbose_integrated[:,31:35] = \
values_radiation_verbose_integrated[:,31:35].astype(float)/60

values_radiation_monthly = np.array([
['2020-01-01T00:00:00.0/2020-02-01T00:00:00.0', 67.4317, 39.5496,
26.2, 13.3496, 142.1567, 20.8763, 3.4526, 17.4357, 16.7595, 0.997],
Expand Down Expand Up @@ -163,14 +172,16 @@ def test_read_cams(testfile, index, columns, values, dtypes):
assert_frame_equal(out, expected)


# def test_read_cams_integrated_rename_label():
# expected = generate_expected_dataframe(
# values_radiation_verbose, index_monthly,
# columns_radiation_verbose_unmapped, values_mcclear_monthly,
# dtypes_mcclear)
# out, meta = sodapro.read_cams(testfile_radiation_verbose, integrated=True,
# label='right', map_variables=True)
# assert_frame_equal(out, expected)
def test_read_cams_integrated_unmapped_label():
# Default label is 'left' for 1 minute time resolution, hence 1 minute is
# added for label='right'
expected = generate_expected_dataframe(
values_radiation_verbose_integrated,
columns_radiation_verbose_unmapped,
index_verbose+pd.Timedelta(minutes=1), dtypes=dtypes_radiation_verbose)
out, meta = sodapro.read_cams(testfile_radiation_verbose, integrated=True,
label='right', map_variables=False)
assert_frame_equal(out, expected)


def test_read_cams_metadata():
Expand Down
0