interpn and 4D atmospheric data

5 ビュー (過去 30 日間)
Seb Biass
Seb Biass 2015 年 12 月 2 日
コメント済み: Marcus Buker 2020 年 6 月 8 日
Hello all,
I've been thinking about that for a while, and it seems that there are a bit too many dimensions for my brain to figure out. I am working with atmospheric data downloaded from the ECMWF ERA-Interim website, which provides data at 37 pressure levels gridded to a max resolution of 0.25 degrees up to every 3 h. I would like to test the effect of interpolating variables of interest through space and time. So, I have my 4D space depending on lat, lon, altitude and time, and each of the variables (e.g. u and v components of wind, etc...) are 4D matrices of sizes (length(lon), length(lat), length(altitude), length(time)).
Where it gets tricky is that although lat, lon and time are given as regularly-spaced vectors, altitude (in m asl) is converted from geopotential heights (mbar), and is itself given as a 4D matrix varying with lon, lat and time.
So, how would you proceed to calculate the value of a given variable (let's call it UWIND) at given sets of lonq, latq, altq, timeq? If altitude had been a vector, I guess I could have done something like:
[LON, LAT, ALT, TIME] = ndgrid(lon, lat, altitude, time)
UWINDq = interpn(LON,LAT,ALT,TIME,UWIND,lonq,latq,altq,timeq)
Any suggestion of how I could achieve something like that?
Thanks a lot for your help!
S
  1 件のコメント
Marcus Buker
Marcus Buker 2020 年 6 月 8 日
I would do it in two steps...interpolate pressure to height, then interpolate the 3D data in time...

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation of 2-D Selections in 3-D Grids についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by