Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Catchment_DynamicRiverFlows.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 //
00003 //  Thomas Berger (main author), Pepijn Schreinemachers, and Thorsten Arnold
00004 //
00005 //
00006 //  Hohenheim University (490d)
00007 //  Professorship for Land Use Economics in the Tropics and Subtropics
00008 //
00009 //  May not be distributed without permission by main author
00010 //
00011 //  File:       CatchmentSectorAuxiliary.h (formerly part of sector.h)
00012 //
00013 //  Contents:   Class for irrigation methods and canal efficiency (EDIC)
00014 //
00015 //
00016 //
00017 //------------------------------------------------------------------------------
00018 
00019 
00020 #ifndef _Catchment_DynamicRiverFlows_h
00021 #define _Catchment_DynamicRiverFlows_h
00022 
00023 
00024 #include"BasicData.h"
00025 #include"MatrixDouble.h"
00026 
00027 
00028 //----------------------------------------------------
00030 //----------------------------------------------------
00031 
00032 
00033 
00034 class DynamicRiverFlows
00035 {
00036    public:
00037         //----------------------------------------------------------------------------------
00039 
00040       virtual void read_DynamicRiverFlows(string fn);
00041       virtual void writeToFile(string fn);
00043         //----------------------------------------------------------------------------------
00045 
00046       double getFlowForRiverAndYearAndMonth(int riverID_, int y_, int m_, bool isNorthern_);
00047 
00048       virtual void setFlowForRiverAndYearAndMonth(int riverID, int yearID, int modelMonth, int valFlowM3);
00049       virtual void setRiver_fullYear(int riverID, int yearID, MatrixDouble& vectorThisYearFlows);
00050       virtual void getRiver_fullYear(int yr_, MatrixDouble& N_forecast, MatrixDouble& vec_InflowID_);
00051 
00052    // nothing in base class!
00053 //
00054 
00056         //----------------------------------------------------------------------------------
00058 
00059 //
00060 
00061 
00063         //----------------------------------------------------------------------------------
00065 
00066 
00067       DynamicRiverFlows();
00068       DynamicRiverFlows(int minYear_, int numYears_, int numFlows_, bool isNorthern_)
00069       {  allocate(minYear_, numYears_, numFlows_, isNorthern_);
00070       }
00071 
00072       DynamicRiverFlows(DynamicRiverFlows& dynamicRiverFlows_)
00073       {  copy(dynamicRiverFlows_);
00074       }
00075 
00076       virtual ~DynamicRiverFlows();
00077       
00078       virtual void copy(DynamicRiverFlows& dynamicRiverFlows_);
00079       virtual void copy_N_full(DynamicRiverFlows& dynamicRiverFlows_);
00080 
00081       virtual void allocate();
00082       virtual void allocate(int minYear_, int numYears_, int numFlows_, bool isNorthern_);
00083       virtual void deallocate();
00084       virtual void deallocate_N_full();
00085 
00087         //----------------------------------------------------------------------------------
00088 
00089       MatrixDouble* N_full;
00090       MatrixDouble  yearsVector, riverIdsVector;
00091       int minYear ; // First year with data. Last year is (minYear + numYears) 
00092       int numYears;
00093       int numFlows;
00094       bool isNorthern;
00095 };
00096 
00097 #endif

Generated on Thu Aug 28 12:38:44 2008 for MPMAS by  doxygen 1.3.9.1