예제 #1
0
 /// <summary>
 /// 计算蒸散发量
 /// </summary>
 /// <param name="WU">上层土壤蓄水量</param>
 /// <param name="P">时段内降雨量</param>
 /// <param name="C">系数C</param>
 /// <param name="WL">中层土壤蓄水量</param>
 /// <param name="WLM">中层土壤蓄水容量</param>
 /// <param name="E0">水面蒸发量</param>
 /// <param name="K">蒸发折算系数</param>
 /// <param name="Ep">水面蒸发能力</param>
 /// <param name="Eu">上层蒸散发量</param>
 /// <param name="El">中层蒸散发量</param>
 /// <param name="Ed">底层蒸散发量</param>
 /// <param name="E">总蒸散发量</param>
 private void calEvaporation(double WU, double P, double C, double WL, double WLM, double E0, double K, out double Ep, out double Eu, out double El, out double Ed, out double E)
 {
     //计算Ep
     Ep = NumTrim.Trim(E0 * K, 2);
     if (WU + P >= Ep)
     {
         Eu = Ep; El = 0; Ed = 0;
     }
     else
     {
         Eu = WU + P;
         if (WL > (C * WLM))
         {
             El = NumTrim.Trim((Ep - Eu) * WL / WLM); Ed = 0;
         }
         else if (WL >= (C * (Ep - Eu)))
         {
             El = NumTrim.Trim(C * (Ep - Eu)); Ed = 0;
         }
         else
         {
             El = WL; Ed = NumTrim.Trim(C * (Ep - Eu) - El);
         }
     }
     //计算总的蒸发量
     E = Eu + El + Ed;
 }
예제 #2
0
 /// <summary>
 /// 设置指定单元格的值
 /// </summary>
 /// <param name="dt"></param>
 /// <param name="rowNum"></param>
 /// <param name="colNum"></param>
 /// <param name="value"></param>
 /// <param name="validnum"></param>
 public void setCell(int rowNum, int colNum, double value, int validnum = 2)
 {
     value = NumTrim.Trim(value, validnum);
     DT.Rows[rowNum][colNum] = value.ToString("F" + validnum.ToString());
 }