Update CSP - #504
Conversation
for more information, see https://pre-commit.ci
fneum
left a comment
There was a problem hiding this comment.
Thanks @awongel! Looks great. I have two suggestions / requests:
-
Could you remove the Saudia Arabia example? The example got quite long and to me it didn't add too many new insights.
-
Do you have a comparison of the
convert_csv()output before and after? That would make it easier to see whether the changes are plausible. Just a graphic + code snippet would be helpful.
| dask_gufunc_kwargs=dict( | ||
| output_sizes={"yout": dst_shape[0], "xout": dst_shape[1]} | ||
| output_sizes={"yout": dst_shape[0], "xout": dst_shape[1]}, | ||
| allow_rechunk=True, |
There was a problem hiding this comment.
Hi @fneum!
-
I had discussed with @euronion what we should add and felt that a second location would be useful to show that it works more generally than in a single location. If you think it's too much, I don't mind removing it again.
-
Since I replaced the calculation, would you suggest to keep the previous way of calculating it somewhere in the code? I wanted to avoid that. Or save the old result somewhere, but then you can't immediately see how it was calculated.
The change in the gis.py file was needed for the sarah data part of the example, which wouldn't run for me otherwise. Happy to remove if you can confirm this is not needed.
# Conflicts: # atlite/csp.py # atlite/gis.py # examples/working-with-csp.ipynb
Drop the second-location (Saudi Arabia) example from the CSP notebook per review, along with its reference CSV. Revert the allow_rechunk regrid arg.
reproject needs the full spatial plane, so multi-chunk spatial inputs (e.g. SARAH2) must be merged rather than error.
|
@awongel took the freedom to merge the latest master and remove the saudi arabia example. we should keep the allow_rechunk in as it is generally needed for sarah cutouts and regrid operations. I have the changes locally but don't want to push on your master unless you say its okay. alternatively I can raise another pr superseding this one |
|
@FabianHofmann, awesome, thanks for picking this up again! Yes, please feel free to push your changes directly to my master. |
FabianHofmann
left a comment
There was a problem hiding this comment.
thanks @awongel for the contribution. I updated the release notes and want to update the pr summary for the record. (would be nice in future to have a summary written by the author)
Changes proposed in this Pull Request
CSP conversion now models the actual collector geometry instead of assuming perfect sun-tracking. Both technologies are computed via
SurfaceOrientationwithTiltedDirectIrrad = (cosincidence / sin(altitude)) * influx_direct. Solar tower (tracking="dual") yieldscosincidence = 1, so its output is unchanged DNI. Parabolic trough now usestracking="horizontal"(single-axis tracking), so it collects less than DNI when the sun is not aligned with its rotation axis — correcting the previous overestimate. The oldatlite/csp.pymodule (with its hardcoded 3.75° altitude clamp) was removed and folded intoconvert.py; the publiccutout.csp()API is unchanged. Reworked theworking-with-cspexample to showcase the difference.Checklist
doc.environment.yaml,environment_docs.yamlandsetup.py(if applicable).doc/release_notes.rstof the upcoming release is included.