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

Changing fill_value from None to 'extrapolate' for ozone data #140

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

AndrewILWilliams
Copy link
Contributor

For an xr.DataArray() with 1-dimensional coordinates, da.interp_like() actually calls scipy's interp1d function, rather than interpn. As a result, to extrapolate to values outside the domain, you need to pass fill_value='extrapolate', rather than fill_value=None.

@brian-rose
Copy link
Collaborator

Interesting! I wonder if there's been a change in the default behavior of interp1d? Apparently I used to think "None" was the correct argument.

@AndrewILWilliams
Copy link
Contributor Author

AndrewILWilliams commented Jan 15, 2021

Looking at the release notes it seems that this was a change at v0.17.0, so around 2016/2017!

Now, lets see if it passes CI...

@codecov-io
Copy link

codecov-io commented Jan 15, 2021

Codecov Report

Merging #140 (c6765a7) into master (dfe4c52) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #140   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          66      66           
  Lines        3552    3552           
======================================
  Misses       3552    3552           
Impacted Files Coverage Δ
climlab/radiation/radiation.py 0.00% <0.00%> (ø)

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 dfe4c52...c6765a7. Read the comment docs.

Copy link
Collaborator

@brian-rose brian-rose left a comment

Choose a reason for hiding this comment

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

Excellent, thanks!

@brian-rose
Copy link
Collaborator

All tests are passing, merging now.

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.

None yet

3 participants