Fitting a GEV distribution - non-negative only I am fitting a GEV distribution to some rainfall data, but the software I am using (Matlab and Easyfit) are giving a distribution which includes negative numbers (i.e. negative rainfall). Is there a way of forcing this distribution to be non-negative in Matlab or Easyfit?
I tend to get this issue when I have lots of zeros or small values in the data, such as in the CDF below.

 A: First question would be if your problem maps appropriately to the GEV? Are your rainfall measurements actually maxima of blocks (months, years, etc)? If not, there's no reason that the fit should be meaningful.
At what level are you calculating your maxima? For example if you're calculating the maximum of daily readings each week, can you instead aggregate at the monthly level, making zero (and other low values) less likely, and thus pulling the distribution away from negative values?
You should also consider using all of your data and using a POT (Points or Peaks Over Threshold, which uses the Generalized Pareto Distribution) approach, which would avoid zeros all together. This approach uses more data and can take into account the fact that maxima may occur in clusters. (R's evd package provides functions to do this.)
Second question could be, if your measurements contain 0, have you considered using a Hurdle Model? (That is a two-stage model where the first stage predicts zeros, and the second stage applies to non-zeros.) This may not actually be appropriate or helpful, but it might. Speaking of which, are all of your 0's actually 0's, or might some of them actually be NA's -- there was no measurement during that time period?
Third question would be: why do you care about negative values? In general, with a GEV you are looking at things like the N-year return, which is the $1 - {1 \over N}$ quantile, so you'd be looking at the 95 percentile for a 20-year return, the 99 percentile for the 100-year return, etc, so does the 1 or 2 percentile really matter? (I know this is a slippery slope that can do things like "justify" using a Normal approximation for values that cannot be negative, but if you're actually doing an extreme value analysis perhaps it doesn't matter as much what happens in the left tail of the extreme values.)
Is it at all acceptable to consider values less than zero to be zero? This is ad hoc, but it could turn out that if you have excess zeros it actually works. Not a fan of this idea, just throwing it out there.
Last, if you're able to force the shape parameter to be > 0, or equivalently if you can specify a Frechet distribution, the support of the Frechet is positive. This would exclude 0, which could be a problem, and I'm not sure that this would make sense in terms of your subject matter at any rate, but mathematically it could help. Again, just throwing the idea out there.
A: The GEV has a lower limit, which is $\mu-\frac{\sigma}{k}$, in Matlab notation. What you would need is to fix the parameters in the subspace $\mu=\frac{\sigma}{k}$, which I think is not possible in an easy way in Matlab.
What I would do (excluding to avoid Matlab) is to use the function negloglik
(see here): it gives you the log-likelihood of the distribution you want for the data you have, and then making a simple loop in which you optimize this function, where the parameter $\mu$ follows the constraint you are giving, and you propose $\sigma$ and $k$ freely.
slightly off topic: I see that you are fitting precipitation data. Doesn't it has a threshold anyways?
A: In MATLAB, you can use the MLE function to fix the subspace as chuse suggested. Here's an example. First an unconstrained fit.
>> rng(0)
>> x = gevrnd(.3,.3,1,1000,1); ecdf(x)
>> p = gevfit(x)
p =
    0.2947    0.2785    0.9901
>> gevinv(0,p(1),p(2),p(3))
ans =
    0.0450

Using the unconstrained fit, the lower bound is positive, which I know is not a problem for you but that's the way it turned out. Let's make it zero. Just optimize over k and sigma, setting mu=sigma/k.
>> p2 = mle(x,'pdf',@(x,k,sigma)gevpdf(x,k,sigma,sigma/k),'start',[1 1])
p2 =
    0.2818    0.2795
>> gevinv(0,p2(1),p2(2),p2(2)/p2(1))
ans =
     0

However, if the pdf is asymptotic to the x axis at the lower bound, I suspect the presence of exact zeros in your data is going to cause problems. Even without that, it's sometimes better to estimate log(k) and log(sigma) so that MLE won't try values outside the valid range of the parameters.
