JuliaDataCubes / EarthDataLab.jl

Julia interface for Reading from the Earth System Datacube
http://earthsystemdatacube.net
Other
33 stars 14 forks source link

Cube loads with less variables #293

Open MartinuzziFrancesco opened 1 year ago

MartinuzziFrancesco commented 1 year ago

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 (sophia.walther@bgc-jena.mpg.de, 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?

felixcremer commented 1 year ago

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

MartinuzziFrancesco commented 1 year ago

I see, thanks!

felixcremer commented 1 year ago

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

MartinuzziFrancesco commented 1 year ago

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