{
    "$defs":{
        "chart":{
            "type":"object",
            "required":[
                "chartType",
                "domain",
                "series"
            ],
            "properties":{
                "chartType":{
                    "type":"string"
                },
                "domain":{
                    "type":"object",
                    "properties":{
                        "key":{
                            "type":"string"
                        },
                        "label":{
                            "type":"string"
                        },
                        "unit":{
                            "type":"string"
                        },
                        "values":{
                            "type":"array",
                            "items":{
                                "type":"number"
                            }
                        }
                    },
                    "required":[
                        "key",
                        "label",
                        "values"
                    ]
                },
                "series":{
                    "type":"array",
                    "items":{
                        "type":"object",
                        "properties":{
                            "key":{
                                "type":"string"
                            },
                            "label":{
                                "type":"string"
                            },
                            "unit":{
                                "type":"string"
                            },
                            "values":{
                                "type":"array",
                                "items":{
                                    "type":"number"
                                }
                            }
                        },
                        "required":[
                            "key",
                            "values"
                        ]
                    }
                }
            }
        }
    },
    "id":"pybox",
    "version":"1.1.0",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "outputTransmission":[
        "value"
    ],
    "links":[
        {
            "href":"https://civ.pi.ingv.it/project/pybox-2/",
            "rel":"related",
            "type":"text/html",
            "title":"CIV repository"
        },
        {
            "href":"https://doi.org/10.5281/zenodo.2616551",
            "rel":"describedby",
            "type":"application/pdf",
            "hreflang":"en-US",
            "title":"PyBox: a Python tool for simulating the kinematics of Pyroclastic density currents with the box-model approach, Reference and User's Guide"
        },
        {
            "href":"http://dx.doi.org/10.1016/j.jvolgeores.2016.08.002",
            "rel":"describedby",
            "type":"text/html",
            "hreflang":"en-US",
            "title":"A fast, calibrated model for pyroclastic density currents kinematics and hazard"
        },
        {
            "href":"https://doi.org/10.5281/zenodo.18920969",
            "rel":"cite-as",
            "type":"text/html",
            "title":"PyBOX-Web release on Zenodo (DOI: 10.5281/zenodo.18920969)"
        },
        {
            "href":"https://github.com/silviagians/PyBOX-Web",
            "rel":"source",
            "type":"text/html",
            "title":"PyBOX-Web source code repository on GitHub"
        },
        {
            "type":"application/json",
            "rel":"self",
            "href":"https://voice.pi.ingv.it/geoinquire/processes/pybox?f=json",
            "title":"Process description as JSON",
            "hreflang":"it-IT"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"https://voice.pi.ingv.it/geoinquire/processes/pybox?f=html",
            "title":"Process description as HTML",
            "hreflang":"it-IT"
        },
        {
            "type":"text/html",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://voice.pi.ingv.it/geoinquire/jobs?f=html",
            "title":"Jobs list as HTML",
            "hreflang":"it-IT"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://voice.pi.ingv.it/geoinquire/jobs?f=json",
            "title":"Jobs list as JSON",
            "hreflang":"it-IT"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/execute",
            "href":"https://voice.pi.ingv.it/geoinquire/processes/pybox/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"it-IT"
        }
    ],
    "title":"PYBOX",
    "description":"PyBOX is a Python software for simulating the propagation of gravity-driven pyroclastic density currents (PDCs) using a box-model approach. It predicts two-dimensional inundation areas using the energy-conoid method and topography derived from the Copernicus GLO-30 Digital Elevation Model (DEM), a DSM-product. Simulations support multiple particle-size classes",
    "keywords":[
        "Python code",
        "Box model",
        "Pyroclastic density currents",
        "Invasion maps",
        "Hazard assessment"
    ],
    "metadata":[
        {
            "title":"Source repository",
            "role":"repository",
            "href":"https://github.com/silviagians/PyBOX-Web"
        },
        {
            "title":"Silvia Giansante",
            "role":"author",
            "href":"https://orcid.org/0009-0008-2803-0873"
        }
    ],
    "inputs":{
        "lat":{
            "title":"Latitude",
            "description":"Vent latitude (decimal degrees)",
            "schema":{
                "title":"Latitude",
                "description":"Vent latitude (decimal degrees)",
                "type":"number",
                "minimum":-90.0,
                "maximum":90.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "lon":{
            "title":"Longitude",
            "description":"Vent longitude (decimal degrees)",
            "schema":{
                "title":"Longitude",
                "description":"Vent longitude (decimal degrees)",
                "type":"number",
                "minimum":-180.0,
                "maximum":180.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "l0":{
            "title":"Initial front distance",
            "description":"Initial PDC front distance from the vent",
            "schema":{
                "title":"Initial front distance",
                "description":"Initial PDC front distance from the vent",
                "type":"number",
                "minimum":100.0,
                "maximum":2000.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "h0":{
            "title":"Initial height",
            "description":"Initial PDC thickness (m)",
            "schema":{
                "title":"Initial height",
                "description":"Initial PDC thickness (m)",
                "type":"number",
                "minimum":100.0,
                "maximum":2000.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "theta0":{
            "title":"Temperature",
            "description":"Initial PDC temperature (K)",
            "schema":{
                "title":"Temperature",
                "description":"Initial PDC temperature (K)",
                "type":"number",
                "minimum":300.0,
                "maximum":1400.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "multiple_values":{
            "title":"Multiple particle-size classes",
            "description":"A separate set of parameters must be provided for each particle-size class: volume fraction (eps0), density (rhos), and diameter (ds). The sum of all particle volume fractions (eps0) must be &lt 1",
            "schema":{
                "title":"Multiple particle-size classes",
                "description":"A separate set of parameters must be provided for each particle-size class: volume fraction (eps0), density (rhos), and diameter (ds). The sum of all particle volume fractions (eps0) must be &lt 1",
                "type":"array",
                "minItems":1,
                "maxItems":21,
                "items":{
                    "type":"object",
                    "required":[
                        "eps0",
                        "rhos",
                        "ds"
                    ],
                    "additionalProperties":false,
                    "properties":{
                        "eps0":{
                            "title":"Particle volume fraction",
                            "description":"Volume fraction occupied by each particle-size class. Range: 0.001-0.1",
                            "type":"number",
                            "minimum":0.001,
                            "maximum":0.1
                        },
                        "rhos":{
                            "title":"Particle density",
                            "description":"Density of the solid particles in each particle size-class (kg/m3). Range: 500-3500 kg/m3",
                            "type":"number",
                            "minimum":500.0,
                            "maximum":3500.0
                        },
                        "ds":{
                            "title":"Particle diameter",
                            "description":"Characteristic diameter of particles in each particle-size class (m). Range: 1e-5-5e-3 (10 micron-5 mm)",
                            "type":"number",
                            "minimum":1e-05,
                            "maximum":0.005
                        }
                    }
                }
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "dt":{
            "title":"Time step",
            "description":"Numerical integration time step (s)",
            "schema":{
                "title":"Time step",
                "description":"Numerical integration time step (s)",
                "type":"number",
                "minimum":0.1,
                "maximum":30.0
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "margin":{
            "title":"Margin",
            "description":"Single distance value (m) from the given vent location applied equally in the -x, x and -y, y directions to define the topography spatial extent",
            "schema":{
                "title":"Margin",
                "description":"Single distance value (m) from the given vent location applied equally in the -x, x and -y, y directions to define the topography spatial extent",
                "type":"number",
                "minimum":5000,
                "maximum":50000
            },
            "minOccurs":1,
            "maxOccurs":1
        }
    },
    "outputs":{
        "input_data":{
            "title":"Input parameters",
            "description":"Summary of input parameters used in the simulation",
            "schema":{
                "type":"string",
                "contentMediaType":"text/plain"
            }
        },
        "dem":{
            "title":"Input topography",
            "description":"Digital elevation data used as terrain input for the simulation",
            "schema":{
                "type":"object",
                "properties":{
                    "geotiff":{
                        "description":"Reference to the GeoTIFF",
                        "allOf":[
                            {
                                "$ref":"link.yaml"
                            },
                            {
                                "type":"object",
                                "required":[
                                    "type"
                                ],
                                "properties":{
                                    "type":{
                                        "enum":[
                                            "image/tiff; application=geotiff",
                                            "application/tiff; application=geotiff"
                                        ]
                                    }
                                }
                            }
                        ]
                    },
                    "sld":{
                        "description":"Reference to the Styled Layer Descriptor (SLD) defining the visualization style for this GeoTIFF",
                        "allOf":[
                            {
                                "$ref":"link.yaml"
                            },
                            {
                                "type":"object",
                                "required":[
                                    "type"
                                ],
                                "properties":{
                                    "type":{
                                        "const":"application/vnd.ogc.sld+xml"
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        "invasion_map":{
            "title":"PDC invasion area",
            "description":"Two-dimensional inundation extent computed using the energy-conoid approach",
            "schema":{
                "type":"object",
                "properties":{
                    "geotiff":{
                        "description":"Reference to the GeoTIFF",
                        "allOf":[
                            {
                                "$ref":"link.yaml"
                            },
                            {
                                "type":"object",
                                "required":[
                                    "type"
                                ],
                                "properties":{
                                    "type":{
                                        "enum":[
                                            "image/tiff; application=geotiff",
                                            "application/tiff; application=geotiff"
                                        ]
                                    }
                                }
                            }
                        ]
                    },
                    "sld":{
                        "description":"Reference to the Styled Layer Descriptor (SLD) defining the visualization style for this GeoTIFF",
                        "allOf":[
                            {
                                "$ref":"link.yaml"
                            },
                            {
                                "type":"object",
                                "required":[
                                    "type"
                                ],
                                "properties":{
                                    "type":{
                                        "const":"application/vnd.ogc.sld+xml"
                                    }
                                }
                            }
                        ]
                    }
                }
            }
        },
        "spatial_evolution":{
            "title":"Mean PDC properties",
            "description":"Evolution of mean PDC properties as function of distance from the vent",
            "schema":{
                "$ref":"#/$defs/chart"
            }
        },
        "deposit_thickness":{
            "title":"PDC deposit",
            "description":"Deposit thickness decay with distance from the vent",
            "schema":{
                "$ref":"#/$defs/chart"
            }
        },
        "overlay_image":{
            "title":"PDC invasion area over input topography",
            "description":"Simulated inundation extent overlaid on the input topography used for the simulation",
            "schema":{
                "type":"string",
                "contentEncoding":"binary",
                "contentMediaType":"image/png"
            }
        }
    },
    "examples":[
        {
            "payload_example":{
                "inputs":{
                    "lon":14.428,
                    "lat":40.82,
                    "l0":150,
                    "h0":150,
                    "theta0":500,
                    "multiple_values":[
                        {
                            "eps0":0.01,
                            "rhos":1000,
                            "ds":0.0001
                        }
                    ],
                    "dt":0.5,
                    "margin":5000
                },
                "outputs":{
                    "input_data":{},
                    "dem":{},
                    "invasion_map":{},
                    "spatial_evolution":{},
                    "deposit_thickness":{}
                }
            }
        },
        {
            "curl_request_example":"curl -k -L -X POST \"https://voice.pi.ingv.it/geoinquire/processes/pybox/execution\" -H \"Content-Type: application/json\" -d '{\"inputs\":{\"lon\":14.428,\"lat\":40.820,\"l0\":150,\"h0\":150,\"theta0\":500,\"multiple_values\":[{\"eps0\":0.01,\"rhos\":1000,\"ds\":0.0001}],\"dt\":0.5,\"margin\":5000},\"outputs\":{\"dem\":{\"transmissionMode\": \"reference\"},\"spatial_evolution\":{\"transmissionMode\": \"value\"}}}'"
        },
        {
            "curl_request_with_qualified_example__href-only_not_supported_yet":"curl -k -L -X POST \"https://voice.pi.ingv.it/geoinquire/processes/pybox/execution\" -H \"Content-Type: application/json\" -d '{\"inputs\":{\"lon\":{\"value\":14.428},\"lat\":{\"value\":40.820},\"l0\":150,\"h0\":150,\"theta0\":500,\"multiple_values\":[{\"eps0\":0.01,\"rhos\":1000,\"ds\":0.0001}],\"dt\":0.5,\"margin\":5000},\"outputs\":{\"dem\":{\"transmissionMode\": \"reference\"},\"spatial_evolution\":{\"transmissionMode\": \"value\"}}}'"
        },
        {
            "curl_jobStatus_request":"curl -k -L \"https://voice.pi.ingv.it/geoinquire/jobs/&ltjobID&gt\""
        },
        {
            "curl_jobResults_request":"curl -k -L \"https://voice.pi.ingv.it/geoinquire/jobs/&ltjobID&gt/results\"?f=json"
        }
    ]
}