Impose daily variability on monthly meteorological data

2 visualizaciones (últimos 30 días)
James Douglas
James Douglas el 9 de Feb. de 2015
Respondida: dpb el 12 de Feb. de 2015
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 comentarios
dpb
dpb el 11 de Feb. de 2015
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???
James Douglas
James Douglas el 11 de Feb. de 2015
That's the problem, all i have is the total monthly precip, no measure of variability so any fitted gamma distribution would be unrealistic but may be ok for intended purpose (testing a model until I can get some actual daily data, hopefully in a month or two).
Thanks

Iniciar sesión para comentar.

Respuestas (1)

dpb
dpb el 12 de Feb. de 2015
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...

Categorías

Más información sobre Climate Science and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by