{
    "schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "muskingumchannelprocedure.json",
    "title": "MuskingumChannelProcedure",
    "type": "object",
    "description": "Método de tránsito hidrológico de la Oficina del río Muskingum. Dos parámetros: Tiempo de Tránsito (K) y Factor de forma (X) [Proc='Muskingum'] o . Condiciones Iniciales (initial_states): matriz de condiciones iniciales o valor escalar constante. Condiciones de borde: Hidrograma en nodo superior de tramo.",
    "allOf": [
        {
            "$ref": "procedure.json"
        }
    ],
    "properties": {
        "type": {
            "type": "string",
            "enum": [
                "MuskingumChannel",
                "MuskingumChannelProcedure"
            ]
        },
        "parameters": {
            "type": "object",
            "description": "Parámetros: Tiempo de Tránsito (K) y Factor de forma (X)",
            "properties": {
                "K": {
                    "type": "number",
                    "description": "Tiempo de tránsito"
                },
                "X": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 0.5,
                    "description": "Factor de forma. 0 <= X <= 0.5"
                }        
            },
            "required": ["K","X"],
            "additionalProperties": false
        },
        "extra_pars": {
            "type": "object",
            "properties": {
                "Proc": {
                    "type": "string",
                    "description": "variante del método",
                    "enum": [
                        "Muskingum"
                    ]
                }
            }
        },
        "initial_states": {
            "anyOf": [
                {
                    "type": "array"
                },
                {
                    "type": "number"
                }
            ]
        },
        "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": [
        "parameters"
    ]
}