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

Reading Africa minicubes #10

Open
Frankie91 opened this issue Apr 18, 2023 · 1 comment
Open

Reading Africa minicubes #10

Frankie91 opened this issue Apr 18, 2023 · 1 comment

Comments

@Frankie91
Copy link

Good Morning,

Hope this is the right place to ask this question. Should this package also be used to open and read the provisional Africa minicubes? if yes, how? Thank you in advance!

@crequena
Copy link
Contributor

crequena commented May 4, 2023

Hey @Frankie91 ,

This package is not meant to handle the provisional Africa minicubes hosted in Zenodo. For them you will need to load them using the Xarray library.

However, you can use the final Africa minicubes (EarthNet 2023), which the earthnet-toolkit can handle. You can do so like this:

pip install earthnet
import earthnet as entk
minicube = entk.load_minicube(
    dataset = "earthnet2023",
    split = "test", 
    id = "36PZQ6711")

minicube # explore, have fun!

You can take a look at the available locations on the final dataset in this explorer (grab the minicube names from it as well) https://www.earthnet.tech/earthnet2023_map.html

If you want to create new minicubes , you can use this repo's package, the earthnet-minicuber. You can create a minicube following this recipe:

import earthnet_minicuber as emc

specs = {
    "lon_lat": (43.598946, 3.087414), 
    "xy_shape": (256, 256), 
    "resolution": 10, 
    "time_interval": "2021-07-01/2021-07-31",
    "providers": [
        {
            "name": "s2",
            "kwargs": {"bands": ["B02", "B03", "B04", "B8A"],
            "best_orbit_filter": True, 
            "brdf_correction": True, 
            "cloud_mask": True, 
            "aws_bucket": "planetary_computer"}
        },
        {
            "name": "era5esdl",
            "kwargs": {"bands": ["t2m", "tp"]} 
        }
        ]
}

minicube = emc.load_minicube(specs, compute = True)
emc.plot_rgb(minicube)

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