00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
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 ;
00092 int numYears;
00093 int numFlows;
00094 bool isNorthern;
00095 };
00096
00097 #endif