How do I convert ERA Interim precipitation to get total precipitation in area?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mahboubeh Molavi-Arabshahi
am 5 Feb. 2023
Kommentiert: Mahboubeh Molavi-Arabshahi
am 8 Feb. 2023
i download time series data from
ERA5 monthly averaged data on single levels from 1959 to present
for every month I have a NC file
"units = 'm of water equivalent'
As wrote in this link:
I must multiply every month in number of its days to get total precipitation (m) in every month
my question is because the data is 41*41*64 do i average data or sum of data in every month of a year?
who I can calculate the total precipitation in a year?
filename1='ep1.nc';% data jan
p1=ncread(filename1,'tp');
[llats1,llons1] = meshgrid(lats1,lons1);
land1 = island(llats1,llons1);
p1(land1)=NaN;
Is it for every month:
pmm1(:,1)= nanmean(nanmean(p1))*31;
or
pmm1(:,1)= nansum(nansum(p1))*31;
0 Kommentare
Akzeptierte Antwort
Sulaymon Eshkabilov
am 5 Feb. 2023
Bearbeitet: Sulaymon Eshkabilov
am 7 Feb. 2023
Here is how to compute annual and weekly averages of the data given in nc file.
unzip('ep1.zip')
vardata=ncread('ep1.nc', 'tp');
% This computes annual average
for ii=1:64
Year_mean(ii) = mean(vardata(:,:,ii), 1:2);
end
plot(Year_mean, 'ro-.', 'MarkerFaceColor','c'), shg
title('Annual average')
xticks([1:5:64 64])
Year = {'1959', '1964', '1969', '1974', '1979', '1984', '1989', '1994','1999', '2004', '2009', '2014', '2019', '2023'};
xticklabels(Year)
grid on
xlabel('Years')
ylabel('Precipitation, [m]')
xlim([1, 64])
%%
vardata=ncread('ep1.nc', 'tp');
% This computes weekly average
for ii=1:64
for jj=1:41
Week_mean{ii, jj} = mean(vardata(:,:,ii), 1);
end
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu NetCDF finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!