{
    "title": "Sea Ice Macrofauna Schema",
    "description": "Schema for macrofauna comprising invertebrateds (>2 mm) that live associated with or in sea ice",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://api.npolar.no/_schema/marine/biology/seaice/1.0",
    "type": "object",
    "properties": {
        "title": {
            "type": "string"
        },
        "publication": {
            "type": "object",
            "properties": {
                "authors": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "journal": {
                    "type": "string"
                },
                "year": {
                    "type": "integer"
                },
                "volume": {
                    "type": "string"
                },
                "issue": {
                    "type": "string"
                },
                "pages": {
                    "type": "string"
                }
            }
        },
        "date": {
            "from": {
                "type": "string",
                "format": "date",
                "description": "ISO 8601 start date"
            },
            "to": {
                "type": "string",
                "format": "date",
                "description": "ISO 8601 end date"
            },
            "jdn": {
                "type": "integer",
                "description": "Julian Day Number"
            }
        },
        "dataset": {
            "type": "string"
        },
        "coordinates": {
            "latitude": {
                "type": "number",
                "description": "WGS-84 latitude in decimals"
            },
            "longitude": {
                "type": "number",
                "description": "WGS-84 longitude in decimals"
            }
        },
        "ice": {
            "type": "object",
            "properties": {
                "type": {
                    "type": "string",
                    "enum": [
                        "FYI",
                        "MYI",
                        "FYI/MYI"
                    ],
                    "description": "Ice type as First Year Ice, Multi Year Ice or a combination of both"
                },
                "area": {
                    "type": "number",
                    "description": "Ice area in square metres"
                },
                "thickness": {
                    "type": "number",
                    "description": "Ice thickness in metres"
                },
                "structure": {
                    "type": "string"
                },
                "cover": {
                    "type": "number",
                    "description": "Ice cover percentage"
                },
                "concentration": {
                    "type": "number",
                    "description": "Ice concentration in area (FYI/MYI)"
                },
                "snow_depth": {
                    "type": "number",
                    "description": "Maximum snow depth in metres"
                }
            },
            "description": "Ice properties if applicable"
        },
        "station": {
            "type": "string",
            "description": "Station name"
        },
        "water": {
            "type": "object",
            "properties": {
                "salinity": {
                    "type": "number",
                    "description": "Practical Salinity Unity"
                },
                "temperature": {
                    "type": "number",
                    "description": "Water temperature in Celcius"
                },
                "depth": {
                    "type": "number",
                    "description": "Water depth in metres"
                }
            },
            "description": "Water properties"
        },
        "sample": {
            "type": "object",
            "properties": {
                "depth": {
                    "type": "object",
                    "properties": {
                        "from": {
                            "type": "number",
                            "description": "Minimum sample depth in metres"
                        },
                        "to": {
                            "type": "number",
                            "description": "Maximum sample depth in metres"
                        }
                    },
                    "description": "Sample depth parameters"
                },
                "method": {
                    "type": "string",
                    "description": "Description of sampling method"
                },
                "ecosystem": {
                    "type": "string",
                    "enum": [
                        "ice",
                        "pelagic"
                    ]
                },
                "species": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "type": "string",
                                "description": "Specimen type"
                            },
                            "count": {
                                "type": "number",
                                "description": "Number of specimen individes in sample"
                            },
                            "data": {
                                "type": "object",
                                "properties": {
                                    "abundance": {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "type": "number",
                                                "description": "Number of individes"
                                            },
                                            "unit": {
                                                "type": "string",
                                                "enum": [
                                                    "m^2",
                                                    "m^3"
                                                ],
                                                "description": "Unit of abundance as per square metre or per cubic metre"
                                            }
                                        }
                                    },
                                    "biomass": {
                                        "type": "object",
                                        "properties": {
                                            "value": {
                                                "type": "number"
                                            },
                                            "unit": {
                                                "type": "string",
                                                "enum": [
                                                    "g/m^2 WW",
                                                    "mg/m^2 DW"
                                                ],
                                                "description": "Unit of biogass as wet-weight grams or dry-weight milligrams per square metre"
                                            }
                                        }
                                    },
                                    "weight": {
                                        "type": "number",
                                        "description": "Observed weight"
                                    }
                                },
                                "description": "Specimen properties"
                            }
                        }
                    },
                    "description": "List of sample species"
                },
                "chlorophyll": {
                    "type": "object",
                    "properties": {
                        "present": {
                            "type": "boolean",
                            "description": "Whether chlorophyll was present in the sample data"
                        },
                        "amount": {
                            "type": "number",
                            "description": "Chlorophyll amount in milligrams per cubic metre"
                        }
                    }
                }
            },
            "description": "Sample data"
        },
        "comments": {
            "type": "string",
            "description": "Additional comments"
        },
        "obis_id": {
            "type": "integer"
        }
    }
}