Skip to content

linke turbidity resolution should be 1/12 of an arcdegree #263

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
mikofski opened this issue Nov 14, 2016 · 0 comments · Fixed by #264
Closed

linke turbidity resolution should be 1/12 of an arcdegree #263

mikofski opened this issue Nov 14, 2016 · 0 comments · Fixed by #264
Labels
Milestone

Comments

@mikofski
Copy link
Member

The Linke turbidity should be 1/12 = 0.0833 of an arc degree or 5' (minutes of arc degrees) - see section 8 from "Aerosol optical depth and Linke turbidity climatology" and SoDa Pro: Linke Turbidity Factor, or the old SoDa Linke Turbidity and reference. Instead latitude is 180/2159 = 0.083372 and longitude is 360/4319 = 0.083353.

Section 8.1: Format of the data explains:

Optionally the files are also available in 1/12° resolution. These files were organised in the following form:
1st row: 89.9583° S, 2nd row: 89.875 ° S, …
1st column: 179.9583°W, 2nd column: 179.875°W, …

This indicates that each measurement is at the center of the node, not the edges. IE: the 1st node is not at 90° but (90° - 1/24°) = 89.9583°.

The values of TL at points for any latitude along the longitude -180° and +180° don't match, and therefore indicate that they are not the same.

lt_180lon_janjun

mikofski added a commit to mikofski/pvlib-python that referenced this issue Nov 15, 2016
* set minimum index as 0 not 1
* adjust _linearly_scale so that is increments are 5 minutes or 1/12 of an
 arcdegree from the centers of neighboring indices
* this fixes the out of bounds error for latitudes or longitudes at the
 limits of the range
* move _linearly_scale to be right after lookup_linke_turbidity
* add link to pdf on AOD and LT from MeteoTest
* raise IndexError if outputmatrix is more than half an index outside of
 the limits

Signed-off-by: Mark Mikofski <[email protected]>
@wholmgren wholmgren added the bug label Nov 16, 2016
@wholmgren wholmgren added this to the 0.4.2 milestone Nov 16, 2016
wholmgren pushed a commit that referenced this issue Nov 18, 2016
* fix #263 and #262

* set minimum index as 0 not 1
* adjust _linearly_scale so that is increments are 5 minutes or 1/12 of an
 arcdegree from the centers of neighboring indices
* this fixes the out of bounds error for latitudes or longitudes at the
 limits of the range
* move _linearly_scale to be right after lookup_linke_turbidity
* add link to pdf on AOD and LT from MeteoTest
* raise IndexError if outputmatrix is more than half an index outside of
 the limits

Signed-off-by: Mark Mikofski <[email protected]>

* unset debug logging

Signed-off-by: Mark Mikofski <[email protected]>

* remove logging and use pytest with raises context

Signed-off-by: Mark Mikofski <[email protected]>

* all test passing now

Signed-off-by: Mark Mikofski <[email protected]>

* fixes #265

* use calendar month days instead of approximation of monthly middles
* also account for leap years
* if all years are leap years, or not any are leap years, use fast interp,
 otherwise loop and interpolate each timestamp
* add _leapyear tests and update expected values for new interpolated
 Linke turbidity factors

Signed-off-by: Mark Mikofski <[email protected]>

* update expected values for test_location.test_get_clearsky

Signed-off-by: Mark Mikofski <[email protected]>

* update test_modelchain.py with new expected values for PR #264

Signed-off-by: Mark Mikofski <[email protected]>

* add (at)requires_scipy and update whatsnew v0.4.2

Signed-off-by: Mark Mikofski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants