{
  "name": "demo-drought-indicator",
  "description": "The Sentinel-2 Drought Indicator is a complex DeltaTwin designed to assess drought conditions using Sentinel-2 satellite imagery. By analyzing various vegetation indices derived from the imagery, such as NDVI (Normalized Difference Vegetation Index), NDMI (Normalized Difference Moisture Index), and NDWI (Normalized Difference Water Index), the model calculates a drought indicator for a given area. The output includes a table indicating drought levels (0: No drought, 1: Intermediate, 2: Drought) and a map representation visualizing the spatial distribution of drought conditions.",
  "short_description": "This DeltaTwin serves as a proof-of-concept to demonstrate its dependency management.",
  "license": {
    "name": "GPLv3",
    "url": "https://www.gnu.org/licenses/gpl-3.0.en.html",
    "copyrights": [
      { "years": [2023], "company": "Gael Systems" }
    ]
  },
  "owner": "Gael Systems",
  "inputs": {
    "product": {
      "type": "Data",
      "description": "Sentinel-2 Level 1C or 2A (example: https://vision.odata.gael.fr/odata/v1/Products(d5bca157-4a82-4cc9-87e0-b640f8c03242)/$value)",
      "value": "https://vision.odata.gael.fr/odata/v1/Products(d5bca157-4a82-4cc9-87e0-b640f8c03242)/$value"
    }
  },
  "outputs": {
    "drought_indicator": {
      "type": "Data",
      "description": "a table of drought levels (0: No drought, 1: intermediate, 2: Drought)"
    },
    "drought_map_representation": {
      "type": "Data",
      "description": "map representation of drought indicator"
    }
  },
  "resources": {
    "band_03": {
      "type": "string",
      "value": "B03"
    },
    "band_04": {
      "type": "string",
      "value": "B04"
    },
    "band_08": {
      "type": "string",
      "value": "B8A"
    },
    "band_11": {
      "type": "string",
      "value": "B11"
    }
  },
  "models": {
    "drought-calculator": {
      "path": "models/drought-calculator",
      "type": "python",
      "parameters": {
        "pythonVersion": "3.11",
        "aptRequirements": [
          {
            "name": "gdal-bin",
            "version": "3.6.2+dfsg-1+b2"
          },
          {
            "name": "libgdal-dev",
            "version": "3.6.2+dfsg-1+b2"
          }
        ],
        "pipRequirements": [
          {
            "name": "rasterio",
            "version": "1.3.9"
          },
          {
            "name": "matplotlib",
            "version": "3.8.3"
          }
        ],
        "command": "python drought_calculator.py $(inputs.ndvi) $(inputs.ndmi) $(inputs.ndwi)"
      },
      "inputs": {
        "ndvi": {
          "type": "Data",
          "description": "NDVI index calculated using dependency twin index-calculation"
        },
        "ndmi": {
          "type": "Data",
          "description": "NDMI index calculated using dependency twin index-calculation"
        },
        "ndwi": {
          "type": "Data",
          "description": "NDWI index calculated using dependency twin index-calculation"
        }
      },
      "outputs": {
        "indicator": {
          "type": "Data",
          "glob": "drought_indicator.tif"
        },
        "map": {
          "type": "Data",
          "glob": "drought_map_representation.png"
        }
      }
    }
  },
  "dependencies": {
    "band-extractor": {
      "id": "band-extractor",
      "version": "1.0.0"
    },
    "index-calculator": {
      "id": "index-calculation",
      "version": "1.0.0"
    }
  }
}
