Hindcast Data

Working examples of interacting with the Hindcast Data marine weather endpoint.

Retrieve hindcast data for a variable

Example request

curl "https://api.sofarocean.com/marine-weather/v1/models/"\
"Ocean/hindcast/point"\
"?variableIDs=seaSurfaceTemperature"\
"&latitude=37&longitude=-152"\
"&start=2024-03-12T06:00:00Z&end=2024-03-13T00:00:00Z"\
"&token=YOUR_API_TOKEN_HERE"
Response
{
    "modelID": "Ocean",
    "requestTime": "2024-04-17T20:59:16.722Z",
    "requestStart": "2024-03-12T06:00:00.000Z",
    "requestEnd": "2024-03-13T00:00:00.000Z",
    "requestLocation": {
        "latitude": 37,
        "longitude": -152
    },
    "hindcastVariables": [
        {
            "variableID": "Ocean-seaSurfaceTemperature",
            "variableName": "seaSurfaceTemperature",
            "physicalUnit": "Celsius degree",
            "values": [
                {
                    "timestamp": "2024-03-12T06:00:00.000Z",
                    "value": 13.93067965354853
                },
                {
                    "timestamp": "2024-03-12T09:00:00.000Z",
                    "value": 13.912621501775105
                },
                {
                    "timestamp": "2024-03-12T12:00:00.000Z",
                    "value": 13.835122254361426
                },
                {
                    "timestamp": "2024-03-12T15:00:00.000Z",
                    "value": 13.83692308868819
                },
                {
                    "timestamp": "2024-03-12T18:00:00.000Z",
                    "value": 13.857857787736798
                },
                {
                    "timestamp": "2024-03-12T21:00:00.000Z",
                    "value": 13.921562302046002
                }
            ]
        }
    ]
}

Retrieve hindcast data for multiple variables

Example request

curl "https://api.sofarocean.com/marine-weather/v1/models/"\
"Ocean/hindcast/point"\
"?variableIDs=seaSurfaceTemperature,surfaceCurrentVelocityEastward"\
"&latitude=37&longitude=-152"\
"&start=2024-03-12T06:00:00Z&end=2024-03-13T00:00:00Z"\
"&token=YOUR_API_TOKEN_HERE"
Response
{
    "modelID": "Ocean",
    "requestTime": "2024-04-17T21:00:06.999Z",
    "requestStart": "2024-03-12T06:00:00.000Z",
    "requestEnd": "2024-03-13T00:00:00.000Z",
    "requestLocation": {
        "latitude": 37,
        "longitude": -152
    },
    "hindcastVariables": [
        {
            "variableID": "Ocean-seaSurfaceTemperature",
            "variableName": "seaSurfaceTemperature",
            "physicalUnit": "Celsius degree",
            "values": [
                {
                    "timestamp": "2024-03-12T06:00:00.000Z",
                    "value": 13.93067965354853
                },
                {
                    "timestamp": "2024-03-12T09:00:00.000Z",
                    "value": 13.912621501775105
                },
                {
                    "timestamp": "2024-03-12T12:00:00.000Z",
                    "value": 13.835122254361426
                },
                {
                    "timestamp": "2024-03-12T15:00:00.000Z",
                    "value": 13.83692308868819
                },
                {
                    "timestamp": "2024-03-12T18:00:00.000Z",
                    "value": 13.857857787736798
                },
                {
                    "timestamp": "2024-03-12T21:00:00.000Z",
                    "value": 13.921562302046002
                }
            ]
        },
        {
            "variableID": "Ocean-surfaceCurrentVelocityEastward",
            "variableName": "surfaceCurrentVelocityEastward",
            "physicalUnit": "m/s",
            "values": [
                {
                    "timestamp": "2024-03-12T06:00:00.000Z",
                    "value": 0.060956705055664084
                },
                {
                    "timestamp": "2024-03-12T09:00:00.000Z",
                    "value": -0.02202329806755865
                },
                {
                    "timestamp": "2024-03-12T12:00:00.000Z",
                    "value": -0.02803394652906044
                },
                {
                    "timestamp": "2024-03-12T15:00:00.000Z",
                    "value": 0.010032954267518712
                },
                {
                    "timestamp": "2024-03-12T18:00:00.000Z",
                    "value": 0.11400306757985068
                },
                {
                    "timestamp": "2024-03-12T21:00:00.000Z",
                    "value": 0.23598182056953332
                }
            ]
        }
    ]
}

Retrieve hindcast data for a single point in time

Example request

curl "https://api.sofarocean.com/marine-weather/v1/models/"\
"Wave/hindcast/point"\
"&variableIDs=significantWaveHeight"\
"&longitude=-152&latitude=37"\
"&timestamp=2024-04-15T12:00:00.000Z"\
"&token=YOUR_API_TOKEN_HERE"
Response
{
    "modelID": "Wave",
    "requestTime": "2024-04-17T21:01:10.045Z",
    "requestTimestamp": "2024-04-15T12:00:00.000Z",
    "requestLocation": {
        "latitude": 37,
        "longitude": -152
    },
    "hindcastVariables": [
        {
            "variableID": "Wave-significantWaveHeight",
            "variableName": "significantWaveHeight",
            "physicalUnit": "m",
            "values": [
                {
                    "timestamp": "2024-04-15T12:00:00.000Z",
                    "value": 3.924692551803082
                }
            ]
        }
    ]
}

Last updated