Impose daily variability on monthly meteorological data
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I have daily temperature and precipitation time series (see attached sample). I need to create a daily time series from this. To create realistic variation, I have the standard deviation of daily values (before they were originally processed) for each month of the year, so I would like to use the stdev to create a realistic daily series.
Any ideas? Thanks in advance
댓글 수: 6
dpb
2015년 2월 11일
A gamma is a positive-only distribution unless you introduce a shifting parameter so avoiding negatives should be automagic.
What information do you actually have regarding the variabilities within months from the original dataset? I didn't see anything but the totals(?) in the posted dataset???
답변 (1개)
dpb
2015년 2월 12일
OK, w/o a lot of effort a first pass of the basic idea might be sotoo...
rain=importdata('rain.dat'); % the data file w/o the first section
rain=rain.data(:,4); % just keep the rainfall data alone by month
daymo=diff(datenum(1980,1:12*6+1,1,0,0,0)); % number days/month
r=rain./daymo; % average/day for each month
r=reshape(r,12,[]); % arrange by monthXyear
format bank % keep from scaling for viewing
[r mean(r,2) var(r,[],2)] % just looking at data to see what looks like
figure, plot(r), xlim([1 12])
OK, I learned the exponential with parameters eta and lambda where eta is the Matlab a and lambda --> 1/b
For gamma, the mean is eta/lambda and variance is mean/lambda or eta/lambda*2. Solving for those by month leads us by some simple algebra to
lamb=mean(r,2)./var(r,[],2);
eta=mean(r,2).*lamb;
x = gaminv((0.005:0.01:0.995),eta(1),1/lamb(1)); % for January range of x to cover distr
y = gampdf(x,eta(1),1/lamb(1)); % evaluate pdf
figure,plot(x,y) % see what looks like..
rgam=gamrnd(eta(1),1./lamb(1),31,1); % generate 31 random samples
OK, here's some results...
>> [min(rgam) max(rgam) mean(rgam) sum(rgam)]
ans =
0.30 1.92 0.85 26.45
>>
That's at least in the realm of reasonableness altho you'll likely need to do something to capture the real variability a little more on an annual basis...
The alternative is, as said, to decide what the extremes in your observed values might represent in terms of the realistic upper limits and use the cdf percentage points and back solve for parameters that match that and, say, the mean and see what that leads to.
You've got any number of possibilities given the lack of actual data structure...
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Climate Science and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!