Effacer les filtres
Effacer les filtres

How do I convert ERA Interim precipitation to get total precipitation in area?

7 vues (au cours des 30 derniers jours)
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;

Réponse acceptée

Sulaymon Eshkabilov
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
  1 commentaire
Mahboubeh Molavi-Arabshahi
thanks for your reply
please let me explain what i need, i want to calculate total precipitation in every year so i download every month separately (41*41*64) for 64 years.
so because i need just data Sea so i used island
(because of internet i could not attach all of 12 months's data)
My doubt at first is: do i need mean or sum of value to calculate total precipitation in whole of sea?
I comment it on matlab file that is attached because i tried it with both cases
and another question is do i need to multiply the values of precipitation every months at first in a scale factor because the value of so small and they are not same as observed data.
in netcdf file they told the units are "m of equivalent water" i need data total precipitation in every year based on Km
thanks for your help

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by