How to get decade means of monthly 3D satellite data?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur String Parsing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!