{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "persistenceprocedure.json",
    "title": "PersistenceProcedure",
    "type": "object",
    "description": "Procedure that calculates de percentile of the last observation for that month of the historical record and builds a forecast in which the percentile is mantained",
    "allOf": [
        {
            "$ref": "procedure.json"
        }
    ],
    "properties": {
        "type": {
            "type": "string",
            "enum": [
                "Persistence",
                "PersistenceProcedure"
            ]
        },
        "parameters": {
            "type": "object",
            "properties": {
                "search_length": {
                    "description": "longitud de la serie para comparar",
                    "type": "integer",
                    "default": 6
                },
                "forecast_length": {
                    "description": "longitud del pronostico",
                    "type": "integer",
                    "default": 4
                },
                "time_window": {
                    "description": "Ventana temporal",
                    "type": "string",
                    "enum": ["year", "month", "day", "yrDay", "wkDay"],
                    "default": "month"
                }
            },
            "required": []
        },
        "extra_pars": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "properties": {
                "add_error_band": {
                    "type": "boolean"
                },
                "skip_first_years": {
                    "type": "number",
                    "default": 10
                },
                "only_last_years": {
                    "type": "number",
                    "description": "not used"
                },
                "vent_resamp_range": {
                    "type": "array",
                    "description": "Perform hindcast for forecast dates inside this range (i.e. (3,5) for march to may) - not used",
                    "prefixItems": [
                        {
                            "type": "number"
                        },
                        {
                            "type": "number"
                        }
                    ],
                    "minItems": 2,
                    "maxItems": 2
                },
                "error_forecast_date_window": {
                    "type": "number",
                    "description": "Perform hindcast for forecast dates within this window (current forecast date plus/minus this value; i.e. if current is april, set to 1 to use march to may)"
                }
            }
        }
   },
    "required": [
        "type",
        "parameters"
    ]
}