How do I convert ERA Interim precipitation to get total precipitation in area?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mahboubeh Molavi-Arabshahi
le 5 Fév 2023
Commenté : Mahboubeh Molavi-Arabshahi
le 8 Fév 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 commentaires
Réponse acceptée
Sulaymon Eshkabilov
le 5 Fév 2023
Modifié(e) : Sulaymon Eshkabilov
le 7 Fév 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
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur NetCDF dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!