Hi all, I'm trying to create a dynamic marine forecast display, but I'm encountering some difficulties with Open Meteo's Marine Forecast API. The issues seem to stem from the automatic model selection.
For example, let's build a request around a know working source, Rotterdam.
- Initially I won't specify the model:
https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&timezone=auto&forecast_days=1
- This generates a
200 with an hourly response filled with null values
- Let's now specify the model as
&models=best_match: https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&timezone=auto&forecast_days=1&models=best_match
- This also generates a
200 with an hourly response filled with null values
- Lastly, let's specify the model as
&models=ncep_gfswave025: https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&models=ncep_gfswave025&timezone=auto&forecast_days=1
- Now we get a
200 and data!
It seems like there is some inconsistency with how the models are being scanned. Generally if data isn't available, I expect to see an error response.
For example:
Can you please provide any insight? Thanks!
Hi all, I'm trying to create a dynamic marine forecast display, but I'm encountering some difficulties with Open Meteo's Marine Forecast API. The issues seem to stem from the automatic model selection.
For example, let's build a request around a know working source, Rotterdam.
https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&timezone=auto&forecast_days=1200with an hourly response filled withnullvalues&models=best_match:https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&timezone=auto&forecast_days=1&models=best_match200with an hourly response filled withnullvalues&models=ncep_gfswave025:https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&models=ncep_gfswave025&timezone=auto&forecast_days=1200and data!It seems like there is some inconsistency with how the models are being scanned. Generally if data isn't available, I expect to see an error response.
For example:
https://marine-api.open-meteo.com/v1/marine?latitude=51.9225&longitude=4.4792&hourly=swell_wave_height,swell_wave_direction,swell_wave_period&models=ewam&timezone=auto&forecast_days=1400(seems like this should actually be a5xxcode) with an appropriate message:{ "error": true, "reason": "No data is available for this location" }Can you please provide any insight? Thanks!