{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "linearchannelprocedure.json",
    "title": "LinearChannelProcedure",
    "type": "object",
    "description": "Nash linear channel procedure",
    "allOf": [
        {
            "$ref": "procedure.json"
        }
    ],
    "properties": {
        "type": {
            "type": "string",
            "enum": [
                "LinearChannel",
                "LinearChannelProcedure"
            ]
        },
        "parameters": {
            "type": "object",
            "desciption": "Model parameters",
            "properties": {
                "k": {
                    "type": "number",
                    "description": "residence time"
                },
                "n": {
                    "type": "number",
                    "description": "number of reservoirs"
                }
            },
            "required": ["k","n"]
        },
        "extra_pars": {
            "type": "object",
            "properties": {
                "dt": {
                    "type": "number",
                    "description": "calculation timestep (1 = the timestep of the input series). Default: 1"
                }
            }
        },
        "boundaries": {
            "oneOf": [
                {
                    "type": "array",
                    "items": {
                        "allOf": [
                            { "$ref": "procedureboundary.json"},
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "enum": ["input"]
                                    }
                                }
                            }
                        ]
                    },
                    "minItems": 1,
                    "maxItems": 1
                },
                {
                    "type": "array",
                    "description": "list of lists of observations",
                    "items": {
                        "$ref": "observationlist.json"
                    },
                    "minItems": 1,
                    "maxItems": 1
                },
                {
                    "type": "string",
                    "description": "Path to CSV file. First column must be the datetime index. Headers (first row) must indicate input names"
                }
            ]
        },
        "outputs": {
            "oneOf": [
                {
                    "type": "array",
                    "items": {
                        "allOf": [
                            { "$ref": "procedureboundary.json"},
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "enum": ["output"]
                                    }
                                }
                            }
                        ]
                    },
                    "minItems": 1,
                    "maxItems": 1
                },
                {
                    "type": "array",
                    "description": "list of lists of observations",
                    "items": {
                        "$ref": "observationlist.json"
                    },
                    "minItems": 1,
                    "maxItems": 1
                },
                {
                    "type": "string",
                    "description": "Path to CSV file. First column must be the datetime index. Headers (first row) must indicate output names"
                }
            ]
        }
    },
    "required": [
        "type",
        "parameters"
    ]
}