# MATLAB Interface for NOAA Data

9 visualizaciones (últimos 30 días)
Behrooz Daneshian el 27 de Dic. de 2022
Editada: Karim el 28 de Dic. de 2022
Hi everyone, I want to use MATLAB Interface for NOAA Data to access daily weather data acrros the states. The attached folder contains the codes for this toolbox. The code below using station function returns stations with given feature ( stations having FIPS=37). However, it only returns 25 station. what I want is to get all the stations with FIPS=37. Can anyone help me with this regard? I checked in the noaa website that for location of FIPS=37,(North Calorina) 2484 stations exist.
n = noaa("NpMoDLCgEVBMZTdPFQHQUOwllVQNHYjz");
% returns stations having the same locationid=FIPS:37
d = stations(n,[],"locationid","FIPS:37")
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Karim el 28 de Dic. de 2022
Editada: Karim el 28 de Dic. de 2022
Using inspiration from this answer: How to get daily temperatures of past 30 years for a given location from NOAA online database - MATLAB Answers. I was able to deduce the following demonstration. At first glance you need to use the limit parameter, however there seems to be a limit to the limit of 1000. So you also need to use the offset parameter. See below for a demonstration.
myToken = "NpMoDLCgEVBMZTdPFQHQUOwllVQNHYjz";
myURL = "https://www.ncei.noaa.gov/cdo-web/api/v2/stations?locationid=FIPS:37" + "&limit=1000" + "&offset=0";
opt = weboptions('KeyName','token','KeyValue',myToken);
data.results
ans = 1000×1 cell array
{1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct}
% now use offset 1000 (or whaterver value u used as previous limit) to get
% the next batch
myURL = "https://www.ncei.noaa.gov/cdo-web/api/v2/stations?locationid=FIPS:37" + "&limit=1000" + "&offset=1000";
opt = weboptions('KeyName','token','KeyValue',myToken);
data.results
ans = 1000×1 cell array
{1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct} {1×1 struct}
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Climate Science and Analysis en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by