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

9 ビュー (過去 30 日間)
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;

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 2 月 5 日
編集済み: Sulaymon Eshkabilov 2023 年 2 月 7 日
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 件のコメント
Mahboubeh Molavi-Arabshahi
Mahboubeh Molavi-Arabshahi 2023 年 2 月 8 日
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

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by