Weather API
  1. customer
Weather API
  • customer
    • Weather API - General Information
    • Weather API - Variables
    • Weather API - Timesteps
    • Weather API - /wthr/ endpoints usability improvements
    • Weather API - VariableAlias.json
    • Weather API - WeatherVariablesDefaults.json
    • Weather API - weatherMap - parameters
    • Weather API - weatherTiles - general, zoom
    • Weather API - weatherTiles - weather variables
    • Weather API - weatherTiles - timesteps
    • /
      GET
    • /wthr/list/ForecastModels
      GET
    • /wthr/list/WeatherVariables
      GET
    • /wthr/list/Timesteps
      GET
    • /wthr/list/TileTimesteps
      GET
    • /wthr/svar/NearestGridData
      GET
    • /wthr/svar/InterpolatedData
      GET
    • /wthr/svar/AreaForcast
      GET
    • /wthr/mvar/PointForcast
      POST
    • /wthr/calc/AstroData
      GET
    • /wthr/graphic/Meteogram
      GET
    • /wthr/graphic/WeatherMap
      GET
    • /wthr/graphic/Tile
      GET
  1. customer

/wthr/svar/NearestGridData

GET
weather.openportguide.org/api/wthr/svar/NearestGridData
Last modified:2025-07-03 19:52:19
Maintainer:tkws
OperationId:wthr_svar_NearestGridData

 

Description

The API endpoint "/wthr/svar/NearestGridData" returns the value of a variable for the nearest values of the forecast grid of specified position and time. In contrast to the /get_value end point, there is no interpolation. In the following example, this means that the value at the position (x,y) is searched for and the value for the position (x1,y2) is returned.

Wikipedia: Bilinear interpolation visualisation Wikipedia: Bilinear interpolation visualisation, https://en.wikipedia.org/wiki/Bilinear_interpolation

This function is useful for special cases, but in general you should prefer the endpoint /wthr/svar/InterpolatedData, which calculates the most probable value at the position (x,y) from the four surrounding values of the prediction grid.

 

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'weather.openportguide.org/api/wthr/svar/NearestGridData?model=gfs&variable=WDIR_10m&level=surface&apiKey={{api-key}}' \
--header 'Host: {{BASE_URL}}'
Response Response Example
200 - Success
{"metadata":{"serviceProvider":"weather.openportguide.org","originatingCenter":"US National Weather Service - NCEP (WMC)","generatingProcess":"Global Multi-Grid Wave Model (Static Grids)","model":"gfswave","requestedParameters":"model=gfs, variable=WDIR_10m, level=surface, latitude=None, longitude=None, timestep=None, units=None","shortName":"WDIR","fullName":"Wind Direction (from which blowing)","unit":"°","level":"surface","ny":721,"nx":1440,"latitudeFirstGridpoint":90.0,"latitudeLastGridpoint":-90.0,"longitudeFirstGridpoint":0.0,"longitudeLastGridpoint":359.75,"gridlengthXDirection":0.25,"gridlengthYDirection":-0.25,"refDate":"2025-07-03T12:00:00Z","forecastTime":[0,"2025-07-03T12:00:00Z"],"forecastPosition":[{"latitude":0.0},{"longitude":0.0}],"usedTokens":1},"data":{"value":191.0}}

Request

Query Params

Header Params

Responses

🟢200OK
application/json
Body

🟠401Unauthorized
Modified at 2025-07-03 19:52:19
Previous
/wthr/list/TileTimesteps
Next
/wthr/svar/InterpolatedData
Built with