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

CatchmentSector.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:       CatchmentSector.h (formerly sector9.h)
00012 //
00013 //  Contents:   Should develop into a new water user association class that
00014 //              provides irrigation infrastructure to its member farm agents,
00015 //              assigns water quotas and distributes irrigation water
00016 //
00017 //------------------------------------------------------------------------------
00018 
00019 
00020 #ifndef _CatchmentSector_h
00021 #define _CatchmentSector_h
00022 
00023 // Libraries C++
00024 #include <iostream>
00025 using namespace std; // fuer C++-Compiler, damit cin nicht als std::cin eingelesen werden muss
00026 #include <fstream>   // new 2005
00027 #include <string>    // new 2005
00028 
00029 #include "BasicEnums.h"
00030 
00031 #include "CatchmentHandler.h"
00032 #include "GridCellHandler.h"
00033 #include "RandomDataHandler.h"
00034 #include "Raster2D.h"
00035 
00036 class CropPrecipitation;
00037 class CropWater;
00038 class IrrigationMethodSector;
00039 class TimeHandler;
00040 
00041 class sector
00042 {       
00043         protected: 
00044         int* zuflussID;       //Nummern der Sektorzufluesse
00045                 
00046         protected:
00047         string secName; //Name der Gitternetzdatei (Input)
00048         int sc_nr; //Nr. der Subcuenca
00049         int GISID;//Arnold2006_102
00050         //Value in arcGIS-map for sector
00051         // This ID is now relevant to identify a sector within a Subcatchment map.
00052         
00053         int sectorSeed;
00054         
00055         scuenca* sub; //Zeiger auf die Subcuenca
00056         int sectorIndex;//sector ID starts with "0", index within catchment
00057         // sub[sc_nr]->
00058         // sek[sc_nr][sectorIndex]->
00059         // BUT:
00060         // sub[sc_nr]->getRoutingData(positionInRegionFile);
00061         //
00062         int positionInRegionFile;// Position that this sector had in input file;
00063         // corresponds to row and column in BUCKET-model files
00064         
00065         double irrigableHa_j;   //irrigable area of sector
00066         double nonIrrigableHa_j;//non-irrigable area
00067         int iniAgents; //Initial number of agents
00068         int numInflows; //Number of water inflows
00069 
00070         // Used for exporting sector maps to ASCII grid
00071         double xCoord;
00072         double yCoord;
00073 
00074         int* parzellen; //Anzahl der Parzellen je Bodentyp
00075 
00076         double* totalSectorShares; //total shares of all users within sector, formerly <watershares>
00077         double* maxQuantInflow; //Maximum amount of inflows into sector
00078 
00079         //Matrix of actual rainfall in all months
00080         CropPrecipitation* p_cropActualPrecipitation;
00081         CropWater* p_cropWat;
00082 
00083         // Call methods of p_cropActualPrecipitation
00084    //Arnold080812 assumes global time
00085         virtual double getActualPrecipitation();
00086    //Arnold080812 NEW
00087         virtual double getActualPrecipitation(TimeHandler& th_notChanged);
00088 
00089    //Arnold080812
00090    // No local time handler needed. Internally, global time is used
00091         virtual double getAveragePrecipitation_Global();
00092    // Ongoing ("current") time from time handler that was passed is used
00093    virtual double getAveragePrecipitation(TimeHandler& th_notChanged);
00094 
00095         //Matrix of irrigation water demands in all months
00096         MatrixDouble irrigationWaterDemands;//(numWaterActivites * MONATE)
00097         
00098         //Matrix of crop effective precipitation
00099         MatrixDouble effectivePrecipitation;//(numWaterActivites * MONATE)
00100 
00101         //Matrix with all different irrigation methods, for irrigated area (ha) 
00102         //under certain irrigation method, at current time step
00103         MatrixDouble methoden_j;//(1 * irrigMethodEND)
00104 
00105         //share of irrigation methods in irrigated area at sector level
00106         MatrixDouble areaShareOfIrrigationMethods;//(1 * irrigMethodEND)
00107 
00108         // Inherited class from Catchment data IrrigationMethod
00109         // Corrected: Chgannel efficiency
00110         IrrigationMethodSector sectorparamsIrrigationMethod;
00111 
00112         // Efficiency of channel system of sector, as read from file.
00113    // ... Actual realization will be determinated according to CANAL_MODEL()
00114         double canalEfficiency;
00115    // ... additional variables for canal efficiency, depending on model
00116    
00117         //yearly vector, contains monthly entries
00118         MatrixDouble N_j; // monthly net inflow from water sources (1 X MONATE)
00119         
00120         //monthly
00121         double Ext_j; //Inflows from other sectors ("Sektor-Ext-Water")
00122         double U_j; //sectoral Re-Use-coefficient
00123 
00124         double B_j; //Coef. de derrames
00125         double G_j; //Coef. de escurrimientos
00126         double L_j; //Coef. de escurrimientos
00127         double eta_j; //Coef. de escurrimientos
00128 
00129         double b_j; //Coef. de aprovechamiento
00130         double g_j; //Coef. de aprovechamiento
00131         double loss_j; //Coef. de aprovechamiento
00132         double zeta_j;
00133 
00134         //monthly
00135         double D_sat_j; //sectorale D'
00136         double Derr_j; // superficial discharges ("Derrames")
00137         double Esc_j; // Topsoil discharges (Escurrimientos)
00138         double Ueb_j; // Sektor-Ueberschusswasser
00139         double Fehl_j; // Sum of uncovered water demand in sector
00140 
00141    double Canal_j; // Additional Sektor-water from inefficient canals, which is
00142                    // re-distributed to all agents proportional to land ownership
00143    double S_j;     // Total water available to agents ... even if not used.
00144                    // NOT USABLE FOR BALANCES, because re-distributed!
00145    double D_j;     // Total water demand
00146 
00147         //Extra currently not used. Initialized with 0.0 so it does not produce
00148         //any errors!
00149 //extraoff   double Extra;// sum of excess water of an agent
00150         double weff;   //increase of water-use efficiency (1.0 = no increase)
00151 
00152         //Gitternetz des Sektors
00153         ldscape fl;
00154 
00155    //Vector with values for each content type. Filled during coupling.
00156    // ... call with "getContentFromSectorLevel( Content cont)"
00157    MatrixDouble couplVector;
00158 
00159 
00160 
00161 public:
00162         // --------------------------------------------------------------------------
00164         // --------------------------------------------------------------------------
00165 
00166         //Uebergabe: Files, Nr. und Zeiger der Subcuenca, Sektornr., Sektorflaeche.
00167         //Initialisierungsliste: Sektor- und SubcatchmentNum wird gleich an den
00168         //Pachtmarkt-Konstruktor weitergereicht
00169         sector (const char*, const char*,
00170                           int sc, scuenca*,
00171                           int sk, 
00172                           CropPrecipitation* p_cropPrecipitation_ = NULL, CropWater* p_cropWat_ =NULL );
00173         virtual ~sector();
00174 
00175         virtual void sectorbetriebe_loeschen();//l?cht Sektorbetriebe aus Liste
00176         virtual void speicher_freigeben(void);
00177 
00178 
00179         // --------------------------------------------------------------------------
00181         // --------------------------------------------------------------------------
00182 
00183         // READ IFNORMATION ABOUT SECTOR:
00184         //      Inflow,              --> ZUF*
00185         //      Lottery data,        -->
00186         //      Nr of agents         --> iniAgents
00187         //      size of grid         --> not read here, but in GIS-maps
00188         // assign it to sector-variables
00189         virtual void initializeInflowsToSector(MatrixDouble& INFL, MatrixDouble& MAXINFL);
00190         virtual void assignInflowIDs(const MatrixDouble& inflows);
00191         virtual void initLandscape_SectorRaster(Content cont, Raster2D& gisData);
00192         virtual void fillLandscapeDataContent(Content cont, Raster2D& gisData);
00193 
00194         void setActualPrecipitationPointer( CropPrecipitation* p_cropPrecipitation_)
00195                                                                 {p_cropActualPrecipitation = p_cropPrecipitation_;}
00196         void setCropWatPointer( CropWater* p_cropWat_)
00197                                                                 {p_cropWat = p_cropWat_;}
00198 
00199    CropWater* getCropWatPointer()
00200                                                                 {return p_cropWat;}
00201 
00202         virtual void makeAgentVector();
00203 
00204         virtual int checkAndInitializeAgentIds(Raster2D& gisCont);
00205         virtual void checkPropertiesAndInitializeToSector(Raster2D& gisCont);
00206         
00207         virtual void analyseAgentsInSectorAndExport(ofstream& streamData);
00208         // --------------------------------------------------------------------------
00210         // --------------------------------------------------------------------------
00212         virtual void besitzer_eintragen(int z, int s, int nr);
00213         virtual void nutzer_eintragen(int z, int s, int farbe);
00214         virtual void alle_nutzer_zuruecksetzen();
00215 
00216         // --------------------------------------------------------------------------
00218         // --------------------------------------------------------------------------
00219         virtual void printOnScreen_MatrixSize(void); // Info about function
00220         virtual void printToScreen(void);
00221         virtual void printToScreenOld(void);
00222         virtual void printIrrgationMethods();
00223 
00224    virtual void writeIrrigationMethodToFile(string fn, bool isFirst);
00225 
00227         virtual void writeMonthlyWaterToStream(int m);   // ARNOLD 2005,
00228         virtual void writeMonthlyWaterToStream(int m, double Ueb_j_tmp);   // ARNOLD 2005,
00229         virtual void bodenkarte_printOnScreen(void);
00230 
00231         virtual void nutzerkarte_datei_speichern(char*);
00232         virtual void nutzerkarte_IDRISI_speichern(char*);//neu 2003 in IDRISI style
00233         virtual void WriteSoilMapInCol(char*);//neu 2003 soil in IDRISI style
00234         virtual void WriteUserMapInCol(char*);//neu 2003 usership in IDRISI style
00235         virtual void WriteFarmMapInCol(char*);//neu 2003 farmsteads in IDRISI style
00236 
00237         virtual void WriteAnyContentToFile(Content cont, int month, char*);//neu 2003 farmsteads in IDRISI style
00238 
00239 
00240         // --------------------------------------------------------------------------
00242         // --------------------------------------------------------------------------
00243 
00244         // set functions
00245         /* TODO 1 -oArnold -cImplement : propbably discard these functions, or migrate them to other class?*/
00246         virtual void set_iniAgents(int numA)                    {  iniAgents = numA; }
00247         virtual void setIrrigableHa_j(double haSz)              {  irrigableHa_j = haSz;  }
00248         virtual void setNonIrrigableHa_j(double haSz)  {  nonIrrigableHa_j = haSz;  }
00249 
00250 
00251         virtual void setSectorSeed(int _sectorSeed); // Function copied from BasicData::setSEED()
00252         virtual int getSectorSeed() {  return sectorSeed;  }   
00253         
00254         // Coordinates of sector
00255         // DEBUG-toCatchment
00256         virtual double getXcoord()              { return xCoord;}
00257         virtual double getYcoord()              { return yCoord;}
00258         virtual void setXcoord(double xc);
00259         virtual void setYcoord(double yc);
00260 
00261         // get functions
00262         virtual int getSectorID(void)           {return sectorIndex;}
00263         virtual int getCatchmentID(void)        {return sc_nr;}
00264 
00265         virtual int getGISID(void)                      {return GISID;}
00266         virtual int getGisId(void)                      {return GISID;}
00267         
00268         virtual int getIniAgents()                      {return iniAgents;}
00269         virtual double getIrrigableHa(void){return irrigableHa_j;}
00270         virtual double getNonIrrigableHa(void){return nonIrrigableHa_j;}
00271 
00272         //070531 Tbe
00273         virtual int getInflowIdForIndex(int index)//index refers to row index in EdicRiverFlowsX.dat
00274         {       return zuflussID[index];
00275         }
00276         virtual double getWaterShares(int index)//index refers to row index in EdicRiverFlowsX.dat
00277         {       return totalSectorShares[index];
00278         }
00279         virtual IrrigationMethodSector* const getPointerToIrrigationMethodSector()
00280         {       return &sectorparamsIrrigationMethod;
00281         }
00282 
00283         //const MatrixDouble* getPtrToEffectiveWaterDemands() {return &effectiveWaterDemandsPerMonth;}//substitute
00284         virtual const MatrixDouble* getPtrToIrrigationWaterDemands() {return &irrigationWaterDemands;}//Tbe 080220
00285         
00286         //const MatrixDouble* getPtrToEffectivePrecipitationPerMonth(){return &effectivePreciptitationPerMonth;}//substitute
00287         virtual const MatrixDouble* getPtrToEffectivePrecipitation(){return &effectivePrecipitation;}//Tbe 080220
00288 
00289         virtual double get_N_j(int m){ return N_j.wert_holen(0, m); }
00290 
00291         virtual int get_parzellen(int typ);
00292         
00293         // set functions
00294         virtual void set_GISID(int GISID_){  GISID = GISID_;};
00295         virtual void set_GisId(int GISID_){  GISID = GISID_;};
00296 
00297         // not yet used...
00298         virtual void set_positionInRegionFile(int posInRegionFile){ positionInRegionFile  =posInRegionFile;} 
00299         
00300 
00301 
00302         // --------------------------------------------------------------------------
00304         // --------------------------------------------------------------------------
00305         //teilt einzelnen Betrieben den Standort der Hofstelle und der Flaechen zu
00306         virtual void createAgentsInSector();
00307         virtual void assignGridCells();
00308         
00309         // --------------------------------------------------------------------------
00311         // --------------------------------------------------------------------------
00312 
00313         virtual void countInflows(void);
00314         virtual void addToIrrigationMethod_AreaShare(typeIrrigationMethod type, double val);
00315         virtual void computeAreaShareOfIrrigationMethods();
00316 
00318         //  - Ext_i[m]
00319         //  - D_sat_i[m]   
00320         virtual double computeAgentsIrrigationWaterSupplyPerMonth
00321                 (int m, double irrHa, 
00322       double* D_i, double* N_i, double*& Ext_i, double*& S_i, double* WPa_i, double Ueb_j_tmp);
00323         
00324         virtual void addAgentValueToN_j(int m, double val); //summiert den Wert "val" ZU den monatliche WaterRights
00325         virtual void make_N_j(int m);//summiert alle monatliches Netto-Water
00326 
00327         //      virtual void addToExtra(double);  //summiert nicht genutztes Wasser, Renamed from <make_extra>
00328         virtual void make_Ueb(double);   //summiert nicht genutztes Wasser
00329    virtual double get_Ueb_j();
00330    virtual double reduce_Ueb_j(double);
00331    virtual void reset_Ueb_j();
00332    
00333         virtual void addToSectorsTotalSatisfiedDemand_D_sat(double);  //summiert betriebliche D'
00334         virtual void make_Fehl(double);  //summiert betrieblichen Fehlbedarf
00335 
00336         //Elementfunktionen zur Ermittlung der entsprechenden Sektorwerte
00337         virtual void setEta(double eta_);
00338         virtual double getEta() {return eta_j;}
00339         
00340         virtual void compute_B_G();
00341         virtual double compute_delta();   // sum of all outflow coefficients
00342         virtual double compute_e();       // sum of all outflow coefficients
00343         virtual double compute_fieldLoss(); // after (!) B, G was calculated
00344         virtual double compute_sectorLoss();
00345         virtual double compute_e_jj();       // sum of all outflow coefficients 
00346 
00347         // Returning value for output
00348         virtual double computeInternalReturnFlowCoefficients();// renamed from <U_j_berechnen>
00349         virtual double receiveExternalReturnFlowsFromUpstreamSectors();// renamed from <compute_returnFlowsEdic>
00350         virtual void computeSurfaceRunoff();//renamed from <Derr_j_berechnen>
00351         virtual void computeLateralFlows();//renamed from <Esc_j_berechnen>
00352         virtual void sendReturnFlowsToDownstreamSectors();//renamed from <Abf_j_berechnen>
00353 
00354         // Find start values based on average rainfall
00355         virtual void initializeStartValuesForEffectivePrecipitation();
00356         virtual void initializeStartValuesForEffectivePrecipitation(TimeHandler& th_notChanged); //Ta 080812
00357 
00358    //Arnold2008_0812 SHOULD BE ERASED
00359         // Done at the beginning of every month, assuming global time
00360         virtual void initializeEffectivePrecipitation();//Tbe 080220
00361 
00362    //Arnold2008_0812: Now calls local time function, using global time handler
00363         virtual void initializeEffectivePrecipitation(TimeHandler& th_notChanged);//Ta 080812
00364 
00365         // Compute per-ha irrigation demands for all irrigation activities
00366    //Arnold2008_0812:
00367    //  ... Renamed from "initializeIrrigationWaterDemands()" with call to global time handle.
00368    //  ... Now calls local time function, using global time handler
00369         virtual void initializeIrrigationWaterDemands_GlobalTime();//Tbe 080220
00370    //Arnold2008_0812 Local time
00371         virtual void initializeIrrigationWaterDemands(TimeHandler& th_fixed);
00372 
00373         // Reset monthly sector values
00374         virtual void initializeEdicMonth();
00375    // ... resets edic storages   Ueb_j, D_sat_j, Fehl_j, Canal_j, Dj
00376    // ... (also called from <initializeEdicMonth>)
00377    virtual void resetEdicSectorStorages();
00378 
00379         //virtual void copyEffectiveWaterDemandsInMonth(int m,  //substitute
00380         virtual void copyEffectivePrecipitationInMonth(int m,  //Tbe 080220
00381                 const MatrixDouble& vectorOfMonthlyCropEffectivePrecipitation);
00382 
00383    // for output functions only // TA 0807
00384    virtual double getEffectivePrecipitation(int waterActiID_, int month_);
00385    // for output functions only // TA 0807
00386    virtual double getPlantIrrigationDemand(int waterActiID_, int month_);
00387 
00388         virtual void copyIrrigationWaterDemandsInMonth(int m,  //Tbe 080220
00389                 const MatrixDouble& vectorOfMonthlyCropIrrigationDemands);
00390 
00391         // ---------------------------------
00393         // ---------------------------------
00394    
00395         virtual int    get_numInflows(void);  //returns number of inflows actually initialized
00396         virtual double getU_j();
00397         virtual double getWeff();
00398         virtual string getName();       
00399         virtual double getNetInflowFromCatchment(int inflowID, int month, double share);//liefert Monatswasser aus Zufluss
00400         virtual double getCanalEfficiency() {return canalEfficiency;}
00401         virtual void setCanalEfficiency (double canalEfficiency_);
00402 
00403         virtual void set_b_j(double _b);
00404         virtual void set_g_j(double _g);
00405         virtual double getZeta_j(){return zeta_j;};
00406 
00407    virtual double getActualPrecipitation(int month_, int year_);
00408 
00409         // contains Extra (off)!!!
00410         virtual double computeReturnFlowsForAgent_Ext_i(int, double);    //liefert Monatsanteil an Ext_j, from subcatchment
00411    //
00412         virtual double computeReturnFlowsForAgent_Ext_i(int, double, double Ueb_j_tmp);  //additionally, re-allocates Ueb_j_tmp
00413 
00414 
00415         virtual void setEsc(double val);
00416         virtual void setDerr(double val);
00417  
00418         void set_U_j(double U_j_)               {  U_j = U_j_;}
00419         
00420         void set_weff(double weff_)     { weff = weff_; }
00421         //used if no external inflows are modelled (WASIM)
00422         virtual void set_Ext_j(double ext_j_);
00423    virtual double get_Ext_j(void);
00424 
00425 
00426         void setparamsIrrigationMethod(IrrigationMethod paramsIrrigationMethod);
00427         virtual double getMethodPlantWaterAvailability(int methodID);
00428 
00429         void printOutflowsToOtherSectors();
00430         virtual void writeToDescriptiveFile(ofstream& out);
00431 
00432    // Canal model
00433    virtual void addToCanal_j(double CC_J_);      //summiert nicht genutztes Wasser
00434    virtual double get_Canal_j();
00435    virtual double reduce_Canal_j(double CC_J_);
00436    virtual void reset_Canal_j();
00437 
00438    // Total water supplied (not usable for balances, because later re-distributed. Double accounting!)
00439    virtual void addToS_j(double S_J_);
00440    virtual double get_S_j();
00441    virtual void reduce_S_j(double S_J_);
00442    virtual void reset_S_j();
00443 
00444    // And initial water demand
00445    virtual void addToD_j(double D_J_);
00446    virtual double get_D_j();
00447    virtual void reduce_D_j(double D_J_);
00448    virtual void reset_D_j();
00449 
00450         // --------------------------------------------------------------------------
00452         // --------------------------------------------------------------------------
00453 
00454         //neu 2004 TSPC model
00455         virtual double getSlopeLen(int r, int c);
00456         virtual double getSlopeEro(int r, int c);
00457         virtual void updateSoilC(int r, int c, soilC*& slc);
00458 
00459         // --------------------------------------------------------------------------
00461         // --------------------------------------------------------------------------
00462 
00463         // --------------------------------
00465         // --------------------------------
00467         //virtual void updateCell(int r, int c, Content cont, double value);  //Arnold2008_0812
00468         //virtual void updateCellMonthly(int r, int c, int m, Content cont, double value);  //Arnold2008_0812
00469         // And for monthly values (REAL month as input expected. Only "cell" does conversion)
00470         // (here, specific link only in ldscape::updateCellMonthly(int r, int c, int mTot, Content cont, double newVal)) //Arnold2008_0812
00471         // NOT IMPLEMENTED: Backlink GisStruct into Landscape
00472         //virtual void updateLandscapeFromGisStruct(Raster2D& gis, int m, Content cont, bool DOCHECK); //Arnold2008_0812
00473 
00474         virtual void exportAnyCellContentToRaster3D(Raster3D& raster3D, int start, int end);
00475 
00476         // --------------------------------
00478         // --------------------------------
00479         virtual void printOnScreenLdscapeCells(void);
00480         virtual void printOnScreenAllCells(void);
00481 
00482         // --------------------------------
00484         // --------------------------------
00485         //Sets dimensions of Raster2D, then calls ldscape::deliverGisStruct
00486    //Arnold2008_0812...To be erased
00487         //virtual void getGisStructFromLandscape( Content cont, Raster2D& gisCont, int noData); // now getRaster2DfromLandscape
00488         //virtual void getGisStructFromLandscape( Content cont, Raster2D& gisCont); // now <getRaster2DfromLandscape>
00489 
00490         virtual bool checkConsistencyOfMapsFarmAndProperty();
00491         virtual bool eraseAllAgentsBellowSize(double factor, double cutoffsize);
00492 
00493    // For Ghana case: INflowIDs become Sector!
00494    virtual bool rectifySectorBoundariesFromInflows();
00495 
00496 
00497         // --------------------------------
00498         // Arnold2008 - NEW
00500         // --------------------------------
00501         //Sets dimensions of Raster2D, then calls ldscape::deliverGisStruct
00502         virtual void getRaster2DfromLandscape( Content cont, Raster2D& raster, int noData); //d
00503         virtual void getRaster2DfromLandscape( Content cont, Raster2D& raster); //d
00504 
00505    // Retrieve content from any cell[r][c]->getContent(cont) in landscape
00506    // ... this function either calls a sector-level value, or a cell-level value
00507    // ... - depending on ContentType
00508    virtual double getSpatialInfo_Content( int r, int c, Content cont); //d
00509    virtual double getSpatialInfo_Content_monthly( int r, int c, int m, Content cont); //d
00510 
00511    // For coupling, values are either written at cell level or at sector level.
00512    // Sector-level value
00513    // ... Switch is here: 
00514    virtual double getContentFromSectorLevel( Content con); //d
00515 
00516    // Cell-level value
00517    // ... and some monthly values (for now only irrigation quantity)
00518    virtual double getContentFromCell( int r, int c, Content cont); //d
00519    virtual double getContentFromCell_monthly( int r, int c, int m,Content cont ); //d
00520 
00521         // --------------------------------
00523         // --------------------------------
00524         // If this function is called, it is not yet determine if content is stored at sector
00525    // or at cell level! This function though contains a SWITCH statement which does it.
00526    // Then, either calls "copyContentValueIntoCell" or "copyContentToSector_Double"
00527    // ... later: implement dynamically, 
00528    // ... with lookup vector "vecLevelContentStorage[cont]" gives 0 (cell) or 1 (sector)
00529         virtual void setSpatialInfo_Content(Content cont, Raster2D data_); //d
00530    
00532    virtual void copyContentRaster2Cell(Content cont, Raster2D& gisCont); //d RTA 080724
00533    virtual void copyContentValueIntoCell(int r, int c, Content cont, double value); //d
00534         virtual void copyContentValueIntoCell_monthly(int r, int c, int month, Content cont, double value); //d
00535 
00536    // If contentType is stored at sector level, then this function is called
00537    virtual void setSpatialInfo_Content_Double(Content cont, double value); //d
00538 
00539 
00540 
00541    //Creates files in ASCII-Format, readable by GIS
00542    // from all varabiles defined within this function
00543 
00545         virtual void writeToFileRaster(Content cont);
00546         virtual void writeToFileRaster_monthly(Content cont, int m);
00547 
00548         void writeN_jToFileWithDims(ofstream& out);     
00550    virtual void createRasterFromCell(Content cont, Raster2D& gis);
00551         virtual void createRasterFromCell(Content cont, Raster2D& gis, bool flag_forceToCell);
00552         virtual void createRasterFromCell_monthly(Content cont, Raster2D& gis, int m);
00553 
00554 
00555 };
00556 
00557 
00558 
00559 
00560 #endif
00561 

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