本文整理汇总了C++中MetadataInfo::AddDependency方法的典型用法代码示例。如果您正苦于以下问题:C++ MetadataInfo::AddDependency方法的具体用法?C++ MetadataInfo::AddDependency怎么用?C++ MetadataInfo::AddDependency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetadataInfo
的用法示例。
在下文中一共展示了MetadataInfo::AddDependency方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MetadataInformation
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
MetadataInfo mdi;
// set the information properties
mdi.SetAuthor("Wu Hui");
mdi.SetClass("Overland flow", "Calculate overland flow routing.");
mdi.SetDescription("IUH overland method to calculate overland flow routing.");
mdi.SetEmail(SEIMS_EMAIL);
mdi.SetHelpfile("IUH_OL.chm");
mdi.SetID("IUH_OL");
mdi.SetName("IUH_OL");
mdi.SetVersion("0.1");
mdi.SetWebsite(SEIMS_SITE);
mdi.AddParameter(Tag_TimeStep, UNIT_TIMESTEP_HOUR, DESC_TIMESTEP, File_Input, DT_Single);
mdi.AddParameter(Tag_CellSize, UNIT_NON_DIM, DESC_CellSize, Source_ParameterDB, DT_Single);
mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);
mdi.AddParameter(VAR_OL_IUH, UNIT_NON_DIM, DESC_OL_IUH, Source_ParameterDB, DT_Array2D);
mdi.AddParameter(VAR_SUBBSN, UNIT_NON_DIM, DESC_SUBBSN, Source_ParameterDB, DT_Raster1D);
//mdi.AddParameter("uhminCell","","start time of IUH for each grid cell","ParameterDB_Discharge",DT_Array1D);
//mdi.AddParameter("uhmaxCell","","end time of IUH for each grid cell","ParameterDB_Discharge",DT_Array1D);
mdi.AddInput(VAR_SURU, UNIT_DEPTH_MM, DESC_SURU, Source_Module, DT_Raster1D); //from depression module
mdi.AddOutput(VAR_SBOF, UNIT_DEPTH_MM, DESC_SBOF, DT_Array1D);
// set the dependencies
mdi.AddDependency("DEP_FS","Depression Storage module");
// write out the XML file.
string res = mdi.GetXMLDocument();
char* tmp = new char[res.size()+1];
strprintf(tmp, res.size()+1, "%s", res.c_str());
return tmp;
}
示例2: MetadataInformation
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
MetadataInfo mdi;
// set the information properties
mdi.SetAuthor("Wu Hui");
mdi.SetClass("Overland flow", "Calculate overland flow routing.");
mdi.SetDescription("IUH overland method to calculate overland flow routing.");
mdi.SetEmail("[email protected]");
mdi.SetHelpfile("IUH_OL.chm");
mdi.SetID("IUH_OL");
mdi.SetName("IUH_OL");
mdi.SetVersion("0.1");
mdi.SetWebsite("http://seims.github.io/SEIMS");
mdi.AddParameter("TimeStep","hr","time step of the simulation","file.in",DT_Single);
mdi.AddParameter("CellWidth","m","","file.in",DT_Single);
mdi.AddParameter("subbasin","","The subbasion grid","ParameterDB_Snow",DT_Raster);
mdi.AddParameter("Ol_iuh","","IUH of each grid cell","ParameterDB_Discharge",DT_Array2D);
//mdi.AddParameter("uhminCell","","start time of IUH for each grid cell","ParameterDB_Discharge",DT_Array1D);
//mdi.AddParameter("uhmaxCell","","end time of IUH for each grid cell","ParameterDB_Discharge",DT_Array1D);
mdi.AddInput("D_SURU","mm","The depression storage","Module",DT_Raster); //from depression module
mdi.AddOutput("SBOF", "mm","Overland flow to streams for each subbasin", DT_Array1D);
// set the dependencies
mdi.AddDependency("DEP_FS","Depression Storage module");
// write out the XML file.
string res = mdi.GetXMLDocument();
char* tmp = new char[res.size()+1];
strprintf(tmp, res.size()+1, "%s", res.c_str());
return tmp;
}
示例3: strprintf
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
string res = "";
MetadataInfo mdi;
// set the information properties
mdi.SetAuthor("Wang Lin");
mdi.SetClass("Sediment Bound Nutrient OL", "Sediment Bound Nutrient Overland.");
mdi.SetDescription("Sediment Bound Nutrient Overland transport method using Knisel functions.");
mdi.SetEmail(SEIMS_EMAIL);
mdi.SetHelpfile("SedBonNutrient_OL.chm");
mdi.SetID("SedBonNutrient_OL");
mdi.SetName("SedBonNutrient_OL");
mdi.SetVersion("0.1");
mdi.SetWebsite(SEIMS_SITE);
mdi.AddParameter("STORM_DT", "second", "Time step of the simulation", "file.in", DT_Single);
mdi.AddParameter(Tag_CellSize, UNIT_NON_DIM, DESC_CellSize, Source_ParameterDB, DT_Single);
mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);
mdi.AddParameter("Slope", "%", "Slope", "ParameterDB_WaterBalance", DT_Raster1D);
//mdi.AddParameter("Theta", "", "theta parameter for 4-point implicit finite difference", "ParameterDB_Discharge", DT_Single);
/*mdi.AddParameter("InitConc_P", "kg/kg", "Initial average concentration of P in the soil", "ParameterDB_soil", DT_Single);
mdi.AddParameter("InitConc_NH4", "kg/kg", "Initial average concentration of ammonium in the soil", "ParameterDB_soil", DT_Single);
mdi.AddParameter("InitConc_NO3", "kg/kg", "Initial average concentration of nitrate in the soil", "ParameterDB_soil", DT_Single);*/
mdi.AddParameter("Clay", "", "Clay proportion in soil", "ParameterDB_WaterBalance", DT_Raster1D);
mdi.AddParameter("Porosity", "m/m", "Soil porosity", "ParameterDB_WaterBalance", DT_Raster1D);
mdi.AddParameter("Density", "kg/m3", "Soil density", "ParameterDB_Discharge", DT_Raster1D);
mdi.AddParameter("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster1D);
mdi.AddInput("D_FlowWidth", "m", "Flow width of overland plane", "Module", DT_Raster1D);
//mdi.AddInput("D_FlowLen","m", "Flow length of overland plane","Module",DT_Raster);
mdi.AddParameter("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster1D);
mdi.AddParameter("Manning", "", "Manning's roughness", "ParameterDB_Discharge", DT_Raster1D);
//mdi.AddParameter("FLOW_DIR", "", "Flow direction by the rule of ArcGIS", "ParameterDB_Discharge", DT_Raster);
//mdi.AddParameter("FLOWOUT_INDEX", "", "The index of flow in cell in the compressed array", "ParameterDB_Discharge", DT_Array1D);
mdi.AddParameter("FLOWIN_INDEX_D8", "", "The index of flow in cell in the compressed array,"
" and the first element in each sub-array is the number of flow in cells in this sub-array",
"ParameterDB_Discharge", DT_Array2D);
mdi.AddParameter("ROUTING_LAYERS", "", "Routing layers according to the flow direction"
"There are not flow relationships within each layer, and the first element in each layer is the number of cells in the layer",
"ParameterDB_Discharge", DT_Array2D);
mdi.AddInput("D_QOverland", "m3/s", "Flux in the downslope boundary of cells", "Module", DT_Raster1D);
mdi.AddInput("D_SURU", "mm", "Water depth in the downslope boundary of cells", "Module", DT_Raster1D);
mdi.AddInput("D_INFIL", "mm", "Infiltration map of watershed", "Module", DT_Raster1D);
mdi.AddInput("D_DPST", "mm", "Distribution of depression storage", "Module", DT_Raster1D);
mdi.AddInput("D_HTOCH", "mm", "Water depth added to channel water depth", "Module", DT_Raster1D);
mdi.AddOutput("SedBonP", "kg/s", "distribution of dissovlved P", DT_Raster1D);
mdi.AddOutput("SedBonAmmonium", "kg/s", "distribution of nutrient, ammonium", DT_Raster1D);
mdi.AddOutput("SedBonPToCh", "kg", "dissovlved P flow to channel", DT_Raster1D);
mdi.AddOutput("SedBonAmmoniumToCh", "kg", "ammonium flow to channel", DT_Raster1D);
//test
mdi.AddOutput("TESTDPST", "mm", "Distribution of depression storage", DT_Raster1D);
//mdi.AddOutput("ID_OUTLET", "", "index of outlet in the compressed array", DT_Single);
// set the dependencies
mdi.AddDependency("Depression", "Calculate depression storage");
mdi.AddDependency("Overland routing", "Overland routing module"); //for WH
//mdi.AddDependency("Soil Detachment","Rain and overland soil detachment erosion module");
res = mdi.GetXMLDocument();
char *tmp = new char[res.size() + 1];
strprintf(tmp, res.size() + 1, "%s", res.c_str());
return tmp;
}
示例4: MetadataInformation
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
string res = "";
MetadataInfo mdi;
// set the information properties
mdi.SetAuthor("Wu Hui");
mdi.SetClass("Sediment", "Sediment channel routing using variable channel dimention method.");
mdi.SetDescription("Sediment channel routing using variable channel dimention method as used in SWAT (in SWAT document, page 379).");
mdi.SetEmail("[email protected]");
mdi.SetHelpfile("SEDR_VCD.chm");
mdi.SetID("SEDR_VCD");
mdi.SetName("SEDR_VCD");
mdi.SetVersion("0.1");
mdi.SetWebsite("http://seims.github.io/SEIMS");
#ifdef STORM_MODEL
mdi.AddParameter("DT_CH","s","time step","file.in",DT_Single); //for long term model
#else
mdi.AddParameter("TimeStep","s","time step","file.in",DT_Single);
#endif
mdi.AddParameter("p_rf","", "Peak rate adjustment factor","ParameterDB_Sediment", DT_Single);
mdi.AddParameter("spcon","", "Coefficient in sediment transport equation","ParameterDB_Sediment", DT_Single);
mdi.AddParameter("spexp","", "Exponent in sediment transport equation","ParameterDB_Sediment", DT_Single);
mdi.AddParameter("vcrit","m/s", "critical veloctiy for sediment deposition","ParameterDB_Sediment", DT_Single);
//mdi.AddParameter("CellSize","","the size of the cell (the validate cells of the whole basin)","file.in",DT_Single);
//mdi.AddParameter("nPETS","","the number of the PET stations","file.in",DT_Single);
//mdi.AddParameter("CellWidth","m","cell width of the grid","file.in",DT_Single);
mdi.AddParameter("Chs0","m3/m","initial channel storage per meter of reach length","ParameterDB_Discharge", DT_Single);
//mdi.AddParameter("Vseep0","m3/s","the initial volume of transmission loss to the deep aquifer over the time interval","ParameterDB_Discharge", DT_Single);
mdi.AddParameter("RchParam","","reach parameters", "reachparameters.txt",DT_Array2D);
//mdi.AddParameter("ReachParameter", "", "Reach parameters such stream order, manning's n and downstream subbasin id", "ParameterDB_Discharge", DT_Array2D);
//mdi.AddParameter("Vdiv","m3","diversion loss of the river reach", "diversionloss.txt",DT_Array1D);
//mdi.AddParameter("Vpoint","m3"," point source discharge", "diversionloss.txt",DT_Array1D);
//mdi.AddParameter("subbasin","","subbasin grid","ParameterDB_Discharge", DT_MapWindowRaster);
mdi.AddInput("SEDTOCH","ton","sediment to streams from each subbasin","Module", DT_Array1D); // for longterm model
mdi.AddInput("SubSEDTOCH","kg","sediment to streams from each subbasin","Module", DT_Array1D); // for storm model
//mdi.AddInput("CROSS_AREA", "m2", "the cross-sectional area of flow in the channel","Module", DT_Array1D);
mdi.AddInput("QRECH","","Discharge in a text format at each reach outlet and at each time step","Module",DT_Array1D);
mdi.AddInput("QS","","Overland discharge at each reach outlet and at each time step","Module",DT_Array1D);
mdi.AddInput("QI","","Interflow at each reach outlet and at each time step","Module",DT_Array1D);
mdi.AddInput("QG","","Groundwater discharge at each reach outlet and at each time step","Module",DT_Array1D);
mdi.AddInput("CHST", "m3", "channel storage", "Module",DT_Array1D);
//mdi.AddInput("SEEPAGE", "m3", "seepage", "Module",DT_Array1D);
mdi.AddInput("CHWTDEPTH", "m", "channel water depth", "Module",DT_Array1D);
//mdi.AddInput("C_WABA","","Channel water balance in a text format for each reach and at each time step","Module",DT_Array2D);
mdi.AddOutput("SEDRECH","ton","Sediment in a text format at each reach outlet and at each time step",DT_Array1D);
mdi.AddOutput("T_CHSB","","Channel sediment balance in a text format for each reach and at each time step",DT_Array2D);
mdi.AddOutput("SEDOUTLET", "ton", "sediment concentration at the watershed outlet", DT_Single);
//mdi.AddOutput("DEPOUTLET", "ton", "sediment concentration at the watershed outlet", DT_Single);
// set the dependencies
mdi.AddDependency("MUSLE_AS","MUSLE_AS module");
mdi.AddDependency("MUSK_CH","MUSK_CH module"); //for module GWA_RE to update groundwater storage
res = mdi.GetXMLDocument();
char* tmp = new char[res.size()+1];
strprintf(tmp, res.size()+1, "%s", res.c_str());
return tmp;
}
示例5: runoff
//.........这里部分代码省略.........
mdi.AddInput("D_Ammon", "kg N/ha", "ammonium pool for soil nitrogen", "Module", DT_Array2D);
// Organic N
mdi.AddParameter(Tag_CellSize, UNIT_NON_DIM, DESC_CellSize, Source_ParameterDB, DT_Single);
mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);
mdi.AddParameter("Density_2D", "g/cm3", "Soil density", "ParameterDB_WaterBalance", DT_Array2D);
//mdi.AddParameter("RootDepth", "mm", "depth from the soil surface", "file.in", DT_Raster);
mdi.AddInput("D_SOER", "metric tons", "distribution of soil erosion", "Module", DT_Raster1D); // from MUSLE_AS
mdi.AddInput("D_Depth", "mm", "depth of the layer", "Module", DT_Array2D);
mdi.AddInput("D_ActOrgN", "kg N/ha", "amount of nitrogen in the active organic pool in layer ly", "Module",
DT_Array2D);
mdi.AddInput("D_StaOrgN", "kg N/ha", "amount of nitrogen in the stable organic pool", "Module", DT_Array2D);
mdi.AddInput("D_FreOrgN", "kg N/ha", "nitrogen in the fresh organic pool in layer ly", "Module", DT_Array2D);
// soluble P
mdi.AddParameter("ParCoeP", "m3/Mg", "phosphorus soil partitioning coefficient", "file.in", DT_Single);
mdi.AddInput("D_SoluP", "kg P/ha", "amount of phosphorus in solution in layer ly", "Module", DT_Array2D);
// Attached P
mdi.AddInput("D_ActMinP", "kg P/ha", "amount of phosphorus in the active mineral pool", "Module", DT_Array2D);
mdi.AddInput("D_StaMinP", "kg P/ha", "amount of phosphorus in the stable mineral pool", "Module", DT_Array2D);
mdi.AddInput("D_HumOrgP", "kg P/ha", "amount of humic organic phosphorus in the layer", "Module", DT_Array2D);
mdi.AddInput("D_FreOrgP", "kg P/ha", "phosphorus in the fresh organic pool in the top 10mm", "Module", DT_Array2D);
// Nitrate
mdi.AddOutput("SurNit", "kg N/ha", "the nitrate removed in surface runoff", DT_Raster1D);
mdi.AddOutput("SatW", "mm H2O", "the saturated water content of the soil layer", DT_Array2D);
mdi.AddOutput("MobQ", "mm H2O", "the amount of mobile water in the layer", DT_Array2D);
mdi.AddOutput("ConNit", "kg N/mm H2O", "the concentration of nitrate in the mobile water for a given layer",
DT_Array2D);
mdi.AddOutput("LatNit", "kg N/ha", " the nitrate removed in lateral flow from a layer", DT_Array2D);
mdi.AddOutput("PerNit", "kg N/ha", "the nitrate moved to the underlying layer by percolation", DT_Array2D);
// Ammonium
mdi.AddOutput("SurAmm", "kg N/ha", "the ammonium removed in surface runoff", DT_Raster1D);
mdi.AddOutput("ConAmm", "kg N/mm H2O", "the concentration of Ammonium in the mobile water for a given layer",
DT_Array2D);
// Organic N
mdi.AddOutput("ConSed", "Mg sed/m3 H2O", "the concentration of sediment in surface runoff", DT_Raster1D);
mdi.AddOutput("EnrN", "", "nitrogen enrichment ratio", DT_Raster1D);
mdi.AddOutput("ConOrgN", "g N/ metric ton soil", "the concentration of organic nitrogen in the top 10 mm",
DT_Raster1D);
mdi.AddOutput("TraOrgN", "kg N/ha", "the amount of organic nitrogen transported to the next cell in surface runoff",
DT_Raster1D);
// soluble P
mdi.AddOutput("SurSolP", "kg P/ha", "the amount of soluble phosphorus lost in surface runoff", DT_Raster1D);
// Attached P
mdi.AddOutput("EnrP", "", "phosphorus enrichment ratio", DT_Raster1D);
mdi.AddOutput("ConAttP", "g P/ metric ton soil",
"the concentration of phosphorus attached to sediment in the top 10 mm", DT_Raster1D);
mdi.AddOutput("TraAttP", "kg P/ha",
"the amount of phosphorus attached to sediment transported to the next cell in surface runoff",
DT_Raster1D);
// to subbasin
mdi.AddParameter("subbasin", "", "subbasin grid", "ParameterDB_Discharge", DT_Raster1D);
mdi.AddOutput("SNITTOCH", "kg", "surface nitrate to channel", DT_Array1D);
mdi.AddOutput("SNITTOCH_T", "kg", "Total surface nitrate flowing to channel", DT_Single);
mdi.AddOutput("SAMMTOCH", "kg", "surface ammonium to channel", DT_Array1D);
mdi.AddOutput("SAMMTOCH_T", "kg", "Total surface ammonium flowing to channel", DT_Single);
mdi.AddOutput("SSOLPTOCH", "kg", "surface soluble phosphorus to channel", DT_Array1D);
mdi.AddOutput("SSOLPTOCH_T", "kg", "Total surface soluble phosphorus flowing to channel", DT_Single);
mdi.AddOutput("ORGNTOCH", "kg", "the amount of organic nitrogen transported to channel in surface runoff(",
DT_Array1D);
mdi.AddOutput("ORGNTOCH_T", "kg", "Total organic nitrogen transported to channel in surface runoff", DT_Single);
mdi.AddOutput("ATTPTOCH", "kg",
"the amount of phosphorus attached to sediment transported to channel in surface runoff", DT_Array1D);
mdi.AddOutput("ATTPTOCH_T", "kg", "Total phosphorus attached to sediment transported to channel in surface runoff",
DT_Single);
mdi.AddOutput("LANITTOCH", "kg", "lateral nitrate to channel", DT_Array1D);
mdi.AddOutput("LANITTOCH_T", "kg", "Total lateral nitrate flowing to channel", DT_Single);
// cell to cell method
mdi.AddParameter("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster1D);
mdi.AddParameter("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster1D);
//mdi.AddParameter("FLOWOUT_INDEX_DINF", "", "The index of flow in cell in the compressed array", "ParameterDB_Discharge", DT_Array2D);
mdi.AddParameter("FLOWIN_INDEX_D8", "", "The index of flow in cell in the compressed array,"
" and the first element in each sub-array is the number of flow in cells in this sub-array",
"ParameterDB_Discharge", DT_Array2D);
//mdi.AddParameter("FLOWIN_PERCENTAGE_DINF", "", "Percentage of flow in", "ParameterDB_Discharge", DT_Array2D);
mdi.AddParameter("ROUTING_LAYERS", "", "Routing layers according to the flow direction"
"There are not flow relationships within each layer", "ParameterDB_Discharge", DT_Array2D);
// set the dependencies
mdi.AddDependency("DEP_FS", "Depression Storage module");
mdi.AddDependency("SSR_DA", "Subsurface Runoff module");
mdi.AddDependency("MUSLE_AS", "Calculate the amount of sediment yield.");
res = mdi.GetXMLDocument();
char *tmp = new char[res.size() + 1];
strprintf(tmp, res.size() + 1, "%s", res.c_str());
return tmp;
}