from gdf import GDFNetCDF, GDF

# The storage_config used by GDF seems overly complicated, here
# is a somewhat simplified version of it that's a bit easier to read.

storage_config_ls8 = {
    'dimensions': {
        'T': {
                "index_reference_system_unit": "year",
                "dimension_id": 4,
                "indexing_type": "irregular",
                "reference_system_unit": "seconds",
                "reference_system_name": "Seconds since 1/1/1970 0:00",
                "dimension_cache": 128,
                "properties": {
                    "units": "seconds since 1970-01-01 ",
                    "long_name": "time",
                    "calendar": "gregorian",
                    "standard_name": "time",
                    "axis": "T"
                },

        },
        'X': {
            'dimension_extent': [],
            'reference_system_unit': [],
            'dimension_id': 3,
            'indexing_type': 'regular/irregular',
            'dimension_name': 'latitude',  # Used
            'dimension_element_size': 0.00025,
            'dimension_elements': 4000,
            "dimension_cache": 128, #  Chunk size
            "properties": {
                "units": "degrees_east",
                "long_name": "longitude",
                "standard_name": "longitude",
                "axis": "X"
            },
        },
        "Y": {

        }
    },
    "storage_type_name": "Landsat 8 OLI ARG-25",
    "domains": {
        "XY": {
            "reference_system_id": 4326,
            "dimensions": [
                "Y",
                "X"
            ],
            "reference_system_definition": "EPSG:4326",
            "domain_name": "Spatial XY",
            "reference_system_unit": "degrees",
            "reference_system_name": "Unprojected WGS84 (Lat-long)",
            "domain_id": 1,
            "domain_tag": "XY"
        },
        "T": {
            "reference_system_id": 4,
            "dimensions": [
                "T"
            ],
            "reference_system_definition": "seconds since 1970-01-01 00:00:00",
            "domain_name": "Temporal",
            "reference_system_unit": "seconds",
            "reference_system_name": "Seconds since 1/1/1970 0:00",
            "domain_id": 3,
            "domain_tag": "T"
        }
    },
    "storage_type_id": 8,
    "storage_type_location": "/g/data2/uc0/rs0_dev/gdf_trial/20150709",
    'measurement_types': {
        "B1": {
            "measurement_type_name": "Band 1 - Coastal Aerosol",
            "datatype_name": "int16",
            "gdal_datatype_name": "int16",
            "numpy_datatype_name": "int16",
            "netcdf_datatype_name": "i2",
            "measurement_type_index": 1,
            "measurement_metatype_name": "Spectral Radiance (Single Band)",
            "measurement_metatype_id": 1,
            "nodata_value": -999.0
        },
        "B2": {
            "measurement_type_name": "Band 2 - Visible Blue",
            "datatype_name": "int16",
            "gdal_datatype_name": "int16",
            "numpy_datatype_name": "int16",
            "netcdf_datatype_name": "i2",
            "measurement_type_index": 2,
            "measurement_metatype_name": "Spectral Radiance (Single Band)",
            "measurement_type_tag": "B2",
            "measurement_metatype_id": 1,
            "nodata_value": -999.0
        },
    },
}
Add simpler to read reference gdf storage_config