GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
14 stars 4 forks source link

SRout_cor calculated with wrong array index subset #34

Closed mankoff closed 3 years ago

mankoff commented 3 years ago

https://github.com/GEUS-PROMICE/PROMICE-AWS-processing/blob/a1508a6b06dc1ce749b0fa95c43a7879cb0993f1/IDL/AWSdataprocessing_v3.pro#L539

In the line above, albedo should be albedo[sunonlowerdome].

mankoff commented 3 years ago

Effect of this issue (using only EGP 2016 raw for now):

With the bug, the code reports:

- Mean net SR change by corrections:      1.27578 W/m2

And with the bug fix it reports:

- Mean net SR change by corrections:      1.27585 W/m2

However, that is the average over all the records. It is a large change for the day(s) where the bug occurs.

And the differences occur only near the beginning of the record. From clf(); var='ShortwaveRadiationDown_Cor(W/m2)'; (bug-fix)[bug.index < '2016-05-05'][var].plot(label=var + 'diff'); legend(); ylabel("W m$^{-2}$"):

image

This may have a larger effect at other stations, times, locations, seasons, etc.

Dirk-van-As commented 3 years ago

I think you're right: bug in V3 for outgoing shortwave radiation for times when the sun is over the horizon but in view of the (tilted) down-facing shortwave sensor dome. Nicely done; hard to find since these occurrences are few and impact is low unless sensor tilt is LARGE.