time averaging a net.cdf file

I want to plot mean monthly chlorophyll from daily data. so far i can download the data for a single day and plot it as a pcolor using:
ncfile = 'dataset-global-nahindcast-bio-001-018-V5-chl_1521044729974.nc' ; % nc file name
% To get information about the nc file
ncinfo(ncfile)
% to display nc file
ncdisp(ncfile)
% to read a vriable 'var' exisiting in nc file
chlorophyll = ncread(ncfile,'CHL') ;
lat = ncread(ncfile,'latitude') ;
lon = ncread(ncfile,'longitude') ;
figure (1)
pcolor(lat,lon,chlorophyll)
shading interp
colormap hot
colorbar
grid on
which works, but i would like to know how to average multiple days so that i can download larger files and plot mean monthly chlorophyll instead of daily chlorophyll.I have attached an example file that i am working with, can anyone help me with this?
Thanks in advance

댓글 수: 2

Sergey Kasyanov
Sergey Kasyanov 2018년 3월 28일

You have attached matfile with the name of data file without any data.

Without any information about data I can advise you to use function mean.

Hi the data file is too large to upload i can give you any info you need on the file though
D
imensions: [1×4 struct]
Variables: [1×7 struct]
Attributes: [1×15 struct]
Groups: []
Format: 'classic'
dimensions:
x = 143
y = 105
time_counter = 24
deptht = 1

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

질문:

2018년 3월 28일

댓글:

2018년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by