# Use of SMAP Soil Moisture and Fitting Methods in Improving GPM Estimation in Near Real Time
## 3 Model and Method
### Assimilation Algorithm  
[PERSON] et al. proposed a particle filter (PF) assimilation method in improving soil moisture predictions [63]. [PERSON] et al. applied this method to correct satellite-based precipitation estimates within the framework of two types of land surface models [38]. The procedure applied in this study is briefly explained as follows (see also Figure 2):  
(1) The API model is forced with GPM data (original precipitation), blue bars in Figure 2a and temperature data (see Section 3.1). The assimilation window for each grid cell is defined by \(\text{N}_{\text{SMAP},\text{opt}}\) which represents the optimal number of the SMAP observations that produces the smallest RMSE, as described later in this section. The blue line in Figure 2a represents the soil moisture simulated by the API model forced with this original precipitation in an assimilation window. (2) The original GPM rainfall is disturbed for 100 times. The disturbed artificial rainfall is then used to force the API model to obtain 100 soil moisture simulations. \(\text{P}_{\text{threshold}}\) is used to separate the daily precipitation accumulation data into two different categories. Two distributions are used to generate new artificial rainfall based on a multiplicative factor k for these two categories  
\[\text{k}=\left\{ \begin{array}{cl}\text{e}^{(4\text{ rand})-2}&\text{if }\text{P}_{\text{GPM}}\leq\text{P}_{\text{threshold}}\\ 0.145\text{ randg}(5.43)&\text{if }\text{P}_{\text{GPM}}>\text{P}_{\text{ threshold}}\end{array} \right.. \tag{6}\]  
In Equation (6), for each original daily rainfall, if its value is less than the \(\text{P}_{\text{threshold}}\), the rain value will be altered by an exponential function determined by the generation of uniformly distributed random numbers (rand); otherwise, a gamma distribution, defined by two shape parameters 0.145 and 5.43, is used to generate the random numbers (randg) [64]. In the example shown in Figure 2b, the rain event on 18 June is larger than \(\text{P}_{\text{threshold}}\) (30 mm) so the second line of Equation (6) is applied, while the first line is used for other rain events as they are lower than 30 mm. (3) For each new simulated soil moisture, we calculate the root mean squared error (RMSE) against the SMAP measurements (green stars in Figure 2b) in each period. (4) Based on the total of 100 RMSE values, only the best 10 simulations are selected. The retrieval accumulation product (soil moisture corrected products, SMP hereafter) is computed as the mean value of the 10 best simulations (average of 10 perturbed precipitation time series). Note that [PERSON] et al. consider the quality of SMOS observations in the assimilation based on the quality indices. However, we do not have such indices with SMAP observations [38]. Ideally, evaluations on the quality of satellite-based soil moisture require in-situ measurement. As in situ soil moisture data are not available in many areas in the world, the quality-based assimilation of satellite soil moisture is of limited applicability. Therefore, in this study we follow the simple strategy used in [PERSON] et al. [28],and always select the same number of simulations in the assimilation process without considering the quality of satellite-based soil moisture observations. This simple strategy facilitates broader applications. In the example shown in Figure 2, the SM (yellow lines in Figure 2c) associated with the rainfall time series (yellow bars in Figure 2c) are averaged (red bar in Figure 2d) to provide a corrected rainfall estimate. The red line in Figure 2d represents the corrected soil moisture associated with the corrected rainfall by the API model, and the last value will be used to initialize the next simulated period. The initial value of SM on each grid cell in the API model was derived from a 30-year spinup of the model. While a 30-year spinup is used in this study, the simulation gets into an equilibrium states within one years.