Skip to content
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

purge influx feature #222

Merged
merged 2 commits into from
Feb 25, 2022
Merged

purge influx feature #222

merged 2 commits into from
Feb 25, 2022

Conversation

FabianHofmann
Copy link
Contributor

Closes #212
Touches #211

Change proposed in this Pull Request

Initial attempt was to solve #211, but is turns out to be tricky. The problem is that the era5 module relies on get_ functions which take the era5 retrieval parameters as an argument. The SolarPosition function however requires a dataset with the complete set of coordinates. It would be necessary to pass the cutout.data as an argument to the get_solar_position function. This requires changes one have to think through a bit.
The same counts for the sarah module. Its get_data function does not use the feature argument so far. It would be necessary to make separate get_influx and get_solar_position functions. I would postpone that change to another time.

In order to make the influx feature still a bit handier, I removed the solar athmospheric insolation variable from the influx feature as well as from the SolarPosition function. The variables were renamed to solar_azimuth and solar_altitude.

Motivation and Context

Make the influx feature leaner. Make data variables accessible via cutout.data.solar_altitude/ cutout.data.solar_azimuth

How Has This Been Tested?

No test added.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I tested my contribution locally and it seems to work fine.
  • I locally ran pytest inside the repository and no unexpected problems came up.
  • I have adjusted the docstrings in the code appropriately.
  • I have documented the effects of my code changes in the documentation doc/.
  • I have added newly introduced dependencies to environment.yaml file.
  • I have added a note to release notes doc/release_notes.rst.
  • I have used pre-commit run --all to lint/format/check my contribution

@codecov-commenter
Copy link

Codecov Report

Merging #222 (5f5efe3) into master (6c69d51) will increase coverage by 0.16%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #222      +/-   ##
==========================================
+ Coverage   72.34%   72.50%   +0.16%     
==========================================
  Files          19       19              
  Lines        1580     1575       -5     
  Branches      222      221       -1     
==========================================
- Hits         1143     1142       -1     
+ Misses        371      368       -3     
+ Partials       66       65       -1     
Impacted Files Coverage Δ
atlite/datasets/sarah.py 25.53% <0.00%> (ø)
atlite/pv/irradiation.py 67.08% <60.00%> (ø)
atlite/convert.py 67.02% <100.00%> (ø)
atlite/datasets/era5.py 89.79% <100.00%> (ø)
atlite/pv/solar_position.py 100.00% <100.00%> (+8.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c69d51...5f5efe3. Read the comment docs.

@FabianHofmann FabianHofmann marked this pull request as ready for review February 23, 2022 18:26
Copy link
Collaborator

@euronion euronion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test it, in general it LGTM. Thanks! :)

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

Successfully merging this pull request may close these issues.

Remove atmospheric_insolation from SolarPosition function
3 participants