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

Get data with gap between each other #52

Open
arthurdurso opened this issue Feb 1, 2023 · 1 comment
Open

Get data with gap between each other #52

arthurdurso opened this issue Feb 1, 2023 · 1 comment

Comments

@arthurdurso
Copy link

I'm really considering using your python package, but in my project it would be better if I get data with certain frequency ( every hour for example ) and I'm not finding a way to do that with the Goes2go.

I'm looking for something similar as I do with Pandas as shown below.
Captura de tela 2023-02-01 145218

@blaylockbk
Copy link
Owner

Hi @arthurdurso. This can be accomplished with something like this

from goes2go import GOES
import pandas as pd

DATES = pd.date_range('2023-01-01 00:00', '2023-01-01 03:00', freq="H")

G = GOES()
ds_list = [G.nearesttime(attime=DATE, return_as="xarray") for DATE in DATES]

# Join the xarray datasets together
ds = xr.concat(ds_list, dim='t')

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

No branches or pull requests

2 participants