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

Update the 'How to use larda' in documentation #37

Open
martin-rdz opened this issue Sep 23, 2024 · 0 comments
Open

Update the 'How to use larda' in documentation #37

martin-rdz opened this issue Sep 23, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@martin-rdz
Copy link
Collaborator

Some examples are not longer working as expected (mostly due to minor changes in larda or dependencies).

E.g. the xarray resample and plot example is

larda_rsd2.connect('lacros_cycare')
begin_dt = datetime.datetime(2018, 1, 15, 0, 0)
end_dt = datetime.datetime(2018, 1, 16, 0, 0)

iwv = larda_rsd2.read('HATPRO', 'IWV', [begin_dt, end_dt])

iwv_xr = pyLARDA.Transformations.container2DataArray(iwv)

iwv_resampled = iwv_xr.resample(time="1H", keep_attrs=True).mean(keep_attrs=True)

fig, ax = pyLARDA.Transformations.plot_timeseries2(
    iwv, figsize=[7,4], label='instrument resolution')
fig, ax = pyLARDA.Transformations.plot_timeseries2(
    iwv_resampled, tdel_jumps=4000, step='post',
    linewidth=2, label='resampled to 1h',
    fig=fig, ax=ax)
ax.legend()

while the working version in the newest version would be

larda.connect('lacros_cycare')
time = [datetime.datetime(2018, 1, 15, 0, 0),
        datetime.datetime(2018, 1, 16, 0, 0)]

iwv = larda.read('HATPRO', 'IWV', time)

iwv_xr = pyLARDA.Transformations.container2DataArray(iwv)

iwv_resampled = iwv_xr.resample(time="1h").mean()

fig, ax = pyLARDA.Transformations.plot_timeseries2(
    iwv, figsize=[7,4], label='instrument resolution')
fig, ax = pyLARDA.Transformations.plot_timeseries2(
    iwv_resampled, tdel_jumps=4000, step='post',
    linewidth=2, label='resampled to 1h',
    figure=fig, axis=ax)
ax.legend()
@martin-rdz martin-rdz added bug Something isn't working good first issue Good for newcomers labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant