1 2 /////////////////////////////////////////////////////////// 3 // // 4 // SAGA // 5 // // 6 // System for Automated Geoscientific Analyses // 7 // // 8 // Tool Library // 9 // sim_hydrology // 10 // // 11 //-------------------------------------------------------// 12 // // 13 // DVWK_SoilMoisture.h // 14 // // 15 // Copyright (C) 2003 by // 16 // Olaf Conrad // 17 // // 18 //-------------------------------------------------------// 19 // // 20 // This file is part of 'SAGA - System for Automated // 21 // Geoscientific Analyses'. SAGA is free software; you // 22 // can redistribute it and/or modify it under the terms // 23 // of the GNU General Public License as published by the // 24 // Free Software Foundation, either version 2 of the // 25 // License, or (at your option) any later version. // 26 // // 27 // SAGA is distributed in the hope that it will be // 28 // useful, but WITHOUT ANY WARRANTY; without even the // 29 // implied warranty of MERCHANTABILITY or FITNESS FOR A // 30 // PARTICULAR PURPOSE. See the GNU General Public // 31 // License for more details. // 32 // // 33 // You should have received a copy of the GNU General // 34 // Public License along with this program; if not, see // 35 // <http://www.gnu.org/licenses/>. // 36 // // 37 //-------------------------------------------------------// 38 // // 39 // e-mail: oconrad@saga-gis.org // 40 // // 41 // contact: Olaf Conrad // 42 // Institute of Geography // 43 // University of Goettingen // 44 // Goldschmidtstr. 5 // 45 // 37077 Goettingen // 46 // Germany // 47 // // 48 /////////////////////////////////////////////////////////// 49 50 //--------------------------------------------------------- 51 #ifndef HEADER_INCLUDED__DVWK_SoilMoisture_H 52 #define HEADER_INCLUDED__DVWK_SoilMoisture_H 53 54 55 /////////////////////////////////////////////////////////// 56 // // 57 // // 58 // // 59 /////////////////////////////////////////////////////////// 60 61 //--------------------------------------------------------- 62 #include <saga_api/saga_api.h> 63 64 65 /////////////////////////////////////////////////////////// 66 // // 67 // // 68 // // 69 /////////////////////////////////////////////////////////// 70 71 //--------------------------------------------------------- 72 class CDVWK_SoilMoisture : public CSG_Tool_Grid 73 { 74 public: 75 CDVWK_SoilMoisture(void); 76 Get_MenuPath(void)77 virtual CSG_String Get_MenuPath (void) { return( _TL("A:Simulation|Soil Hydrology") ); } 78 79 80 protected: 81 82 virtual bool On_Execute (void); 83 84 85 private: 86 87 double m_FK, m_PWP; 88 89 CSG_Grid *m_pWi, *m_pFK, *m_pPWP, m_LandUse; 90 91 CSG_Table *m_pClimate, *m_pCropCoeff; 92 93 94 int Get_Month (int Day); 95 double Get_kc (int Bestand, int Day); 96 97 double Get_ETP_Haude (int Day); 98 double Get_Pi (int Day); 99 double Get_Wi (double Wi, double Pi, double ETP, double kc, double FK, double PWP); 100 101 void Step_Day (int Day); 102 103 }; 104 105 106 /////////////////////////////////////////////////////////// 107 // // 108 // // 109 // // 110 /////////////////////////////////////////////////////////// 111 112 //--------------------------------------------------------- 113 #endif // #ifndef HEADER_INCLUDED__DVWK_SoilMoisture_H 114