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

spurious lufft precipitation rates #26

Open
jasonebox opened this issue Jan 17, 2023 · 1 comment
Open

spurious lufft precipitation rates #26

jasonebox opened this issue Jan 17, 2023 · 1 comment

Comments

@jasonebox
Copy link

jasonebox commented Jan 17, 2023

I've started working with the lufft precipitation rates :-)

two related issues...

1.) instead of posting accumulated precipitation, should instead convert precip_u, precip_u_cor (and in some cases precip_l, precip_l_cor) to the time rate of change using e.g.,

            flag=0
            if sum(df.columns=='t_l')==0:
                varnams=['precip_u','precip_u_cor','t_u']
            else:
                varnams=['precip_l','precip_l_cor','t_l','precip_u','precip_u_cor','t_u']
                flag=1

...

            x=pd.read_csv(tmpfile)
            N=len(x)
            if N>0:
                x['tp_u']=np.nan
                for i in range(1,N):
                    x['tp_u'][i]=x['precip_u_cor'][i]-x['precip_u_cor'][i-1]
                    if x['tp_u'][i]>400 or x['tp_u'][i]<0:
                        issues_site.append(site)
                        issues_date.append(df.time[i])
                        issues_p_rate.append(x['tp_u'][i])
                        issues_level.append('u')
                        # x['tp_u'][i]=np.nan

...By posting the rate of change, we have no issue with defining a) when zero should start and b) in cases of extended gaps, accumulated precipitation becomes ambiguous. Rather, users should just see NaN and thus know no data be available that period. Further, users can produce accumulated precipitation, if they wish.

2.) in some cases, get nice results like:
NUK_Uv3_2021

in other cases, the result reflects large offsets in the accumulated precipitation record:
NUK_Uv3_2022
or
NSE_2022
there are several other cases...

So, I coded this (from which the example code above comes), that outputs the dates of spurious accumulated precipitation change into this folder (all from this repo). My hope is the issues can be resolved and the next release will have a much more user friendly form. :-)

@jasonebox
Copy link
Author

jasonebox commented Jan 18, 2023

when there are short gaps from no transmission, I think spline interpolation is worth a try. See hourly example below.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants