Data related classes, e.g., DataCenter. 更多...

class  ItpWeightData
 Read weight data of each observe stations from database 更多...
 
class  clsReach
 Class to store reach related parameters from REACHES table 更多...
 
class  clsReaches
 Read and store all reaches information as input parameters 更多...
 
class  clsSimpleTxtData< T >
 read string line from text file 更多...
 
class  Subbasin
 Subbasin related parameters and methods. 更多...
 
class  clsSubbasins
 Manager all Subbasin related parameters and methods. 更多...
 
class  DataCenter
 Base class of Data center for SEIMS 更多...
 
class  DataCenterMongoDB
 Class of Data center inherited from DataCenter based on MongoDB 更多...
 
class  InputStation
 HydroClimate sites information 更多...
 
class  Measurement
 Get HydroClimate measurement data from MongoDB 更多...
 
class  NotRegularMeasurement
 Not Regular hydroclimate data 更多...
 
class  ParamInfo< T >
 Class to store and manage parameter information from the parameter database 更多...
 
class  RegularMeasurement
 Regular hydroclimate data, e.g., daily data 更多...
 
class  Settings
 Base class for input or output Settings 更多...
 
class  SettingsInput
 Input settings for SEIMS 更多...
 
struct  OrgOutItem
 Original output item 更多...
 
class  SettingsOutput
 Setting outputs 更多...
 

详细描述

Data related classes, e.g., DataCenter.


类说明

◆ ItpWeightData

class ItpWeightData

Read weight data of each observe stations from database

类 ItpWeightData 继承关系图:
ccgl::Interface

Public 成员函数

 ItpWeightData (MongoGridFs *gfs, const string &filename)
 Overload constructor 更多...
 
 ~ItpWeightData ()
 Destructor
 
void GetWeightData2D (int *n, int *n_stations, FLTPT ***data)
 Get the weight data read from mongoDB in form of 2DArray 更多...
 
void Dump (std::ostream *fs)
 Output the weight data to ostream
 
void Dump (const string &filename)
 Output the weight data to file 更多...
 
bool Initialized ()
 Initialized successful?
 

构造及析构函数说明

◆ ItpWeightData()

ItpWeightData::ItpWeightData ( MongoGridFs gfs,
const string &  filename 
)

Overload constructor

参数
[in]gfsMongoGridFs
[in]filenamefile name

成员函数说明

◆ Dump()

void ItpWeightData::Dump ( const string &  filename)

Output the weight data to file

参数
[in]filenamefile name
参见
Dump(std::ostream *fs)

◆ GetWeightData2D()

void ItpWeightData::GetWeightData2D ( int *  n,
int *  n_stations,
FLTPT ***  data 
)

Get the weight data read from mongoDB in form of 2DArray

参数
[out]nRows
[out]n_stationsCols
[out]datadata

◆ clsReach

class clsReach

Class to store reach related parameters from REACHES table

类 clsReach 继承关系图:
ccgl::Interface

Public 成员函数

 clsReach (const bson_t *&bson_table)
 Constructor
 
 ~clsReach ()
 Destructor
 
FLTPT Get (const string &key)
 Get parameters by name
 
int GetGroupIndex (const string &method, int size)
 Get group index
 
void Set (const string &key, FLTPT value)
 Set parameters by name
 
void SetPositions (IntRaster *mask_raster)
 Set positions according to MASK data
 
void DerivedParameters ()
 Calculate derived parameters after updating the input parameters.
 

◆ clsReaches

class clsReaches

Read and store all reaches information as input parameters

类 clsReaches 继承关系图:
ccgl::Interface

Public 成员函数

 clsReaches (MongoClient *conn, const string &db_name, const string &collection_name, LayeringMethod mtd=UP_DOWN)
 Constructor, query reach table from MongoDB 更多...
 
 ~clsReaches ()
 Destructor
 
clsReachGetReachByID (int id)
 Get single reach information by subbasin ID (1 ~ N)
 
int GetReachNumber () const
 Get reach number
 
void GetReachesSingleProperty (const string &key, FLTPT **data)
 Get 1D array of reach property 更多...
 
vector< vector< int > > & GetUpStreamIDs ()
 Get upstream IDs
 
map< int, int > & GetDownStreamID ()
 Get downstream ID
 
map< int, vector< int > > & GetReachLayers ()
 Get map of reach layers
 
void Update (map< string, ParamInfo< FLTPT > * > &caliparams_map, IntRaster *mask_raster)
 Update reach/channel parameters according to calibration settings
 

构造及析构函数说明

◆ clsReaches()

clsReaches::clsReaches ( MongoClient conn,
const string &  db_name,
const string &  collection_name,
LayeringMethod  mtd = UP_DOWN 
)

Constructor, query reach table from MongoDB

参数
[in]connMongoClient instance
[in]db_nameDatabase name
[in]collection_nameReach collection name
[in]mtdlayering method, the default is UP_DOWN,
参见
LayeringMethod

成员函数说明

◆ GetReachesSingleProperty()

void clsReaches::GetReachesSingleProperty ( const string &  key,
FLTPT **  data 
)

Get 1D array of reach property

参数
[in]keyParameter name
[out]data1D array with length of N+1, the first element is Reach number.

◆ clsSimpleTxtData

class clsSimpleTxtData
template<typename T>
class clsSimpleTxtData< T >

read string line from text file

类 clsSimpleTxtData< T > 继承关系图:
ccgl::Interface

Public 成员函数

 clsSimpleTxtData (const string &filename)
 Constructor, from text file read lines data
 
 ~clsSimpleTxtData ()
 Destructor
 
void GetData (int *n_row, T **data)
 Get line number and data
 
void Dump (std::ostream *fs)
 Output lines data to ostream
 

◆ Subbasin

class Subbasin

Subbasin related parameters and methods.

Changelog:

  • 1. Remove isOutput, since the output is handled in printInfo class
  • 2. Add soil water balance related. 2016-7-28
类 Subbasin 继承关系图:
ccgl::Interface

Public 成员函数

 Subbasin (int id)
 Constructor 更多...
 
 ~Subbasin ()
 Destructor
 
bool CheckInputSize (int n)
 Check input size
 
void SetCellList (int n_cells, int *cells)
 Set cell index list, as well as subbasin area
 
void SetArea (const FLTPT area)
 area of subbasin
 
void SetSlope (const FLTPT slp)
 average slope (%)
 
void SetSlope (FLTPT *slope)
 Set slope of current subbasin as the average of all cells
 
void SetSlopeCoefofBasin (const FLTPT slope_basin)
 Set slope correction factor of current subbasin
 
void SetPet (const FLTPT pet)
 pet
 
void SetPerco (const FLTPT perco)
 Set average percolation (mm)
 
void SetPerde (const FLTPT perde)
 Set average deep percolation (mm)
 
void SetEg (const FLTPT eg)
 groundwater revaporization
 
void SetGw (const FLTPT gw)
 Set groundwater storage
 
void SetQg (const FLTPT qg)
 Set groundwater discharge
 
void SetRg (const FLTPT rg)
 Set groundwater runoff
 
void SetIsRevapChanged (const bool isrevap)
 Is revap changed
 
int GetId ()
 Get subbasin ID
 
int GetCellCount ()
 Get valid cells number
 
int * GetCells ()
 Get index of valid cells
 
bool GetIsOutput ()
 Get the output flag (true mean output), the function will be deprecated. By LJ
 
FLTPT GetArea ()
 area of subbasin
 
bool GetIsRevapChanged ()
 Get the Revap change flat (true mean changed from last time step)
 
FLTPT GetPet ()
 Get average PET
 
FLTPT GetPerco ()
 Get average percolation (mm)
 
FLTPT GetPerde ()
 Get average deep percolation (mm)
 
FLTPT GetSlope ()
 Get average slope (%)
 
FLTPT GetSlopeCoef ()
 Get slope coefficient of basin
 
FLTPT GetEg ()
 groundwater revaporization
 
FLTPT GetGw ()
 Get groundwater storage
 
FLTPT GetQg ()
 Get groundwater discharge
 
FLTPT GetRg ()
 Get groundwater runoff
 

构造及析构函数说明

◆ Subbasin()

Subbasin::Subbasin ( int  id)
explicit

Constructor

参数
[in]idSubbasin ID

◆ clsSubbasins

class clsSubbasins

Manager all Subbasin related parameters and methods.

类 clsSubbasins 继承关系图:
ccgl::Interface

Public 成员函数

 clsSubbasins (map< string, IntRaster * > &rs_int_map, map< string, FloatRaster * > &rs_map, int prefix_id)
 Constructor 更多...
 
 ~clsSubbasins ()
 Destructor
 
SubbasinGetSubbasinByID (const int id)
 Get single reach information by subbasin ID
 
int GetSubbasinNumber ()
 Get subbasin number
 
vector< int > & GetSubbasinIDs ()
 Get subbasin IDs
 
map< int, Subbasin * > & GetSubbasinObjects ()
 Get map of subbasin objects
 
void SetSlopeCoefficient (FLTPT *rs_slope)
 Set slope coefficient for each subbasin according to the basin slope 更多...
 
FLTPT Subbasin2Basin (const string &key)
 Get basin (watershed) scale variable (key) value 更多...
 

静态 Public 成员函数

static clsSubbasinsInit (map< string, IntRaster * > &rs_int_map, map< string, FloatRaster * > &rs_map, int prefix_id)
 Check input parameters to ensure the successful constructor
 

构造及析构函数说明

◆ clsSubbasins()

clsSubbasins::clsSubbasins ( map< string, IntRaster * > &  rs_int_map,
map< string, FloatRaster * > &  rs_map,
int  prefix_id 
)

Constructor

Query and constructor basic subbasin's information from MongoDB

参数
[in]rs_mapMap of rasters that have been loaded
[in]rs_int_mapMap of integer rasters that have been loaded
[in]prefix_idsubbasin ID as prefix in MongoDB

成员函数说明

◆ SetSlopeCoefficient()

void clsSubbasins::SetSlopeCoefficient ( FLTPT *  rs_slope)

Set slope coefficient for each subbasin according to the basin slope

待办事项:
This function will set slope_coef_ to 1.f in MPI version. Currently, the real slope_coef_ is calculated in seims_mpi/CalculateProcess.cpp/line 77~. In the future, we should think of an elegant way to deal with this issue. By lj. 06/28/18

◆ Subbasin2Basin()

FLTPT clsSubbasins::Subbasin2Basin ( const string &  key)

Get basin (watershed) scale variable (key) value

参数
[in]keyVariable name which is defined in text.h

◆ DataCenter

class DataCenter

Base class of Data center for SEIMS

版本
1.3
类 DataCenter 继承关系图:
ccgl::Interface DataCenterMongoDB

Public 成员函数

 DataCenter (InputArgs *input_args, ModuleFactory *factory, int subbasin_id=0)
 Constructor 更多...
 
 ~DataCenter ()
 Destructor
 
virtual bool CheckModelPreparedData ()=0
 Make sure all the required data are presented
 
virtual void ReadClimateSiteList ()=0
 Read climate site data
 
virtual bool ReadParametersInDB ()=0
 Read initial and calibrated parameters 更多...
 
virtual int ReadIntParameterInDB (const char *param_name)=0
 Get subbasin number and outlet ID
 
void DumpCaliParametersInDB ()
 Output calibrated parameters to txt file
 
virtual bool ReadRasterData (const string &remote_filename, FloatRaster *&flt_rst)=0
 Read raster data, both 1D and 2D, and insert to m_rsMap 更多...
 
virtual bool ReadRasterData (const string &remote_filename, IntRaster *&int_rst)=0
 Read raster data, both 1D and 2D, and insert to m_rsMap 更多...
 
virtual void ReadItpWeightData (const string &remote_filename, int &num, int &stations, FLTPT **&data)=0
 Read interpolated weight data and insert to m_weightDataMap 更多...
 
virtual void Read1DArrayData (const string &remote_filename, int &num, FLTPT *&data)=0
 Read 1D array data 更多...
 
virtual void Read1DArrayData (const string &remote_filename, int &num, int *&data)=0
 Read 1D integer array data 更多...
 
virtual void Read2DArrayData (const string &remote_filename, int &rows, int &cols, FLTPT **&data)=0
 Read 2D array data and insert to array2d_map_ 更多...
 
virtual void ReadIuhData (const string &remote_filename, int &n, FLTPT **&data)=0
 Read IUH data and insert to m_2DArrayMap 更多...
 
virtual void SetLapseData (const string &remote_filename, int &rows, int &cols, FLTPT **&data)
 Make lapse 2D array data and insert to m_2DArrayMap 更多...
 
virtual bool SetRasterForScenario ()=0
 Set Raster data for Scenario data 更多...
 
bool CheckAdjustment (const string &para_name)
 Check out whether the adjustment is needed. 更多...
 
void LoadAdjustRasterData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D/2D raster data from Database. 更多...
 
void LoadAdjustIntRasterData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D/2D integer raster data from Database. 更多...
 
void LoadAdjust1DArrayData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D array data from Database. 更多...
 
void LoadAdjust2DArrayData (const string &para_name, const string &remote_filename)
 Read and adjust (if necessary) 2D array data from Database. 更多...
 
double LoadParametersForModules (vector< SimulationModule * > &modules)
 Load data for each module, return time span
 
void SetData (SEIMSModuleSetting *setting, ParamInfo< FLTPT > *param, SimulationModule *p_module)
 Set data for modules, include all datatype
 
void SetData (SEIMSModuleSetting *setting, ParamInfo< int > *param, SimulationModule *p_module)
 Set integer data for modules, include all datatype
 
void SetValue (ParamInfo< FLTPT > *param, SimulationModule *p_module)
 Set single Value
 
void SetValue (ParamInfo< int > *param, SimulationModule *p_module)
 Set single integer Value
 
void Set1DData (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set 1D Data
 
void Set2DData (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set 2D Data
 
void SetRaster (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set raster data
 
void SetScenario (SimulationModule *p_module, bool is_optional=false)
 Set BMPs Scenario data
 
void SetReaches (SimulationModule *p_module)
 Set Reaches information
 
void SetSubbasins (SimulationModule *p_module)
 Set Subbasins information
 
void UpdateInput (vector< SimulationModule * > &modules, time_t t)
 Update inputs, such climate data.
 
void UpdateScenarioParametersStable (int subbsn_id)
 Update model parameters (value, 1D raster, and 2D raster, etc.) by Scenario, e.g., areal BMPs. 更多...
 
virtual bool GetFileInStringVector ()
 Get file.in configuration
 
virtual bool GetFileOutVector ()=0
 Get file.out configuration
 
void UpdateOutputDate (time_t start_time, time_t end_time)
 Check date of output settings
 

Protected 属性

string model_name_
 Model name, e.g., model_dianbu30m_longterm
 
const string model_path_
 Model path
 
string file_in_file_
 file.in full path
 
string file_out_file_
 file.out full path
 
string file_cfg_file_
 config.fig full path
 
const LayeringMethod lyr_method_
 Layering method
 
const FlowDirMethod fdir_method_
 Flow direction method
 
const int subbasin_id_
 Subbasin ID
 
const int scenario_id_
 Scenario ID
 
const int calibration_id_
 Calibration ID
 
const int mpi_rank_
 Rank ID for MPI, starts from 0 to mpi_size_ - 1
 
const int mpi_size_
 Rank size for MPI
 
const int thread_num_
 Thread number for OpenMP
 
bool use_scenario_
 Model Scenario
 
string output_path_
 Output path (with / in the end) according to m_outputScene
 
vector< string > file_in_strs_
 file.in configuration
 
vector< OrgOutItemorigin_out_items_
 file.out configuration
 
string model_mode_
 Storm or Longterm model
 
int n_subbasins_
 Number of subbasins
 
int outlet_id_
 Outlet subbasin ID
 
ModuleFactoryfactory_
 Module factory
 
SettingsInputinput_
 The basic input settings
 
SettingsOutputoutput_
 The user-defined outputs, Q, SED, etc
 
InputStationclim_station_
 data of input HydroClimate stations
 
Scenarioscenario_
 BMPs Scenario data
 
clsReachesreaches_
 Reaches information
 
clsSubbasinssubbasins_
 Subbasins information
 
IntRastermask_raster_
 Mask data
 
map< string, FloatRaster * > rs_map_
 Map of spatial data, both 1D and 2D
 
map< string, IntRaster * > rs_int_map_
 Map of spatial data with integer, both 1D and 2D
 
map< string, ParamInfo< FLTPT > * > init_params_
 reach depth data,every cell has a depth 更多...
 
map< string, ParamInfo< int > * > init_params_int_
 Store integer parameters from Database (PARAMETERS collection)
 
map< string, FLTPT * > array1d_map_
 1D array data map
 
map< string, int > array1d_len_map_
 1D array data length map
 
map< string, FLTPT ** > array2d_map_
 2D array data map
 
map< string, int > array2d_rows_map_
 Row number of 2D array data map
 
map< string, int > array2d_cols_map_
 Col number of 2D array data map CAUTION that nCols may not same for all rows
 
map< string, int * > array1d_int_map_
 1D integer array data map
 
map< string, int > array1d_int_len_map_
 1D integer array data length map
 
map< string, int ** > array2d_int_map_
 2D integer array data map, e.g. FLOWIN_INDEX, FLOWOUT_INDEX, ROUTING_LAYERS
 
map< string, int > array2d_int_rows_map_
 Row number of 2D array data map
 
map< string, int > array2d_int_cols_map_
 Col number of 2D array data map CAUTION that nCols may not same for all rows
 

构造及析构函数说明

◆ DataCenter()

DataCenter::DataCenter ( InputArgs input_args,
ModuleFactory factory,
int  subbasin_id = 0 
)

Constructor

参数
[in]input_argsInput arguments of SEIMS
[in]factorySEIMS modules factory
[in]subbasin_idSubbasin ID, 0 is the default for entire watershed

成员函数说明

◆ CheckAdjustment()

bool DataCenter::CheckAdjustment ( const string &  para_name)

Check out whether the adjustment is needed.

参数
[in]para_nameParameter name which may match one of the parameters in init_params_.

◆ LoadAdjust1DArrayData()

void DataCenter::LoadAdjust1DArrayData ( const string &  para_name,
const string &  remote_filename,
bool  is_optional = false 
)

Read and adjust (if necessary) 1D array data from Database.

Currently, there may no parameters are allowed to be adjusted.

参数
[in]para_nameParameter name
[in]remote_filenameActual file/data name stored in Database
[in]is_optionalOptional parameters won't raise exception when loaded failed

◆ LoadAdjust2DArrayData()

void DataCenter::LoadAdjust2DArrayData ( const string &  para_name,
const string &  remote_filename 
)

Read and adjust (if necessary) 2D array data from Database.

Currently, there may no parameters are allowed to be adjusted.

参数
[in]para_nameParameter name
[in]remote_filenameActual file/data name stored in Database

◆ LoadAdjustIntRasterData()

void DataCenter::LoadAdjustIntRasterData ( const string &  para_name,
const string &  remote_filename,
bool  is_optional = false 
)

Read and adjust (if necessary) 1D/2D integer raster data from Database.

参数
[in]para_nameParameter name, e.g., Landuse
[in]remote_filenameActual file/data name stored in Database, e.g., 0_LANDUSE
[in]is_optionalOptional parameters won't raise exception when loaded failed

◆ LoadAdjustRasterData()

void DataCenter::LoadAdjustRasterData ( const string &  para_name,
const string &  remote_filename,
bool  is_optional = false 
)

Read and adjust (if necessary) 1D/2D raster data from Database.

参数
[in]para_nameParameter name, e.g., Slope
[in]remote_filenameActual file/data name stored in Database, e.g., 0_SLOPE
[in]is_optionalOptional parameters won't raise exception when loaded failed

◆ Read1DArrayData() [1/2]

virtual void DataCenter::Read1DArrayData ( const string &  remote_filename,
int &  num,
FLTPT *&  data 
)
pure virtual

Read 1D array data

参数
[in]remote_filenameData file name
[out]numData length
[out]datareturned data

DataCenterMongoDB 内被实现.

◆ Read1DArrayData() [2/2]

virtual void DataCenter::Read1DArrayData ( const string &  remote_filename,
int &  num,
int *&  data 
)
pure virtual

Read 1D integer array data

参数
[in]remote_filenameData file name
[out]numData length
[out]datareturned integer data

DataCenterMongoDB 内被实现.

◆ Read2DArrayData()

virtual void DataCenter::Read2DArrayData ( const string &  remote_filename,
int &  rows,
int &  cols,
FLTPT **&  data 
)
pure virtual

Read 2D array data and insert to array2d_map_

The matrix format is as follows:
5 (Row number)
RowIdx 0 1 2 3 4 (ColIdx)
0 1 9.
1 2 8. 1.
2 2 5. 2.
3 1 2.
4 4 2. 5. 1. 8.
i.e., the first element in each row is the valid number of the current row.

参数
[in]remote_filenamedata file name
[out]rowsfirst dimension of the 2D Array, i.e., Rows
[out]colssecond dimension of the 2D Array, i.e., Cols. If each col are different, set cols to 1.
[out]datareturned data

DataCenterMongoDB 内被实现.

◆ ReadItpWeightData()

virtual void DataCenter::ReadItpWeightData ( const string &  remote_filename,
int &  num,
int &  stations,
FLTPT **&  data 
)
pure virtual

Read interpolated weight data and insert to m_weightDataMap

参数
[in]remote_filenameData file name
[out]numData length
[out]stationsNumber of stations
[out]datareturned data

DataCenterMongoDB 内被实现.

◆ ReadIuhData()

virtual void DataCenter::ReadIuhData ( const string &  remote_filename,
int &  n,
FLTPT **&  data 
)
pure virtual

Read IUH data and insert to m_2DArrayMap

参数
[in]remote_filenamedata file name
[out]nvalid cell number
[out]datareturned data

DataCenterMongoDB 内被实现.

◆ ReadParametersInDB()

virtual bool DataCenter::ReadParametersInDB ( )
pure virtual

Read initial and calibrated parameters

待办事项:
Should initial parameters in DB separate integer or floating point number?

DataCenterMongoDB 内被实现.

◆ ReadRasterData() [1/2]

virtual bool DataCenter::ReadRasterData ( const string &  remote_filename,
FloatRaster *&  flt_rst 
)
pure virtual

Read raster data, both 1D and 2D, and insert to m_rsMap

参数
[in]remote_filenameRaster file name.
[in]flt_rstFloat raster data

DataCenterMongoDB 内被实现.

◆ ReadRasterData() [2/2]

virtual bool DataCenter::ReadRasterData ( const string &  remote_filename,
IntRaster *&  int_rst 
)
pure virtual

Read raster data, both 1D and 2D, and insert to m_rsMap

参数
[in]remote_filenameRaster file name.
[in]int_rstInteger raster data

DataCenterMongoDB 内被实现.

◆ SetLapseData()

virtual void DataCenter::SetLapseData ( const string &  remote_filename,
int &  rows,
int &  cols,
FLTPT **&  data 
)
virtual

Make lapse 2D array data and insert to m_2DArrayMap

参数
[in]remote_filenamedata file name
[out]rowsfirst dimension of the 2D Array, i.e., Rows
[out]colssecond dimension of the 2D Array, i.e., Cols
[out]datareturned data

◆ SetRasterForScenario()

virtual bool DataCenter::SetRasterForScenario ( )
pure virtual

Set Raster data for Scenario data

返回
True if set successfully, otherwise false.

DataCenterMongoDB 内被实现.

◆ UpdateScenarioParametersStable()

void DataCenter::UpdateScenarioParametersStable ( int  subbsn_id)

Update model parameters (value, 1D raster, and 2D raster, etc.) by Scenario, e.g., areal BMPs.

changelog:

  • 1. Added by Huiran GAO, Feb. 2017
  • 2. Redesigned by Liangjun Zhu, 08/16/17
  • 3. Add time parameter by Shen Shen, Feb. 2021
参见
BMPArealStructFactory
BMPArealStruct

类成员变量说明

◆ init_params_

map<string, ParamInfo<FLTPT>*> DataCenter::init_params_
protected

reach depth data,every cell has a depth

Store parameters from Database (PARAMETERS collection)

◆ DataCenterMongoDB

class DataCenterMongoDB

Class of Data center inherited from DataCenter based on MongoDB

版本
1.3
类 DataCenterMongoDB 继承关系图:
DataCenter ccgl::Interface

Public 成员函数

 DataCenterMongoDB (InputArgs *input_args, MongoClient *client, MongoGridFs *spatial_gfs_in, MongoGridFs *spatial_gfs_out, ModuleFactory *factory, int subbasin_id=0)
 Constructor based on MongoDB 更多...
 
 ~DataCenterMongoDB ()
 Destructor
 
bool CheckModelPreparedData () OVERRIDE
 Make sure all the required data are presented
 
bool GetFileInStringVector () OVERRIDE
 Get file.in configuration from FILE_IN collection
 
bool GetFileOutVector () OVERRIDE
 Get file.out configuration
 
void ReadClimateSiteList () OVERRIDE
 Read climate site data from HydroClimate database
 
bool ReadParametersInDB () OVERRIDE
 Read initial and calibrated parameters 更多...
 
int ReadIntParameterInDB (const char *param_name) OVERRIDE
 Get subbasin number and outlet ID
 
bool ReadRasterData (const string &remote_filename, FloatRaster *&flt_rst) OVERRIDE
 Read raster data, both 1D and 2D, and insert to m_rsMap 更多...
 
bool ReadRasterData (const string &remote_filename, IntRaster *&int_rst) OVERRIDE
 Read raster data, both 1D and 2D, and insert to m_rsMap 更多...
 
void ReadItpWeightData (const string &remote_filename, int &num, int &stations, FLTPT **&data) OVERRIDE
 Read interpolated weight data from MongoDB and insert to m_weightDataMap 更多...
 
void Read1DArrayData (const string &remote_filename, int &num, FLTPT *&data) OVERRIDE
 Read 1D array data from MongoDB and insert to m_1DArrayMap CAUTION: Value data type stored in MongoDB MUST be float 更多...
 
void Read1DArrayData (const string &remote_filename, int &num, int *&data) OVERRIDE
 Read 1D integer array data from MongoDB and insert to m_1DArrayMap CAUTION: Value data type stored in MongoDB MUST be float TODO: data stored in MongoDB should have an attribute to indicate data type! 更多...
 
void Read2DArrayData (const string &remote_filename, int &rows, int &cols, FLTPT **&data) OVERRIDE
 Read 2D array data from MongoDB database 更多...
 
void ReadIuhData (const string &remote_filename, int &n, FLTPT **&data) OVERRIDE
 Read IUH data from MongoDB and insert to m_2DArrayMap 更多...
 
bool SetRasterForScenario () OVERRIDE
 Set Raster data for Scenario data 更多...
 
string QueryDatabaseName (bson_t *query, const char *tabname)
 Query database name
 
- Public 成员函数 继承自 DataCenter
 DataCenter (InputArgs *input_args, ModuleFactory *factory, int subbasin_id=0)
 Constructor 更多...
 
 ~DataCenter ()
 Destructor
 
void DumpCaliParametersInDB ()
 Output calibrated parameters to txt file
 
virtual void SetLapseData (const string &remote_filename, int &rows, int &cols, FLTPT **&data)
 Make lapse 2D array data and insert to m_2DArrayMap 更多...
 
bool CheckAdjustment (const string &para_name)
 Check out whether the adjustment is needed. 更多...
 
void LoadAdjustRasterData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D/2D raster data from Database. 更多...
 
void LoadAdjustIntRasterData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D/2D integer raster data from Database. 更多...
 
void LoadAdjust1DArrayData (const string &para_name, const string &remote_filename, bool is_optional=false)
 Read and adjust (if necessary) 1D array data from Database. 更多...
 
void LoadAdjust2DArrayData (const string &para_name, const string &remote_filename)
 Read and adjust (if necessary) 2D array data from Database. 更多...
 
double LoadParametersForModules (vector< SimulationModule * > &modules)
 Load data for each module, return time span
 
void SetData (SEIMSModuleSetting *setting, ParamInfo< FLTPT > *param, SimulationModule *p_module)
 Set data for modules, include all datatype
 
void SetData (SEIMSModuleSetting *setting, ParamInfo< int > *param, SimulationModule *p_module)
 Set integer data for modules, include all datatype
 
void SetValue (ParamInfo< FLTPT > *param, SimulationModule *p_module)
 Set single Value
 
void SetValue (ParamInfo< int > *param, SimulationModule *p_module)
 Set single integer Value
 
void Set1DData (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set 1D Data
 
void Set2DData (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set 2D Data
 
void SetRaster (const string &para_name, const string &remote_filename, SimulationModule *p_module, bool is_optional=false)
 Set raster data
 
void SetScenario (SimulationModule *p_module, bool is_optional=false)
 Set BMPs Scenario data
 
void SetReaches (SimulationModule *p_module)
 Set Reaches information
 
void SetSubbasins (SimulationModule *p_module)
 Set Subbasins information
 
void UpdateInput (vector< SimulationModule * > &modules, time_t t)
 Update inputs, such climate data.
 
void UpdateScenarioParametersStable (int subbsn_id)
 Update model parameters (value, 1D raster, and 2D raster, etc.) by Scenario, e.g., areal BMPs. 更多...
 
void UpdateOutputDate (time_t start_time, time_t end_time)
 Check date of output settings
 

额外继承的成员函数

- Protected 属性 继承自 DataCenter
string model_name_
 Model name, e.g., model_dianbu30m_longterm
 
const string model_path_
 Model path
 
string file_in_file_
 file.in full path
 
string file_out_file_
 file.out full path
 
string file_cfg_file_
 config.fig full path
 
const LayeringMethod lyr_method_
 Layering method
 
const FlowDirMethod fdir_method_
 Flow direction method
 
const int subbasin_id_
 Subbasin ID
 
const int scenario_id_
 Scenario ID
 
const int calibration_id_
 Calibration ID
 
const int mpi_rank_
 Rank ID for MPI, starts from 0 to mpi_size_ - 1
 
const int mpi_size_
 Rank size for MPI
 
const int thread_num_
 Thread number for OpenMP
 
bool use_scenario_
 Model Scenario
 
string output_path_
 Output path (with / in the end) according to m_outputScene
 
vector< string > file_in_strs_
 file.in configuration
 
vector< OrgOutItemorigin_out_items_
 file.out configuration
 
string model_mode_
 Storm or Longterm model
 
int n_subbasins_
 Number of subbasins
 
int outlet_id_
 Outlet subbasin ID
 
ModuleFactoryfactory_
 Module factory
 
SettingsInputinput_
 The basic input settings
 
SettingsOutputoutput_
 The user-defined outputs, Q, SED, etc
 
InputStationclim_station_
 data of input HydroClimate stations
 
Scenarioscenario_
 BMPs Scenario data
 
clsReachesreaches_
 Reaches information
 
clsSubbasinssubbasins_
 Subbasins information
 
IntRastermask_raster_
 Mask data
 
map< string, FloatRaster * > rs_map_
 Map of spatial data, both 1D and 2D
 
map< string, IntRaster * > rs_int_map_
 Map of spatial data with integer, both 1D and 2D
 
map< string, ParamInfo< FLTPT > * > init_params_
 reach depth data,every cell has a depth 更多...
 
map< string, ParamInfo< int > * > init_params_int_
 Store integer parameters from Database (PARAMETERS collection)
 
map< string, FLTPT * > array1d_map_
 1D array data map
 
map< string, int > array1d_len_map_
 1D array data length map
 
map< string, FLTPT ** > array2d_map_
 2D array data map
 
map< string, int > array2d_rows_map_
 Row number of 2D array data map
 
map< string, int > array2d_cols_map_
 Col number of 2D array data map CAUTION that nCols may not same for all rows
 
map< string, int * > array1d_int_map_
 1D integer array data map
 
map< string, int > array1d_int_len_map_
 1D integer array data length map
 
map< string, int ** > array2d_int_map_
 2D integer array data map, e.g. FLOWIN_INDEX, FLOWOUT_INDEX, ROUTING_LAYERS
 
map< string, int > array2d_int_rows_map_
 Row number of 2D array data map
 
map< string, int > array2d_int_cols_map_
 Col number of 2D array data map CAUTION that nCols may not same for all rows
 

构造及析构函数说明

◆ DataCenterMongoDB()

DataCenterMongoDB::DataCenterMongoDB ( InputArgs input_args,
MongoClient client,
MongoGridFs spatial_gfs_in,
MongoGridFs spatial_gfs_out,
ModuleFactory factory,
int  subbasin_id = 0 
)

Constructor based on MongoDB

参数
[in]input_argsInput arguments of SEIMS
[in]clientMongoDB connection client
[in]spatial_gfs_inMongoDB GridFS that stores input data
[in]spatial_gfs_outMongoDB GridFS that stores output data
[in]factorySEIMS modules factory
[in]subbasin_idSubbasin ID, 0 is the default for entire watershed

成员函数说明

◆ Read1DArrayData() [1/2]

void DataCenterMongoDB::Read1DArrayData ( const string &  remote_filename,
int &  num,
FLTPT *&  data 
)
virtual

Read 1D array data from MongoDB and insert to m_1DArrayMap CAUTION: Value data type stored in MongoDB MUST be float

参数
[in]remote_filenamestring data file name
[out]numint&, data length
[out]datafloat*&, returned data

实现了 DataCenter.

◆ Read1DArrayData() [2/2]

void DataCenterMongoDB::Read1DArrayData ( const string &  remote_filename,
int &  num,
int *&  data 
)
virtual

Read 1D integer array data from MongoDB and insert to m_1DArrayMap CAUTION: Value data type stored in MongoDB MUST be float TODO: data stored in MongoDB should have an attribute to indicate data type!

参数
[in]remote_filenamestring data file name
[out]numint&, data length
[out]dataint*&, returned data

实现了 DataCenter.

◆ Read2DArrayData()

void DataCenterMongoDB::Read2DArrayData ( const string &  remote_filename,
int &  rows,
int &  cols,
FLTPT **&  data 
)
virtual

Read 2D array data from MongoDB database

参数
[in]remote_filenamestring data file name
[out]rowsint&, first dimension of the 2D Array, i.e., Rows
[out]colsint&, second dimension of the 2D Array, i.e., Cols. If each col are different, set cols to 1.
[out]datafloat**&, returned data

实现了 DataCenter.

◆ ReadItpWeightData()

void DataCenterMongoDB::ReadItpWeightData ( const string &  remote_filename,
int &  num,
int &  stations,
FLTPT **&  data 
)
virtual

Read interpolated weight data from MongoDB and insert to m_weightDataMap

参数
[in]remote_filenamestring data file name
[out]numint&, data length
[out]stationsint& number of stations
[out]datafloat*&, returned data

实现了 DataCenter.

◆ ReadIuhData()

void DataCenterMongoDB::ReadIuhData ( const string &  remote_filename,
int &  n,
FLTPT **&  data 
)
virtual

Read IUH data from MongoDB and insert to m_2DArrayMap

参数
[in]remote_filenamestring data file name
[out]nint&, valid cell number
[out]datafloat*&, returned data

实现了 DataCenter.

◆ ReadParametersInDB()

bool DataCenterMongoDB::ReadParametersInDB ( )
virtual

Read initial and calibrated parameters

Changlog:

  • 1. 2017-12-23 - lj - Read parameters (Impact value) according to calibration ID.

实现了 DataCenter.

◆ ReadRasterData() [1/2]

bool DataCenterMongoDB::ReadRasterData ( const string &  remote_filename,
FloatRaster *&  flt_rst 
)
virtual

Read raster data, both 1D and 2D, and insert to m_rsMap

参数
[in]remote_filenameRaster file name.
[in]flt_rstFloat raster data

实现了 DataCenter.

◆ ReadRasterData() [2/2]

bool DataCenterMongoDB::ReadRasterData ( const string &  remote_filename,
IntRaster *&  int_rst 
)
virtual

Read raster data, both 1D and 2D, and insert to m_rsMap

参数
[in]remote_filenameRaster file name.
[in]int_rstFloat raster data

实现了 DataCenter.

◆ SetRasterForScenario()

bool DataCenterMongoDB::SetRasterForScenario ( )
virtual

Set Raster data for Scenario data

返回
True if set successfully, otherwise false.

实现了 DataCenter.

◆ InputStation

class InputStation

HydroClimate sites information

类 InputStation 继承关系图:
ccgl::Interface

Public 成员函数

 InputStation (MongoClient *conn, time_t dtHillslope, time_t dtChannel)
 Constructor
 
 ~InputStation ()
 Destructor
 
bool NumberOfSites (const char *site_type, int &site_count)
 Get site number of given site type
 
bool GetElevation (const char *site_type, FLTPT *&site_elevs)
 Get elevations of given site type
 
bool GetLatitude (const char *site_type, FLTPT *&site_lats)
 Get latitudes of given site type
 
void GetTimeSeriesData (time_t time, const string &type, int *nRow, FLTPT **data)
 Get time series data 更多...
 
void ReadSitesData (const string &hydroDBName, const string &sitesList, const string &siteType, time_t startDate, time_t endDate, bool stormMode=false)
 Read data of each site type 更多...
 

成员函数说明

◆ GetTimeSeriesData()

void InputStation::GetTimeSeriesData ( time_t  time,
const string &  type,
int *  nRow,
FLTPT **  data 
)

Get time series data

参数
[in]timedata time
[in]typedata type
[out]nRowdata item number
[out]datatime series data

◆ ReadSitesData()

void InputStation::ReadSitesData ( const string &  hydroDBName,
const string &  sitesList,
const string &  siteType,
time_t  startDate,
time_t  endDate,
bool  stormMode = false 
)

Read data of each site type

参数
[in]hydroDBNameHydroClimate database which contains "DataValues" collection
[in]sitesListstring, site ID string derived from model database (e.g., model_dianbu30m_longterm)
[in]siteTypesite type
[in]startDatestart date
[in]endDateend date
[in]stormModebool, false by default

◆ Measurement

class Measurement

Get HydroClimate measurement data from MongoDB

类 Measurement 继承关系图:
ccgl::Interface NotRegularMeasurement RegularMeasurement

Public 成员函数

 Measurement (MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime)
 Initialize Measurement instance from MongoDB 更多...
 
 ~Measurement ()
 Destructor
 
virtual FLTPT * GetSiteDataByTime (time_t t)=0
 Get site data by time
 
int NumberOfSites () const
 Get Number of site
 
string Type () const
 Get HydroClimate site type, "M" or "P"
 
time_t StartTime () const
 start time
 
time_t EndTime () const
 end time
 

Protected 属性

MongoClientm_conn
 MongoDB client object
 
string m_hydroDBName
 HydroClimate database name
 
vector< int > m_siteIDList
 Site IDs list
 
string m_type
 Site type, M means meteorology, and P means precipitation
 
time_t m_startTime
 Start time
 
time_t m_endTime
 End time
 
FLTPT * pData
 Measurement data of all sites in given date
 

构造及析构函数说明

◆ Measurement()

Measurement::Measurement ( MongoClient conn,
const string &  hydroDBName,
const string &  sitesList,
const string &  siteType,
time_t  startTime,
time_t  endTime 
)

Initialize Measurement instance from MongoDB

参数
[in]connMongoClient, MongoDB client
[in]hydroDBNamestring, HydroClimate database name
[in]sitesListstring, sites list
[in]siteTypestring, sites type
[in]startTimetime_t, start date time
[in]endTimetime_t, end date time

◆ NotRegularMeasurement

class NotRegularMeasurement

Not Regular hydroclimate data

类 NotRegularMeasurement 继承关系图:
Measurement ccgl::Interface

Public 成员函数

 NotRegularMeasurement (MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime)
 Constructor 更多...
 
FLTPT * GetSiteDataByTime (time_t t) OVERRIDE
 Get site date by time pData
 
- Public 成员函数 继承自 Measurement
 Measurement (MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime)
 Initialize Measurement instance from MongoDB 更多...
 
 ~Measurement ()
 Destructor
 
int NumberOfSites () const
 Get Number of site
 
string Type () const
 Get HydroClimate site type, "M" or "P"
 
time_t StartTime () const
 start time
 
time_t EndTime () const
 end time
 

额外继承的成员函数

- Protected 属性 继承自 Measurement
MongoClientm_conn
 MongoDB client object
 
string m_hydroDBName
 HydroClimate database name
 
vector< int > m_siteIDList
 Site IDs list
 
string m_type
 Site type, M means meteorology, and P means precipitation
 
time_t m_startTime
 Start time
 
time_t m_endTime
 End time
 
FLTPT * pData
 Measurement data of all sites in given date
 

构造及析构函数说明

◆ NotRegularMeasurement()

NotRegularMeasurement::NotRegularMeasurement ( MongoClient conn,
const string &  hydroDBName,
const string &  sitesList,
const string &  siteType,
time_t  startTime,
time_t  endTime 
)

Constructor

Initialize NotRegular Measurement instance from MongoDB

参数
[in]connMongoClient, MongoDB client
[in]hydroDBNamestring, HydroClimate database name
[in]sitesListstring, site list
[in]siteTypestring, site type
[in]startTimetime_t, start date time
[in]endTimetime_t, end date time

◆ ParamInfo

class ParamInfo
template<typename T>
class ParamInfo< T >

Class to store and manage parameter information from the parameter database

Public 成员函数

 ParamInfo ()
 Construct an empty instance.
 
 ParamInfo (string &name, string &desc, string &unit, string &mid, T value, string &change, T impact, T maximum, T minimum, bool isint)
 Construct for initial parameters from DB
 
 ParamInfo (string &name, string &basicname, string &desc, string &unit, string &source, string &mid, dimensionTypes dim, string &climtype, T value=0)
 Construct for module Parameter
 
 ParamInfo (string &name, string &basicname, string &desc, string &unit, string &source, string &mid, dimensionTypes dim, transferTypes tftype, string &climtype, bool isconst, bool isoutput)
 Construct for module Input, Output, and InOutput
 
 ParamInfo (const ParamInfo &another)
 Copy constructor
 
 ~ParamInfo ()
 Destructor
 
GetAdjustedValue (T pre_value=NODATA_VALUE)
 Return the adjusted value for this parameter 更多...
 
GetAdjustedValueWithImpactIndexes (T pre_value, int curImpactIndex)
 Adjust value with indexed impact 更多...
 
void Adjust1DArray (int n, T *data)
 Adjust 1D array 更多...
 
void Adjust1DRaster (int n, T *data)
 Adjust 1D Raster, 更多...
 
int Adjust1DRaster (int n, T *data, const int *units, const vector< int > &selunits, const int *lu, const vector< int > &sellu)
 Adjust 1D Raster on selected area 更多...
 
int Adjust1DRasterWithImpactIndexes (int n, T *data, const int *units, const vector< int > &selunits, const map< int, int > &impactIndexes, const int *lu, const vector< int > &sellu)
 Adjust 1D Raster on selected area, using impact index version 更多...
 
void Adjust2DArray (int n, T **data)
 Adjust 2D array
 
void Adjust2DRaster (int n, int lyrs, T **data)
 Adjust 2D Raster
 
int Adjust2DRaster (int n, int lyrs, T **data, const int *units, const vector< int > &selunits, const int *lu, const vector< int > &sellu)
 Adjust 1D Raster on selected area
 
int Adjust2DRasterWithImpactIndexes (int n, int lyrs, T **data, const int *units, const vector< int > &selunits, const map< int, int > &impactIndexes, const int *lu, const vector< int > &sellu)
 Adjust 2D Raster on selected area, using impact index version
 

Public 属性

string Name
 Name
 
string BasicName
 Basic name
 
string Description
 Description
 
string Units
 Units
 
string Source
 Source, to identify which the parameters can be derived
 
string ModuleID
 Used by Module Ids
 
dimensionTypes Dimension
 Data dimension type
 
transferTypes Transfer
 Data transfer type
 
Value
 Value
 
string Change
 Change type
 
Impact
 Impact value
 
Maximum
 Absolute maximum value
 
Minimum
 Absolute minimum value
 
bool IsInteger
 is integer?
 
ParamInfoDependPara
 Dependence parameters
 
string ClimateType
 Climate type
 
bool IsConstant
 Is constant or not
 
bool IsOutput
 Is output or not
 
bool OutputToOthers
 Is output to other modules or not
 
bool initialized
 whether is initialized
 
vector< T > ImpactSeries
 If the BMP effectiveness is variable, set the values of impacts
 

成员函数说明

◆ Adjust1DArray()

template<typename T >
void ParamInfo< T >::Adjust1DArray ( int  n,
T *  data 
)

Adjust 1D array

Do not change NoData value

◆ Adjust1DRaster() [1/2]

template<typename T >
void ParamInfo< T >::Adjust1DRaster ( int  n,
T *  data 
)

Adjust 1D Raster,

参见
Adjust1DArray()

◆ Adjust1DRaster() [2/2]

template<typename T >
int ParamInfo< T >::Adjust1DRaster ( int  n,
T *  data,
const int *  units,
const vector< int > &  selunits,
const int *  lu,
const vector< int > &  sellu 
)

Adjust 1D Raster on selected area

Do not change NoData value

◆ Adjust1DRasterWithImpactIndexes()

template<typename T >
int ParamInfo< T >::Adjust1DRasterWithImpactIndexes ( int  n,
T *  data,
const int *  units,
const vector< int > &  selunits,
const map< int, int > &  impactIndexes,
const int *  lu,
const vector< int > &  sellu 
)

Adjust 1D Raster on selected area, using impact index version

Do not change NoData value

◆ GetAdjustedValue()

template<typename T >
T ParamInfo< T >::GetAdjustedValue ( pre_value = NODATA_VALUE)

Return the adjusted value for this parameter

参数
[in]pre_valueDefault is NODATA_VALUE which will be treated as ParamInfo.Value, otherwise adjust the given value.
返回
adjusted float value

Do not change NoData value

◆ GetAdjustedValueWithImpactIndexes()

template<typename T >
T ParamInfo< T >::GetAdjustedValueWithImpactIndexes ( pre_value,
int  curImpactIndex 
)

Adjust value with indexed impact

Do not change NoData value

◆ RegularMeasurement

class RegularMeasurement

Regular hydroclimate data, e.g., daily data

类 RegularMeasurement 继承关系图:
Measurement ccgl::Interface

Public 成员函数

 RegularMeasurement (MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime, time_t interval)
 Initialize NotRegular Measurement instance from MongoDB 更多...
 
 ~RegularMeasurement ()
 Destructor
 
FLTPT * GetSiteDataByTime (time_t t) OVERRIDE
 Get site date by time pData
 
- Public 成员函数 继承自 Measurement
 Measurement (MongoClient *conn, const string &hydroDBName, const string &sitesList, const string &siteType, time_t startTime, time_t endTime)
 Initialize Measurement instance from MongoDB 更多...
 
 ~Measurement ()
 Destructor
 
int NumberOfSites () const
 Get Number of site
 
string Type () const
 Get HydroClimate site type, "M" or "P"
 
time_t StartTime () const
 start time
 
time_t EndTime () const
 end time
 

额外继承的成员函数

- Protected 属性 继承自 Measurement
MongoClientm_conn
 MongoDB client object
 
string m_hydroDBName
 HydroClimate database name
 
vector< int > m_siteIDList
 Site IDs list
 
string m_type
 Site type, M means meteorology, and P means precipitation
 
time_t m_startTime
 Start time
 
time_t m_endTime
 End time
 
FLTPT * pData
 Measurement data of all sites in given date
 

构造及析构函数说明

◆ RegularMeasurement()

RegularMeasurement::RegularMeasurement ( MongoClient conn,
const string &  hydroDBName,
const string &  sitesList,
const string &  siteType,
time_t  startTime,
time_t  endTime,
time_t  interval 
)

Initialize NotRegular Measurement instance from MongoDB

参数
[in]connMongoClient, MongoDB client
[in]hydroDBNamestring, HydroClimate database name
[in]sitesListstring, site list
[in]siteTypestring, site type
[in]startTimetime_t, start date time
[in]endTimetime_t, end date time
[in]intervaltime_t, time interval

◆ Settings

class Settings

Base class for input or output Settings

类 Settings 继承关系图:
ccgl::Interface SettingsInput SettingsOutput

Public 成员函数

 Settings ()
 Constructor
 
 Settings (vector< vector< string > > &str2dvec)
 Constructor via 2D string vector
 
 Settings (vector< string > &str1dvec)
 Constructor via 1D string vector
 
virtual void SetSettingTagStrings (vector< vector< string > > &string2dvector)
 Set Settings vector directly
 
virtual void SetSettingTagStrings (vector< string > &stringvector)
 Parse and Set Settings vector by splitting strings
 
string GetValue (const string &tag)
 Return the value for the entry with the given tag, "" if not found
 
virtual void Dump (const string &filename)
 Output information to plain text file
 

Public 属性

vector< vector< string > > m_Settings
 Store setting key and values
 

◆ SettingsInput

class SettingsInput

Input settings for SEIMS

类 SettingsInput 继承关系图:
Settings ccgl::Interface

Public 成员函数

 SettingsInput (vector< string > &stringvector)
 Constructor
 
void Dump (const string &filename) OVERRIDE
 Output to log file
 
time_t getStartTime () const
 Get start time of simulation
 
time_t getEndTime () const
 Get end time of simulation
 
time_t getDtHillslope () const
 Get time interval for hillslope scale processes
 
time_t getDtChannel () const
 Get time interval for channel scale processes
 
time_t getDtDaily () const
 Get daily time interval of simulation in sec
 
string & getModelMode ()
 Get model mode
 
bool isStormMode () const
 is storm model
 
- Public 成员函数 继承自 Settings
 Settings ()
 Constructor
 
 Settings (vector< vector< string > > &str2dvec)
 Constructor via 2D string vector
 
 Settings (vector< string > &str1dvec)
 Constructor via 1D string vector
 
virtual void SetSettingTagStrings (vector< vector< string > > &string2dvector)
 Set Settings vector directly
 
virtual void SetSettingTagStrings (vector< string > &stringvector)
 Parse and Set Settings vector by splitting strings
 
string GetValue (const string &tag)
 Return the value for the entry with the given tag, "" if not found
 

额外继承的成员函数

- Public 属性 继承自 Settings
vector< vector< string > > m_Settings
 Store setting key and values
 

◆ OrgOutItem

struct OrgOutItem

Original output item

◆ SettingsOutput

class SettingsOutput

Setting outputs

参见
Settings
类 SettingsOutput 继承关系图:
Settings ccgl::Interface

Public 成员函数

 SettingsOutput (int subbasinNum, int outletID, int subbasinID, vector< OrgOutItem > &outputItems, int scenarioID=0, int calibrationID=-1, int mpi_rank=0, int mpi_size=-1)
 Constructor 更多...
 
 ~SettingsOutput ()
 Destructor
 
void Dump (const string &filename) OVERRIDE
 Write output information to log file
 
- Public 成员函数 继承自 Settings
 Settings ()
 Constructor
 
 Settings (vector< vector< string > > &str2dvec)
 Constructor via 2D string vector
 
 Settings (vector< string > &str1dvec)
 Constructor via 1D string vector
 
virtual void SetSettingTagStrings (vector< vector< string > > &string2dvector)
 Set Settings vector directly
 
virtual void SetSettingTagStrings (vector< string > &stringvector)
 Parse and Set Settings vector by splitting strings
 
string GetValue (const string &tag)
 Return the value for the entry with the given tag, "" if not found
 

静态 Public 成员函数

static SettingsOutputInit (int subbasinNum, int outletID, int subbasinID, vector< OrgOutItem > &outputItems, int scenarioID=0, int calibrationID=-1, int mpi_rank=0, int mpi_size=-1)
 Init function
 

Public 属性

vector< PrintInfo * > m_printInfos
 Check date of output settings 更多...
 
map< string, PrintInfo * > m_printInfosMap
 All the output settings key: OutputID value: PrintInfo instance 更多...
 
- Public 属性 继承自 Settings
vector< vector< string > > m_Settings
 Store setting key and values
 

构造及析构函数说明

◆ SettingsOutput()

SettingsOutput::SettingsOutput ( int  subbasinNum,
int  outletID,
int  subbasinID,
vector< OrgOutItem > &  outputItems,
int  scenarioID = 0,
int  calibrationID = -1,
int  mpi_rank = 0,
int  mpi_size = -1 
)

Constructor

参数
[in]subbasinNumSubbasin number of the entire watershed
[in]outletIDThe subbasin ID of outlet
[in]subbasinIDCurrent subbasin ID, 0 for OMP version
[in]outputItemsVector of original output items read from FILE_OUT file (or table)
[in]scenarioIDScenario ID, -1 means no scenario is used, default is 0
[in]calibrationIDCalibration ID, -1 means no calibration from calibration sequence is used
[in]mpi_rankRank ID for MPI, 0 is the default, also for OMP version
[in]mpi_sizeRank size for MPI, -1 is the default for compatible with OMP version

类成员变量说明

◆ m_printInfos

vector<PrintInfo *> SettingsOutput::m_printInfos

Check date of output settings

All the print settings

◆ m_printInfosMap

map<string, PrintInfo *> SettingsOutput::m_printInfosMap

All the output settings key: OutputID value: PrintInfo instance

参见
PrintInfo