フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

how to do average of nine variables over 00 and 12 GMT observations?

2 ビュー (過去 30 日間)
Sanchit
Sanchit 2023 年 7 月 19 日
閉鎖済み: Cris LaPierre 2023 年 7 月 19 日
% Load the grouping data
lat = ncread(ncfile,'latitude');
lon = ncread(ncfile,'longitude');
expver = ncread(ncfile,'expver');
time = ncread(ncfile,'time');
time = datetime(double(time)*60*60,'ConvertFrom','epochtime','Epoch','1900-01-01');
% convert grouping data to 4x4x2x6963 arrays
[Lon,Lat,Expver,Time] = ndgrid(lon,lat,expver,time);
dataTbl = timetable(Time,Lon,Lat,Expver,d2m,t2m,e,pev,ssr,ssrd,tp,vpd,rh)
% Calculate the mean over latitude x longitude x time
data = groupsummary(dataTbl,["Time","Time"],["hourofday","day"],"mean",4:12)
This code computes mean values of nine variables over lat x lon but not over the time (00 GMT and 12 GMT).
It writes 3482 rows of nine varaibles with 00 GMT and followed by 3481 rows of nine variables for 12 GMT.
I want to calculate the mean of nine variables from 00 and 12 GMT also. Therefore, the output data will
have the dimensions of (3481,9) in place of (6963,9). I request you to kindly suggest me how to do it in
above mentioned matlab code. I would appreciate your kind help.
Sanchit Singh

回答 (0 件)

この質問は閉じられています。

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by