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
12 stars 4 forks source link

Consistent resampling for precipitation correction and rate calculation #215

Open PennyHow opened 7 months ago

PennyHow commented 7 months ago

From @ladsmund:

I was trying to understanding the time interval used to compute the precipitation rate. I found the location in the source code, but it is just using diff with respect the previous sample. I guess the interval then depends on the sample rate at that specific time. https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/8fca6c3eb596775a9a6b676599c2068add84bdde/src/pypromice/process/L1toL2.py#L370C8-L370C8 If this is correct, then I don't think we can compare precipitation rates across stations and time. What do you think?

Response from @PennyHow:

We calculate it with respect to the previous sample like you say. But I think there are better ways to calculate precipitation rate. This calculation is just based on a correction calculation from Jason. We implemented it to match what Jason was doing. But if you want to compare across stations, then maybe we can find a better solution?

@ladsmund

I think it will make sense to define the rate wrt an explicit interval such as hourly or daily.

@PennyHow

We could definitely do that... so a resample everything to hourly or daily intervals before performing the correction and rate calculation