| | |
| | | * @return |
| | | */ |
| | | public static Double ET0(Double kc, Double maxT, Double minT, Double zenithRadiation){ |
| | | Expression expression = new ExpressionBuilder("x * (0.0023 * (((a + b) / 2) + 17.8) * ((a + b)^(1/2)) * c * 0.408)") |
| | | Expression expression = new ExpressionBuilder("x * (0.0023 * (((a + b) / 2) + 17.8) * ((a - b)^(1/2)) * c * 0.408)") |
| | | .variables("x", "a", "b", "c") |
| | | .build(); |
| | | // 设置变量值 |
| | |
| | | return result ; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | Double lat = 38.561976140977116 ; |
| | | Integer dayIndex = 180 ; |
| | | Double lat = 38.56064095143279 ;//纬度 |
| | | Integer dayIndex = 239 ;//年内日序数(比如1月1日为1,12月31日为365或366) |
| | | Double kc = 0.41 ;//作物系数 |
| | | Double maxT = 40.1 ;//一日内最高温度 |
| | | Double minT = 40.1 ;//一日内最低温度 |
| | | Double minT = 28.1 ;//一日内最低温度 |
| | | |
| | | Double fai = rad(lat); |
| | | System.out.println(fai); |
| | | System.out.println("弧度:" + fai); |
| | | |
| | | Double sunMagnetismAngular = sunMagnetismAngular(dayIndex); |
| | | System.out.println(sunMagnetismAngular); |
| | | |
| | | Double sunEarthDistance = sunEarthDistance(dayIndex); |
| | | System.out.println(sunEarthDistance); |
| | | System.out.println("太阳磁偏角:" + sunMagnetismAngular); |
| | | |
| | | Double sunTimeAngular = sunTimeAngular(fai, sunMagnetismAngular); |
| | | System.out.println(sunTimeAngular); |
| | | System.out.println("太阳时角:" + sunTimeAngular); |
| | | |
| | | Double sunEarthDistance = sunEarthDistance(dayIndex); |
| | | System.out.println("日地间相对距离的倒数:" + sunEarthDistance); |
| | | |
| | | Double zenithRadiation = zenithRadiation(sunEarthDistance, sunTimeAngular, fai, sunMagnetismAngular); |
| | | System.out.println(zenithRadiation); |
| | | System.out.println("天顶辐射:" + zenithRadiation); |
| | | |
| | | Double et0 = ET0(kc, maxT, minT, zenithRadiation); |
| | | System.out.println(et0); |
| | | System.out.println("蒸散量:" + et0); |
| | | } |
| | | |
| | | } |