필터 지우기
필터 지우기

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