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

Cube loads with less variables #293

Open
MartinuzziFrancesco opened this issue Feb 1, 2023 · 4 comments
Open

Cube loads with less variables #293

MartinuzziFrancesco opened this issue Feb 1, 2023 · 4 comments

Comments

@MartinuzziFrancesco
Copy link
Collaborator

I am opening a cube from a location of the FluxNetEO data set and it seems that some variables are missing

c = Cube(filename_modis)
YAXArray with the following dimensions
lon_pixel           Axis with 10 Elements from -5.0 to 4.0
lat_pixel           Axis with 10 Elements from 5.0 to -4.0
time                Axis with 7671 Elements from 2000-01-01T00:00:00 to 2020-12-31T00:00:00
Variable            Axis with 55 elements: BLUE_gapfilltype GREEN .. LST_AQUA_Night NDVI_gapfilltype 
Total size: 321.89 MB
xr.open_dataset(MODIS_path)
<xarray.Dataset>
Dimensions:                            (lat_pixel: 10, lon_pixel: 10, time: 7671)
Coordinates:
  * lat_pixel                          (lat_pixel) float64 5.0 4.0 ... -3.0 -4.0
  * lon_pixel                          (lon_pixel) float64 -5.0 -4.0 ... 3.0 4.0
  * time                               (time) datetime64[ns] 2000-01-01 ... 2...
Data variables: (12/61)
    EVI                                (time, lat_pixel, lon_pixel) float64 ...
    EVI_gapfilltype                    (time, lat_pixel, lon_pixel) float64 ...
    NDVI                               (time, lat_pixel, lon_pixel) float64 ...
    NDVI_gapfilltype                   (time, lat_pixel, lon_pixel) float64 ...
    NIRv                               (time, lat_pixel, lon_pixel) float64 ...
    NIRv_gapfilltype                   (time, lat_pixel, lon_pixel) float64 ...
    ...                                 ...
    LST_gapfilltype_TERRA_Night_VZA40  (time, lat_pixel, lon_pixel) float64 ...
    LST_AQUA_Night_VZA40               (time, lat_pixel, lon_pixel) float64 ...
    LST_gapfilltype_AQUA_Night_VZA40   (time, lat_pixel, lon_pixel) float64 ...
    latitude_1000m                     (lat_pixel, lon_pixel) float64 ...
    longitude_1000m                    (lat_pixel, lon_pixel) float64 ...
    dist_from_tower_1000m              (lat_pixel, lon_pixel) float64 ...
Attributes:
    site_ID:           DE-Har
    institution:       MPI-BGC
    product:           FluxnetEO
    site_coordinates:  47.93439865, 7.600999832
    version:           1.0
    processed_by:      Sophia Walther ([email protected], Ulrich...
    reference:         Walther, S. - Technical note: A view from space on glo...

The variables loaded using EarthDataLab are 55 while the variables in xarray are 61. The missing variables are the only ones not in the (time, lat_pixel, lon_pixel) format it seems

Is this expected? If so what can I do to also load the missing variables?

@MartinuzziFrancesco MartinuzziFrancesco changed the title Cube loaded with less variables Cube loads with less variables Feb 1, 2023
@felixcremer
Copy link
Member

To get all the variables use open_dataset. Cube combines all subcubes of the dataset with the same dimensions into one Cube object.

@MartinuzziFrancesco
Copy link
Collaborator Author

I see, thanks!

@felixcremer
Copy link
Member

Where in the documentation should we make this distinction more clear?

@MartinuzziFrancesco
Copy link
Collaborator Author

I think it would make sense to have it on Accessing the Data Cube but at the same time this probably should belong to YAXArrays under Open NetCDF

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