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

Converting Half/3-hourly to daily and monthly #27

Closed
surajitdb opened this issue Sep 24, 2021 · 5 comments
Closed

Converting Half/3-hourly to daily and monthly #27

surajitdb opened this issue Sep 24, 2021 · 5 comments

Comments

@surajitdb
Copy link

Hi, I am wondering if wxee could convert half-hourly / 3-hourly data to daily/ monthly data for the following data sets:

  1. ee.ImageCollection("TRMM/3B42") (3-hourly precipitation)
  2. ee.ImageCollection("NASA/GPM_L3/IMERG_V06") (half-hourly)

Thanking you.

@aazuspan
Copy link
Owner

Hi @surajitdb, you can use aggregate_time(frequency="day") or aggregate_time(frequency="month") to do that.

As long as the frequency of your data is smaller than the frequency you aggregate to, it will work the same. So, for example, using aggregate_time(frequency="day") with 12-hour data, 3-hour data, half-hour data, or 5-minute data will always return daily data. The only difference is that 5-minute data would have to aggregate 288 images for every day while 12-hour data would aggregate 2 images per day, so the 5-minute will take longer and use more memory.

@surajitdb
Copy link
Author

surajitdb commented Sep 27, 2021

Hi @aazuspan,
Thank you so much for answering the query promptly. Yes, it did work. I am wondering if there is any way to handle more than 5000 elements at a time in wxee. GEE does not allow the Code Editor to extract more than 5000 elements at a given time. So, for precipitation analysis like ERA5_land, which comes in hourly data GEE/wxee could handle elements of 4992 equivalent to 208 days. So, it becomes an issue if we want to handle ERA5_land precipitation for long-term analysis. Yes, internet speed also becomes an issue with wxee downloading say 208 images (for 208 days precipitation data). GEE code editor seems to be faster for the same data length.

@aazuspan
Copy link
Owner

No problem @surajitdb!

If you're trying to download a collection with more than 5000 images, there's no way to make that work directly. You could split the collection up into a few smaller collections using filterDate, download those as xarray.Dataset objects, and then concatenate those on the time dimension to create one giant Dataset.

But if you're using that much data, it will probably be easier and more reliable to use the Copernicus Climate Data Store through their API instead of GEE.

@surajitdb
Copy link
Author

Hi @aazuspan,
Thank you so much. Yes, it makes sense to use the API than GEE.

@aazuspan
Copy link
Owner

No problem!

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