How to get decade means of monthly 3D satellite data?
Mostrar comentarios más antiguos
Hello Matlab World!
I have been trying to convert the monthly netcdf data (file attached "bob") to decade data and later plot a map of the same. I have visited a similar question asked before and tried the following code, but seem to get the wrong results:
lon=ncread('bob.nc','lon'); % longitude
lat=ncread('bob.nc','lat'); % latitude
time=ncread('bob.nc','time'); % time
temp=ncread('bob.nc','sst');
t=size(time,3);
[groups, groupID] = findgroups(floor(t/12)*10);
The temperature variable, temp= 17 x 15 x 444 (where 444 is the monthly data from January 1986 to December, 2019). So I basically need to get 4 groups (1986-95, 96-2005, 2006-2015 and 2016-2019). The above code gives 1 group which is obviously not correct.
Would be grateful to receive some help in this.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Preprocessing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!