{
    "version":"0.1.0",
    "id":"netcdf-logger-extract",
    "use_case":"NIVA Ferrybox Scripts",
    "title":"Extract river logger data from Baterod from NetCDF (THREDDS) to CSV",
    "description":"Extract river logger environmental monitoring data from a THREDDS-hosted NetCDF file. Supports optional filtering by date. Outputs a CSV containing datetime, value, unit, parameter, and derived time fields.",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "keywords":[
        "AquaINFRA",
        "NIVA use case",
        "Logger",
        "River",
        "Baterod",
        "NetCDF",
        "THREDDS",
        "Oslofjorden"
    ],
    "links":[
        {
            "type":"text/html",
            "rel":"about",
            "title":"GitHub repo of NIVA AquaINFRA tools",
            "href":"https://github.com/NIVANorge/niva-aquainfra",
            "hreflang":"en-US"
        },
        {
            "type":"application/json",
            "rel":"self",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/netcdf-logger-extract?f=json",
            "title":"Process description as JSON",
            "hreflang":"en-US"
        },
        {
            "type":"text/html",
            "rel":"alternate",
            "href":"https://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/netcdf-logger-extract?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://aquainfra.ogc.igb-berlin.de/pygeoapi/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://aquainfra.ogc.igb-berlin.de/pygeoapi/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://aquainfra.ogc.igb-berlin.de/pygeoapi/processes/netcdf-logger-extract/execution?f=json",
            "title":"Execution for this process as JSON",
            "hreflang":"en-US"
        }
    ],
    "inputs":{
        "url_thredds":{
            "title":"Source",
            "description":"THREDDS url to the NetCDF dataset (e.g. https://thredds.niva.no/thredds/dodsC/datasets/loggers/glomma/baterod.nc).",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "start_date":{
            "title":"Start date",
            "description":"Start date (YYYY-MM-DD). If provided, end date must also be provided. Use NULL to omit.",
            "schema":{
                "type":"string",
                "pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            },
            "minOccurs":0,
            "maxOccurs":1
        },
        "end_date":{
            "title":"End date",
            "description":"End date (YYYY-MM-DD). If provided, start date must also be provided. Use NULL to omit.",
            "schema":{
                "type":"string",
                "pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            },
            "minOccurs":0,
            "maxOccurs":1
        },
        "parameters":{
            "title":"Parameters",
            "description":"List of parameters. Use null (or omit) to extract all available parameters.",
            "schema":{
                "type":"array",
                "items":{
                    "type":"string"
                }
            },
            "minOccurs":0,
            "maxOccurs":1
        }
    },
    "outputs":{
        "output_csv":{
            "title":"CSV output",
            "description":"Path to CSV file written by the process.",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        }
    },
    "example":{
        "inputs":{
            "url_thredds":"https://thredds.niva.no/thredds/dodsC/datasets/loggers/glomma/baterod.nc",
            "parameters":[
                "temp_water_avg",
                "phvalue_avg",
                "condvalue_avg",
                "turbidity_avg",
                "cdomdigitalfinal"
            ],
            "start_date":"2023-01-01",
            "end_date":"2023-12-31"
        }
    },
    "outputTransmission":[
        "value"
    ]
}