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

조회 수: 3 (최근 30일)
Jake
Jake 2025년 2월 10일
댓글: Star Strider 2025년 2월 11일
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?

채택된 답변

Star Strider
Star Strider 2025년 2월 10일
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
Jake
Jake 2025년 2월 11일
Thank you, this seems to work with the samples I ran so far :)
Star Strider
Star Strider 2025년 2월 11일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by