{
    "$id": "procedure.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "id": {
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "initial_states": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "function": {
        "anyOf": [
          {
            "$ref": "abstractprocedure.json"
          },
          {
            "$ref": "hecrasprocedure.json"
          },
          {
            "$ref": "polynomialtransformationprocedure.json"
          },
          {
            "$ref": "linearcombinationprocedure.json"
          },
          {
            "$ref": "expressionprocedure.json"
          },
          {
            "$ref": "sacramentosimplifiedprocedure.json"
          },
          {
            "$ref": "sacramentosimplifiedfixedparsprocedure.json"
          },
          {
            "$ref": "pqprocedure.json"
          },
          {
            "$ref": "sacenkfprocedure.json"
          },
          {
            "$ref": "junctionprocedure.json"
          },
          {
            "$ref": "linearchannelprocedure.json"
          },
          {
            "$ref": "uhlinearchannelprocedure.json"
          },
          {
            "$ref": "muskingumchannelprocedure.json"
          },
          {
            "$ref": "hosh4p1lprocedure.json"
          },
          {
            "$ref": "linearnetprocedure.json"
          },
          {
            "$ref": "linearnet3procedure.json"
          },
          {
            "$ref": "exponentialfitprocedure.json"
          },
          {
            "$ref": "linearfitprocedure.json"
          },
          {
            "$ref": "lagandrouteprocedure.json"
          },
          {
            "$ref": "lagandroutenetprocedure.json"
          },
          {
            "$ref": "hidrosatprocedure.json"
          },
          {
            "$ref": "analogyprocedure.json"
          },
          {
            "$ref": "persistenceprocedure.json"
          }
        ]
      },
      "parameters": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "time_interval": {
        "$ref": "timeinterval.json"
      },
      "time_offset": {
        "$ref": "timeinterval.json"
      },
      "save_results": {
        "type": "string",
        "description": "File path where to save the results of the procedure"
      },
      "save_dict": {
        "type": "string",
        "description": "File path where to save the results of the procedure as dict"
      },
      "overwrite": {
        "type": "boolean",
        "description": "Choice to overwrite observations at the node-variable with the procedure output"
      },
      "overwrite_original": {
        "type": "boolean",
        "description": "Choice to overwrite original observations at the node-variable with the procedure output"
      },
      "calibration": {
        "oneOf": [
          {
            "$ref": "downhill_simplex_calibration.json"
          },          
          {
            "$ref": "linear_regression_calibration.json"
          }
        ],
        "description": "Calibration parameters"
      },
      "adjust": {
        "type": "boolean",
        "description": "Adjust output series using observations. Adjustment is performed after statistics computation",
        "default": false
      },
      "adjust_method": {
        "type": "string",
        "description": "Adjust method. Default: lfit",
        "enum": [
          "lfit",
          "arima"
        ],
        "default": false
      },
      "warmup_steps": {
        "type": "integer",
        "description": "For output adjustment, discard this number of initial rows"        
      },
      "tail_steps": {
        "type": "integer",
        "description": "For output adjustment, use only this number of final rows"
      },
      "error_band": {
        "type": "boolean",
        "description": "If ajusting output, add error band series",
        "default": true
      },
      "read_sim": {
        "type": "boolean",
        "description": "Instead of reading .data of input node variables, read .series_sim[0].data . Defaults to self.read_sim",
        "default": false
      },
      "sim_index": {
        "type": "number",
        "description": "read this series_sim index of boundary node variables (with read_sim) ",
        "default": 0
      }
    },
    "required": [
      "id",
      "function"
    ]
}