{
    "version":"0.1.0",
    "id":"pywcmp-wis2-wcmp2-kpi",
    "title":"WCMP2 KPI evaluator",
    "description":"Validate a WCMP2 document against the KPI suite",
    "keywords":[
        "wis2",
        "wcmp2",
        "kpi",
        "test suite",
        "metadata"
    ],
    "links":[
        {
            "type":"text/html",
            "rel":"about",
            "title":"information",
            "href":"https://wmo-im.github.io/wcmp2",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"self",
            "href":"https://wis2-gdc.weather.gc.ca/processes/pywcmp-wis2-wcmp2-kpi?f=json",
            "title":"Process description as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"https://wis2-gdc.weather.gc.ca/processes/pywcmp-wis2-wcmp2-kpi?f=html",
            "title":"Process description as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://wis2-gdc.weather.gc.ca/jobs?f=html",
            "title":"Jobs list as HTML",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/job-list",
            "href":"https://wis2-gdc.weather.gc.ca/jobs?f=json",
            "title":"Jobs list as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"http://www.opengis.net/def/rel/ogc/1.0/execute",
            "href":"https://wis2-gdc.weather.gc.ca/processes/pywcmp-wis2-wcmp2-kpi/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"en-US"
        }
    ],
    "inputs":{
        "record":{
            "title":"WCMP2 record",
            "description":"WCMP2 record (can be inline or remote link)",
            "schema":{
                "type":[
                    "object",
                    "string"
                ]
            },
            "minOccurs":1,
            "maxOccurs":1,
            "metadata":null,
            "keywords":[
                "wcmp2"
            ]
        }
    },
    "outputs":{
        "result":{
            "title":"Report of KPI results",
            "description":"Report of KPI results",
            "schema":{
                "contentMediaType":"application/json",
                "type":"object",
                "title":"WCMP2 Key Performance Indicator report",
                "description":"WCMP2 Key Performance Indicator report",
                "properties":{
                    "id":{
                        "type":"string",
                        "format":"uuid"
                    },
                    "report_type":{
                        "type":"string",
                        "enum":[
                            "ets"
                        ]
                    },
                    "summary":{
                        "type":"object",
                        "properties":{
                            "grade":{
                                "type":"string",
                                "enum":[
                                    "A",
                                    "B",
                                    "C",
                                    "D",
                                    "E",
                                    "F"
                                ]
                            }
                        },
                        "required":[
                            "grade"
                        ]
                    },
                    "tests":{
                        "type":"array",
                        "minItems":1,
                        "items":{
                            "allOf":[
                                "#/definitions/summary",
                                {
                                    "properties":{
                                        "id":{
                                            "type":"string",
                                            "format":"uri"
                                        },
                                        "title":{
                                            "type":"string"
                                        }
                                    },
                                    "required":[
                                        "id",
                                        "title",
                                        "total",
                                        "score",
                                        "percentage"
                                    ]
                                }
                            ]
                        }
                    },
                    "generated_by":{
                        "type":"string"
                    },
                    "datetime":{
                        "type":"string",
                        "format":"date-time"
                    },
                    "metadata_id":{
                        "type":"string"
                    }
                },
                "required":[
                    "id",
                    "report_type",
                    "summary",
                    "generated_by",
                    "datetime",
                    "metadata_id",
                    "tests"
                ],
                "definitions":{
                    "summary":{
                        "type":"object",
                        "properties":{
                            "total":{
                                "type":"integer"
                            },
                            "score":{
                                "type":"number"
                            },
                            "comments":{
                                "type":"string"
                            },
                            "percentage":{
                                "type":"number"
                            }
                        },
                        "required":[
                            "total",
                            "score",
                            "percentage"
                        ]
                    }
                }
            }
        }
    },
    "example":{
        "inputs":{
            "record":{
                "id":"urn:wmo:md:ca-eccc-msc:nwp.msc_nwp_gdps",
                "conformsTo":[
                    "http://wis.wmo.int/spec/wcmp/2/conf/core"
                ],
                "type":"Feature",
                "geometry":{
                    "type":"Polygon",
                    "coordinates":[
                        [
                            [
                                -180,
                                -90
                            ],
                            [
                                -180,
                                90
                            ],
                            [
                                180,
                                90
                            ],
                            [
                                180,
                                -90
                            ],
                            [
                                -180,
                                -90
                            ]
                        ]
                    ]
                },
                "time":{
                    "interval":[
                        "1963-10-01",
                        ".."
                    ]
                },
                "properties":{
                    "title":"Global Deterministic Prediction System",
                    "description":"The Global Deterministic Prediction System (GDPS) carries out physics calculations to arrive at deterministic predictions of atmospheric elements from the current day out to 10 days into the future. Atmospheric elements include temperature, precipitation, cloud cover, wind speed and direction, humidity and others. This product contains raw numerical results of these calculations. Geographical coverage is global. Data is available at horizontal resolution of about 15 km up to 33 vertical levels. Predictions are performed twice a day.",
                    "themes":[
                        {
                            "concepts":[
                                "Prediction",
                                "Global",
                                "Deterministic",
                                "Weather forecasts",
                                "Air temperature",
                                "Meteorological data"
                            ],
                            "scheme":"https://canada.multites.net/cst"
                        },
                        {
                            "concepts":[
                                {
                                    "id":"weather",
                                    "title":"Weather",
                                    "url":"https://codes.wmo.int/wis/topic-hierarchy/earth-system-discipline/weather"
                                }
                            ],
                            "scheme":"https://codes.wmo.int/wis/topic-hierarchy/earth-system-discipline"
                        }
                    ],
                    "contacts":[
                        {
                            "name":"National Inquiry Response Team",
                            "organization":"Government of Canada; Environment and Climate Change Canada; Meteorological Service of Canada",
                            "phones":[
                                {
                                    "value":"+18199972800"
                                }
                            ],
                            "emails":[
                                {
                                    "value":"enviroinfo@ec.gc.ca"
                                }
                            ],
                            "addresses":[
                                {
                                    "deliveryPoint":[
                                        "77 Westmorland Street, suite 260"
                                    ],
                                    "city":"Fredericton",
                                    "administrativeArea":"NB",
                                    "postalCode":"E3B 6Z4",
                                    "country":"CAN"
                                }
                            ],
                            "contactInstructions":"email",
                            "links":[
                                {
                                    "rel":"canonical",
                                    "type":"text/html",
                                    "href":"https://www.canada.ca/en/environment-climate-change.html"
                                }
                            ],
                            "roles":[
                                "host",
                                "producer"
                            ]
                        }
                    ],
                    "wmo:dataPolicy":"core",
                    "language":{
                        "code":"en"
                    },
                    "type":"dataset",
                    "created":"2018-01-01T11:11:23Z",
                    "updated":"2022-06-17T08:22:24Z"
                },
                "links":[
                    {
                        "rel":"license",
                        "href":"https://open.canada.ca/en/open-government-licence-canada",
                        "type":"text/html",
                        "title":"Open Government Licence - Canada"
                    },
                    {
                        "rel":"service",
                        "href":"https://geo.weather.gc.ca/geomet?lang=en&service=WMS&request=GetCapabilities&layers=GDPS.ETA_TT",
                        "type":"application/xml",
                        "title":"Air temperature [degrees]"
                    },
                    {
                        "rel":"items",
                        "channel":"origin/a/wis2/ca-eccc-msc/data/core/weather/prediction/forecast/medium-range/deterministic/global",
                        "href":"mqtts://everyone:everyone@globalbroker.meteo.fr:8883",
                        "type":"application/geo+json",
                        "title":"Data notifications"
                    }
                ],
                "linkTemplates":[
                    {
                        "rel":"data",
                        "type":"text/html",
                        "title":"MSC Datamart",
                        "uriTemplate":"https://dd.weather.gc.ca/{yyyymmdd}/WXO-DD/model_gem_global",
                        "variables":{
                            "yyyymmdd":{
                                "type":"string",
                                "description":"date in yyyymmdd format"
                            }
                        }
                    }
                ]
            }
        }
    },
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "outputTransmission":[
        "value"
    ]
}