How can I extract specific weather data from a 3D grid?

1 Ansicht (letzte 30 Tage)
Jake
Jake am 10 Feb. 2025
Kommentiert: Star Strider am 11 Feb. 2025
I have two sets of data - one is measured data, and the other is obtained from The THREDDS Data Server (files are too big to attach, so I'll try to explain as much as I can).
The measured data include time (measured time in datatime format), latitude coordinates and longitude coordinates, and the parameter I'm interested in. All are column vectors. From THREDDS data, I have time (in datetime format), latitude coordinates and longitude coordinates, and the parameter as follows.
Name Size Bytes Class Attributes
dates 24x1 192 datetime
ff 2379x1995x24 455626080 single
lat 2379x1995 18984420 single
lon 2379x1995 18984420 single
What I want to do is extract the data from this THREADDS data for the given (or measured) time, lat, lot points. How can I do this?

Akzeptierte Antwort

Star Strider
Star Strider am 10 Feb. 2025
Without even representative data, I’m not certain even how to simulate this.
I would use the scatteredInterpolant function first with the THREADDS data (time, latitude, longitude and parameter) and then use the time, latitude, and longitude from the ‘measured’ data to interpolate the desired paramter at the ‘measured’ times and locations. (If I got this backwards, change my approach approproately.)
I don’t remember using scatteredInterpolant with datetime arrays, and the scatteredInterpolant documentation states that all the data have to be double, so first convert those to datenum or other numerical date representations that scattteredInterpolant can work with. You can change them back later.
.
  6 Kommentare
Jake
Jake am 11 Feb. 2025
Thank you, this seems to work with the samples I ran so far :)
Star Strider
Star Strider am 11 Feb. 2025
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by