{
    "version":"0.1.0",
    "id":"netcdf-extract-fb-data",
    "use_case":"NIVA Ferrybox Scripts",
    "title":"Extract FerryBox data from NetCDF (THREDDS) to CSV",
    "description":"Extract FerryBox environmental monitoring data from a THREDDS-hosted NetCDF file. Supports optional filtering by date interval and bounding box. Outputs a CSV containing datetime, latitude, longitude, value, unit, parameter, and derived time fields.",
    "jobControlOptions":[
        "sync-execute",
        "async-execute"
    ],
    "keywords":[
        "AquaINFRA",
        "NIVA use case",
        "Ferrybox",
        "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-extract-fb-data?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-extract-fb-data?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-extract-fb-data/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/nrt/color_fantasy.nc).",
            "schema":{
                "type":"string"
            },
            "minOccurs":1,
            "maxOccurs":1
        },
        "parameters":{
            "title":"Parameters",
            "description":"Comma-separated list of parameters to extract (e.g. temperature,salinity,chlorophyll,turbidity). Use NULL (or omit) to extract all available parameters.",
            "schema":{
                "type":"array",
                "items":{
                    "type":"string"
                }
            },
            "minOccurs":0,
            "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
        },
        "study_area_bbox":{
            "title":"Boundary box",
            "description":"Optional bounding box filter. Order: [lat_min, lon_min, lat_max, lon_max]. Example: {\"bbox\": [58.5, 9.5, 59.9, 11.9]}. Omit to use the full dataset extent.",
            "schema":{
                "type":"object"
            },
            "minOccurs":0,
            "maxOccurs":1
        }
    },
    "outputs":{
        "csv_results":{
            "title":"CSV output",
            "description":"Path to the CSV file written by the process.",
            "schema":{
                "type":"object",
                "contentMediaType":"application/json"
            }
        }
    },
    "example":{
        "inputs":{
            "url_thredds":"https://thredds.niva.no/thredds/dodsC/datasets/nrt/color_fantasy.nc",
            "parameters":[
                "temperature",
                "salinity",
                "oxygen_sat",
                "chlorophyll",
                "turbidity",
                "fdom"
            ],
            "start_date":"2023-01-01",
            "end_date":"2023-12-31",
            "study_area_bbox":{
                "bbox":[
                    58.5,
                    9.5,
                    59.9,
                    11.9
                ]
            }
        }
    },
    "outputTransmission":[
        "value"
    ]
}