Esempio n. 1
0
File: api.cpp Progetto: fannq/SEIMS
/// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;
	string res;

	mdi.SetAuthor("Zhiqiang Yu");
	mdi.SetClass(MCLS_CLIMATE,MCLSDESC_CLIMATE);
	mdi.SetDescription(MDESC_TSD_RD);
	mdi.SetID(MID_TSD_RD);
	mdi.SetName(MID_TSD_RD);
	mdi.SetVersion("1.0");
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetWebsite(SEIMS_SITE);
	mdi.SetHelpfile("");

	mdi.AddParameter(VAR_TSD_DT,UNIT_NON_DIM,DESC_TSD_DT,File_Config,DT_Single);

	/// set the input variables (time series), and T means time series. D means distribution.
	mdi.AddInput(DataType_Prefix_TS,UNIT_NON_DIM, DESC_TSD_CLIMATE, Source_HydroClimateDB, DT_Array1D);

	/// set the output variables
	mdi.AddOutput(DataType_Prefix_TS,UNIT_NON_DIM, DESC_TSD_CLIMATE, DT_Array1D);

	/// write out the XML file.
	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 2
0
extern "C" SEIMS_MODULE_API const char* MetadataInformation() {
    MetadataInfo mdi;
    // set the information properties
    mdi.SetAuthor("Junzhi Liu, Liangjun Zhu");
    mdi.SetClass(MCLS_OL_ROUTING, MCLSDESC_OL_ROUTING);
    mdi.SetDescription(MDESC_IUH_SED_OL);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetHelpfile("");
    mdi.SetID(MID_IUH_SED_OL);
    mdi.SetName(MID_IUH_SED_OL);
    mdi.SetVersion("1.2");
    mdi.SetWebsite(SEIMS_SITE);

    mdi.AddParameter(Tag_TimeStep, UNIT_HOUR, DESC_TIMESTEP, File_Input, DT_Single);
    mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_SUBBSNID_NUM, UNIT_NON_DIM, DESC_SUBBSNID_NUM, Source_ParameterDB, DT_Single);
    mdi.AddParameter(Tag_SubbasinId, UNIT_NON_DIM, Tag_SubbasinId, 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.AddInput(VAR_SOER, UNIT_KG, DESC_SOER, Source_Module, DT_Raster1D);

    mdi.AddOutput(VAR_SED_TO_CH, UNIT_KG, DESC_SED_TO_CH, DT_Array1D, TF_SingleValue);
    mdi.AddOutput(VAR_SEDYLD, UNIT_KG, DESC_SEDYLD, DT_Raster1D);

    // 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;
}
Esempio n. 3
0
File: api.cpp Progetto: fannq/SEIMS
/// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;
	string res;

	mdi.SetAuthor("LiangJun Zhu");
	mdi.SetClass("TEST", "Base functionality test!");
	mdi.SetDescription("Module test.");
	mdi.SetID("IO_TEST");
	mdi.SetName("IO_TEST");
	mdi.SetVersion("1.0");
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetWebsite(SEIMS_SITE);
	mdi.SetHelpfile("");

	mdi.AddParameter(VAR_CN2, UNIT_NON_DIM, DESC_CN2, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_CONDUCT, UNIT_WTRDLT_MMH, DESC_CONDUCT, Source_ParameterDB, DT_Raster2D);
	/// set the output variables
	mdi.AddOutput("CN2_M",UNIT_NON_DIM, DESC_CN2, DT_Raster1D);
	mdi.AddOutput("K_M",UNIT_WTRDLT_MMH,DESC_CONDUCT,DT_Raster2D);
	/// write out the XML file.
	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 4
0
// function to return the XML Metadata document string
//Set up metadata information
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    string res;

    MetadataInfo mdi;

    // set the information properties
    mdi.SetAuthor("Hui Wu");
    mdi.SetClass(MCLS_CH_EROSION, MCLSDESC_CH_EROSION);
    mdi.SetDescription(MDESC_KINWAVSED_CH);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MID_KINWAVSED_CH);
    mdi.SetName(MID_KINWAVSED_CH);
    mdi.SetVersion("0.5");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("KinWavSed_CH.chm");

    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(Tag_HillSlopeTimeStep, UNIT_SECOND, DESC_DT_HS, File_Input, DT_Single);
    mdi.AddParameter(VAR_CH_TCCO, UNIT_NON_DIM, DESC_CH_TCCO, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_CH_DETCO, UNIT_NON_DIM, DESC_CH_DETCO, Source_ParameterDB, DT_Single);

    mdi.AddParameter(VAR_CHWIDTH, UNIT_LEN_M, DESC_CHWIDTH, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_SLOPE, UNIT_PERCENT, DESC_SLOPE, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_STREAM_LINK, UNIT_NON_DIM, DESC_STREAM_LINK, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_USLE_K, UNIT_NON_DIM, DESC_USLE_K, Source_ParameterDB, DT_Raster1D);

    mdi.AddParameter(Tag_FLOWOUT_INDEX_D8, UNIT_NON_DIM, DESC_FLOWOUT_INDEX_D8, Source_ParameterDB, DT_Array1D);
    mdi.AddParameter(Tag_FLOWIN_INDEX_D8, UNIT_NON_DIM, DESC_FLOWIN_INDEX_D8, Source_ParameterDB, DT_Array2D);
    mdi.AddParameter(Tag_ReachParameter, UNIT_NON_DIM, DESC_REACH_PARAM, Source_ParameterDB, DT_Array2D);

    // input from other module
    mdi.AddInput(VAR_SED_TO_CH, UNIT_KG, DESC_SED_TO_CH, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_HCH, UNIT_DEPTH_MM, DESC_HCH, Source_Module, DT_Array2D);
    //mdi.AddInput(VAR_QRECH, UNIT_FLOW_CMS, DESC_QRECH, Source_Module,DT_Array2D);
    mdi.AddInput("QRECH", "m3/s", "Flux in the downslope boundary of cells", "Module",
                 DT_Array2D);// from which module? By LJ
    /// set the output variables

    mdi.AddOutput(VAR_SED_OUTLET, UNIT_KGM3, DESC_SED_OUTLET, DT_Single);
    mdi.AddOutput(VAR_CH_DEP, UNIT_KG, DESC_CH_DEP, DT_Raster1D);
    mdi.AddOutput(VAR_CH_DET, UNIT_KG, DESC_CH_DET, DT_Raster1D);
    mdi.AddOutput(VAR_CH_SEDRATE, UNIT_KG_S, DESC_CH_SEDRATE, DT_Raster1D);
    mdi.AddOutput(VAR_CH_FLOWCAP, UNIT_KG, DESC_CH_FLOWCAP, DT_Raster1D);
    mdi.AddOutput(VAR_CH_VOL, UNIT_VOL_M3, DESC_CH_VOL, DT_Raster1D);
    mdi.AddOutput(VAR_CH_V, UNIT_SPEED_MS, DESC_CH_V, DT_Raster1D);

    mdi.AddDependency(MCLS_OL_EROSION, MCLSDESC_OL_EROSION);
    mdi.AddDependency(MCLS_CH_ROUTING, MCLSDESC_CH_ROUTING);

    // write out the XML file.
    res = mdi.GetXMLDocument();

    //return res;

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 5
0
// 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("Liu Junzhi");
    mdi.SetClass("Channelflow", "channel flow routing using kinermatic wave method.");
    mdi.SetDescription("channel flow routing using variable storage method.");
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetHelpfile("IKW_REACH.chm");
    mdi.SetID("IKW_REACH");
    mdi.SetName("MUSK_CH");
    mdi.SetVersion("0.1");
    mdi.SetWebsite(SEIMS_SITE);

    mdi.AddParameter(Tag_ChannelTimeStep, UNIT_SECOND, DESC_TIMESTEP, File_Input, DT_Single);
    mdi.AddParameter(VAR_K_CHB, UNIT_WTRDLT_MMH, DESC_K_CHB, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_K_BANK, UNIT_WTRDLT_MMH, DESC_K_BANK, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_EP_CH, UNIT_WTRDLT_MMH, DESC_EP_CH, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_BNK0, UNIT_STRG_M3M, DESC_BNK0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_CHS0, UNIT_STRG_M3M, DESC_CHS0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_VSEEP0, UNIT_FLOW_CMS, DESC_VSEEP0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_A_BNK, UNIT_NON_DIM, DESC_A_BNK, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_B_BNK, UNIT_NON_DIM, DESC_B_BNK, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_MSK_X, UNIT_NON_DIM, DESC_MSK_X, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_MSK_CO1, UNIT_NON_DIM, DESC_MSK_CO1, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_QUPREACH, UNIT_NON_DIM, DESC_QUPREACH, Source_ParameterDB, DT_Single);
    //mdi.AddParameter(VAR_MSF, UNIT_NON_DIM, DESC_MSF, Source_ParameterDB, DT_Single);

    mdi.AddParameter(Tag_RchParam, UNIT_NON_DIM, DESC_REACH_PARAM, Source_ParameterDB, DT_Array2D);
    //mdi.AddParameter(VAR_VDIV, UNIT_VOL_M3, DESC_VDIV, DT_Array1D);
    //mdi.AddParameter(VAR_VPOINT, UNIT_VOL_M3, DESC_VPOINT, "diversionloss.txt", DT_Array1D);
    mdi.AddParameter(VAR_SUBBSN, UNIT_NON_DIM, DESC_SUBBSN, Source_ParameterDB, DT_Raster1D);

    mdi.AddInput(VAR_SBOF, UNIT_FLOW_CMS, DESC_SBOF, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_SBIF, UNIT_FLOW_CMS, DESC_SBIF, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_SBQG, UNIT_FLOW_CMS, DESC_SBQG, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_SBPET, UNIT_DEPTH_MM, DESC_SBPET, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_SBGS, UNIT_DEPTH_MM, DESC_SBGS, Source_Module, DT_Array1D);

    mdi.AddOutput(VAR_QRECH, UNIT_FLOW_CMS, DESC_QRECH, DT_Array1D);
	mdi.AddOutput(VAR_QOUTLET, UNIT_FLOW_CMS, DESC_QOUTLET, DT_Single);
	mdi.AddOutput(VAR_QS, UNIT_FLOW_CMS, DESC_QS, DT_Array1D);
    mdi.AddOutput(VAR_QSOUTLET, UNIT_FLOW_CMS, DESC_QSOUTLET, DT_Single);
    mdi.AddOutput(VAR_QI, UNIT_FLOW_CMS, DESC_QI, DT_Array1D);
    mdi.AddOutput(VAR_QG, UNIT_FLOW_CMS, DESC_QG, DT_Array1D);
    mdi.AddOutput(VAR_CHST, UNIT_VOL_M3, DESC_CHST, DT_Array1D);
    mdi.AddOutput(VAR_BKST, UNIT_VOL_M3, DESC_BKST, DT_Array1D);
    mdi.AddOutput(VAR_SEEPAGE, UNIT_VOL_M3, DESC_SEEPAGE, DT_Array1D);
    mdi.AddOutput(VAR_CHWTDEPTH, UNIT_LEN_M, DESC_CHWTDEPTH, DT_Array1D);
    //mdi.AddOutput(VAR_C_WABA, UNIT_NON_DIM, DESC_C_WABA, DT_Array2D);

    res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 6
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	mdi.SetAuthor("Junzhi Liu");
	mdi.SetClass("Soil Temperature", "Calculate the soil temperature.");
	mdi.SetDescription("Finn Plauborg Method to compute soil temperature.");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("STP_FP");
	mdi.SetName("STP_FP");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("STP_FP.html");

	/// from parameter database
	mdi.AddParameter("soil_ta0","","Coefficient a0 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_ta1","","Coefficient a1 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_ta2","","Coefficient a2 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_ta3","","Coefficient a3 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_tb1","","Coefficient b1 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_tb2","","Coefficient b2 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_td1","","Coefficient d1 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("soil_td2","","Coefficient d2 for Finn Plauborg Method",
		"ParameterDB_WaterBalance", DT_Single);

	mdi.AddParameter("k_soil10","","Ratio between soil temperature at 10 cm and the mean",
		"ParameterDB_WaterBalance", DT_Single);

	mdi.AddParameter("soil_t10","","Factor of soil temperature relative to short grass (degree)",
		"ParameterDB_WaterBalance", DT_Raster);
	//mdi.AddParameter("Mask", "", "Array containing the row and column numbers for valid cells",
	//	"ParameterDB_WaterBalance", DT_Raster);

	/// from interpolation module
	/// air temperature
	mdi.AddInput("D_Tmin","oC","Minimum air temperature","Module", DT_Raster);
	mdi.AddInput("D_Tmax","oC","Maximum air temperature","Module", DT_Raster);
	//mdi.AddInput("Tmin1","oC","Minimum air temperature of the (d-1)th day","Module", DT_Raster);
	//mdi.AddInput("Tmax1","oC","Maximum air temperature of the (d-1)th day","Module", DT_Raster);
	//mdi.AddInput("Tmin2","oC","Minimum air temperature of the (d-2)th day","Module", DT_Raster);
	//mdi.AddInput("Tmax2","oC","Maximum air temperature of the (d-2)th day","Module", DT_Raster);

	/// output soil temperature
	mdi.AddOutput("SOTE","oC", "Soil Temperature", DT_Raster);

	string res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 7
0
// 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("Liu Junzhi");
	mdi.SetClass("Channelflow", "channel flow routing using kinermatic wave method.");
	mdi.SetDescription("channel flow routing using variable storage method.");
	mdi.SetEmail("*****@*****.**");
	mdi.SetHelpfile("IKW_REACH.chm");
	mdi.SetID("IKW_REACH");
	mdi.SetName("MUSK_CH");
	mdi.SetVersion("0.1");
	mdi.SetWebsite("http://seims.github.io/SEIMS");

	mdi.AddParameter("DT_CH","s","time step","file.in",DT_Single); 
	mdi.AddParameter("K_chb","mm/h","hydraulic conductivity of the channel bed","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("K_bank","mm/h","hydraulic conductivity of the channel bank","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("Ep_ch","mm/h","reach evaporation adjustment factor","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("Bnk0","m3/m","initial bank storage per meter of reach length","ParameterDB_Discharge", 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("a_bnk","","bank flow recession constant","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("b_bnk","","bank storage loss coefficient","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("MSK_X","","muskingum weighing factor","ParameterDB_Discharge", DT_Single);
	mdi.AddParameter("MSK_co1","","Weighting factor of bankful flow","ParameterDB_Discharge", DT_Single);
	//mdi.AddParameter("ManningScaleFactor","","flow velocity scaling factor for calibration","ParameterDB_Discharge", DT_Single);

	mdi.AddParameter("RchParam","","reach parameters", "reachparameters.txt",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_Raster);
	mdi.AddInput("D_SBOF","m3/s","overland flow to streams from each subbasin","Module", DT_Array1D);
	mdi.AddInput("D_SBIF","m3/s","interflow to streams from each subbasin","Module", DT_Array1D);
	mdi.AddInput("D_SBQG","m3/s","groundwater flow out of the subbasin","Module", DT_Array1D);
	mdi.AddInput("D_SBPET","mm","the potential evapotranspiration rate of the subbasin","Module", DT_Array1D);
	mdi.AddInput("D_SBGS","mm","Groundwater storage of the subbasin","Module", DT_Array1D);

	mdi.AddOutput("QRECH","","Discharge in a text format at each reach outlet and at each time step",DT_Array1D);
	mdi.AddOutput("QOUTLET", "m3/s", "discharge at the watershed outlet", DT_Single);
	mdi.AddOutput("QSOUTLET", "m3/s", "discharge at the watershed outlet", DT_Single);
	mdi.AddOutput("QS","","Overland discharge at each reach outlet and at each time step",DT_Array1D);
	mdi.AddOutput("QI","","Interflow at each reach outlet and at each time step",DT_Array1D);
	mdi.AddOutput("QG","","Groundwater discharge at each reach outlet and at each time step",DT_Array1D);
	mdi.AddOutput("CHST", "m3", "channel storage", DT_Array1D);
	mdi.AddOutput("BKST", "m3", "bank storage", DT_Array1D);
	mdi.AddOutput("SEEPAGE", "m3", "seepage", DT_Array1D);
	mdi.AddOutput("CHWTDEPTH", "m", "channel water depth", DT_Array1D);
	//mdi.AddOutput("C_WABA","","Channel water balance in a text format for each reach and at each time step",DT_Array2D);

	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 8
0
// 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("Surface runoff", "Calculate infiltration and excess precipitation.");
	mdi.SetDescription("Green and Ampt method to calculate infiltration and excess precipitation.");
	mdi.SetEmail("");
	mdi.SetHelpfile("SUR_GA.chm");
	mdi.SetID("SUR_GA");
	mdi.SetName("SUR_GA");
	mdi.SetVersion("0.1");
	mdi.SetWebsite("http://www.website.com");

	mdi.AddParameter("TimeStep","hour","time step of the simulation","file.in",DT_Single);
	mdi.AddParameter("T_snow","degree Celsius","snowfall temperature","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("t_soil","degree Celsius","threshold soil freezing temperature","ParameterDB_WaterBalance",DT_Single);
	mdi.AddParameter("T0","degree Celsius","snowmelt threshold temperature","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("Conductivity","mm/h","Soil hydraulic conductivity","ParameterDB_WaterBalance", DT_Raster);  //soil_k
	mdi.AddParameter("Clay","%","Percent of clay content","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("Sand","%","Percent of sand content","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("porosity","-","Soil porosity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("Rootdepth","m","Root depth","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("CN2","-","CN under moisture condition II","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("Fieldcap","m3/m3","Soil field capacity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("Wiltingpoint","m3/m3","Plant wilting point moisture","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("s_frozen","m3/m3","frozen soil moisture","ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("Mask", "", "Array containing the row and column numbers for valid cells","ParameterDB_Snow", DT_Array2D);

	mdi.AddInput("D_NEPR","mm","The net precipitation","Module",DT_Raster);
	mdi.AddInput("D_TMin","degree Celsius","The minimum air temperature","Module",DT_Raster);
	mdi.AddInput("D_TMax","degree Celsius","The maximum air temperature","Module",DT_Raster);
	mdi.AddInput("D_SOMO","m3/m3","The soil moisture","Module",DT_Raster);
	mdi.AddInput("D_DPST","mm","The depression storage","Module",DT_Raster);
	mdi.AddInput("D_SOTE","degree Celsius","The soil temperature","Module",DT_Raster);
	mdi.AddInput("D_SNAC","mm","The snow accumulation","Module",DT_Raster);
	mdi.AddInput("D_SNME","mm","The snowmelt","Module",DT_Raster);

	mdi.AddOutput("EXCP", "mm","The excess precipitation", DT_Raster);
	mdi.AddOutput("INFIL","mm","Infiltration map of watershed", DT_Raster);

	// set the dependencies
	mdi.AddDependency("Interpolation","Interpolation module");      //for pNet,T,
	mdi.AddDependency("Soil water","Soil Water Balance module");    // soilMoisture at given day
	mdi.AddDependency("Depression","Depression Storage module");     // SD
	mdi.AddDependency("soil temperature","Soil temperature module");  // TS
	mdi.AddDependency("Snow balance","Snow balance module");          // SA
	mdi.AddDependency("Snowmelt","Snowmelt module");                  // SM

	// 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;
}
Esempio n. 9
0
// 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; Zhiqiang Yu; Liang-Jun Zhu");
    mdi.SetClass(MCLS_GW, MCLSDESC_GW);
    mdi.SetDescription(MDESC_GWA_RE);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetHelpfile("GWA_RE.chm");
    mdi.SetID(MID_GWA_RE);
    mdi.SetName(MID_GWA_RE);
    mdi.SetVersion("1.1");
    mdi.SetWebsite(SEIMS_SITE);

    mdi.AddParameter(Tag_TimeStep, UNIT_SECOND, DESC_TIMESTEP, File_Config, DT_Single);
    mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);

	/// add DT_Subbasin
	mdi.AddParameter(VAR_SUBBASIN_PARAM, UNIT_NON_DIM, DESC_SUBBASIN_PARAM, Source_ParameterDB, DT_Subbasin);

    mdi.AddParameter(VAR_GW0, UNIT_DEPTH_MM, DESC_GW0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_GWMAX, UNIT_DEPTH_MM, DESC_GWMAX, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_DF_COEF, UNIT_NON_DIM, DESC_DF_COEF, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_KG, UNIT_NON_DIM, DESC_KG, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_Base_ex, UNIT_NON_DIM, DESC_BASE_EX, Source_ParameterDB, DT_Single);

    mdi.AddParameter(VAR_SOILDEPTH, UNIT_DEPTH_MM, DESC_SOILDEPTH, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_SOILTHICK, UNIT_DEPTH_MM, DESC_SOILTHICK, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_SLOPE, UNIT_PERCENT, DESC_SLOPE, Source_ParameterDB, DT_Raster1D);

    mdi.AddInput(VAR_INET, UNIT_DEPTH_MM, DESC_INET, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_DEET, UNIT_DEPTH_MM, DESC_DEET, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_SOET, UNIT_DEPTH_MM, DESC_SOET, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_AET_PLT, UNIT_DEPTH_MM, DESC_AET_PLT, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_PET, UNIT_DEPTH_MM, DESC_PET, Source_Module, DT_Raster1D);
	// VAR_GWNEW is OPTIONALLY from IUH_CH or other channel routing module
    mdi.AddInput(VAR_GWNEW, UNIT_DEPTH_MM, DESC_GWNEW, Source_Module_Optional, DT_Array1D); 
	// VAR_PERCO is from percolation modules
    mdi.AddInput(VAR_PERCO, UNIT_DEPTH_MM, DESC_PERCO, Source_Module, DT_Raster2D);
    mdi.AddInput(VAR_SOL_ST, UNIT_DEPTH_MM, DESC_SOL_ST, Source_Module, DT_Raster2D);

    mdi.AddOutput(VAR_GWWB, UNIT_NON_DIM, DESC_NONE, DT_Array2D);
    mdi.AddOutput(VAR_REVAP, UNIT_DEPTH_MM, DESC_REVAP, DT_Raster1D); //used by soil water balance module
    mdi.AddOutput(VAR_RG, UNIT_DEPTH_MM, DESC_RG, DT_Array1D); //used by soil water balance module
    mdi.AddOutput(VAR_SBQG, UNIT_FLOW_CMS, DESC_SBQG, DT_Array1D); //used by channel flow routing module
    mdi.AddOutput(VAR_SBPET, UNIT_DEPTH_MM, DESC_SBPET, DT_Array1D);
    mdi.AddOutput(VAR_SBGS, UNIT_DEPTH_MM, DESC_SBGS, DT_Array1D);

    res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 10
0
// 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("Hui Wu");
	mdi.SetClass("Splash Erosion", "Calculate the amount soil detachment erosion.");
	mdi.SetDescription("use Park equation to calculate sediment yield of each cell");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("SplashEro_Park");
	mdi.SetName("SplashEro_Park");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("SplashEro_Park.chm");

	mdi.AddParameter("cellwidth","m","the width (length) of cell","mask.asc",DT_Single);
	mdi.AddParameter("DT_HS", "second", "Time step of the simulation", "file.in", DT_Single);
	mdi.AddParameter("Omega","","calibration coefficient of splash erosion","ParameterDB_Sediment",DT_Single);
	mdi.AddParameter("USLE_K","","the soil erodibility factor","ParameterDB_Sediment",DT_Raster);
	mdi.AddParameter("USLE_C","","the cover management factor","ParameterDB_Sediment",DT_Raster);
	//mdi.AddParameter("Hplant","m","the height of the plants","ParameterDB_Sediment",DT_Raster);
	//mdi.AddParameter("GRAD","","slope gradient (sine of slope angle)","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("Slope", "%", "Slope", "ParameterDB_WaterBalance", DT_Raster); 
	//mdi.AddParameter("StoneFrac","","the fraction of stones on the surface, affects splash","ParameterDB_Sediment",DT_Raster);
	//mdi.AddParameter("GrassFrac","","the fraction of grasstrip in a cell","ParameterDB_Sediment",DT_Raster);
	//mdi.AddParameter("CoverFrac","","the fraction of vegetation cover","ParameterDB_Interception",DT_Raster);
	//mdi.AddParameter("RandRough","cm","The random roughness","ParameterDB_Sediment",DT_Raster);
	//mdi.AddParameter("CHWIDTH", "m", "channel width", "ParameterDB_Discharge", DT_Raster); 

	//input from other module	
	//WaterDepth = Depression + SurfaceRunoffDepth
	mdi.AddInput("D_DPST","mm","The depression storage","Module",DT_Raster);
	mdi.AddInput("D_SURU","mm","surface runoff","Module",DT_Raster);		
	mdi.AddInput("D_QOverland","m3/s","Water discharge in the downslope boundary of cells","Module",DT_Raster);	
	//mdi.AddInput("D_SNAC","mm","snow accumulation","Module",DT_Raster);	//SnowCover, from snow water balance module
	mdi.AddInput("D_NEPR","mm","The net precipitation obtained from the interception module","Module",DT_Raster);	//Rain, from interception module
	//mdi.AddInput("D_LeafDrain","m","leaf drainage from canopy","Module",DT_Raster);			//from Interception module

	// set the output variables
	mdi.AddOutput("DETSplash","kg", "distribution of splash detachment", DT_Raster);

	mdi.AddDependency("Interception","Interception module");      //for pNet, Leafdrain
	mdi.AddDependency("Overland routing","Overland routing module");          // cellh
	//mdi.AddDependency("Depression","Depression storage module");     // suru


	// write out the XML file.
	res = mdi.GetXMLDocument();

	//return res;

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 11
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	mdi.SetAuthor("Zhiqiang Yu; Junzhi Liu");
	mdi.SetClass("Subsurface Runoff", "");
	mdi.SetDescription("Darcy's law and the kinematic approximation; Water is routed cell-to-cell according to D8 or Dinf flow direction");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("SSR_DA");
	mdi.SetName("SSR_DA");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("SSR_DA.chm");

	mdi.AddParameter("CellWidth","m","","file.in",DT_Single);
	mdi.AddParameter("TimeStep","h","","file.in",DT_Single);
	//mdi.AddParameter("UpperSoilDepth", "mm", "depth of the upper soil layer", "ParameterDB_WaterBalance", DT_Single);
	mdi.AddParameter("Ki","-","Interflow scale factor","ParameterDB_WaterBalance",DT_Single);
	mdi.AddParameter("T_Soil","oC","threshold soil freezing temperature","ParameterDB_WaterBalance", DT_Single);				

	mdi.AddParameter("Conductivity_2D","mm/h","saturation hydraulic conductivity","ParameterDB_WaterBalance",DT_Array2D);
	mdi.AddParameter("Porosity_2D","m3/m3","soil porosity","ParameterDB_WaterBalance",DT_Array2D);
	mdi.AddParameter("Poreindex_2D","-","pore size distribution index","ParameterDB_WaterBalance",DT_Array2D);
	mdi.AddParameter("FieldCap_2D","m3/m3","Soil field capacity","ParameterDB_WaterBalance",DT_Array2D);

	mdi.AddParameter("Rootdepth","mm","Root depth","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("Slope","%","Soil field capacity","ParameterDB_WaterBalance", DT_Raster);		

	mdi.AddParameter("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster); 
	mdi.AddParameter("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster); 
	//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);

	mdi.AddParameter("subbasin","","The subbasion grid","ParameterDB_Snow",DT_Raster);

	// set the parameters (non-time series)
	mdi.AddInput("D_GRRE","mm","perculation","Module",DT_Raster);
	mdi.AddInput("D_SOTE","oC", "Soil Temperature","Module", DT_Raster);
	mdi.AddInput("D_SOMO_2D","mm","Distribution of soil moisture","Module",DT_Array2D);

	// set the output variables
	mdi.AddOutput("SSRU_2D","mm", "Distribution of subsurface runoff (mm).", DT_Array2D);
	mdi.AddOutput("SSRUVOL_2D","mm", "Distribution of subsurface runoff (m3).", DT_Array2D);
	mdi.AddOutput("SBIF", "mm","Interflow to streams for each subbasin", DT_Array1D);

	string res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 12
0
File: api.cpp Progetto: gaohr/SEIMS
// 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("Dissolved Nutrient CH", "Channel Dissolved Nutrient.");
    mdi.SetDescription("Dissolved Nutrient Channel transport method using KinematicWave Method.");
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetHelpfile("DissolvedNutrient_CH.chm");
    mdi.SetID("DissolvedNutrient_CH");
    mdi.SetName("DissolvedNutrient_CH");
    mdi.SetVersion("0.1");
    mdi.SetWebsite(SEIMS_SITE);

    mdi.AddParameter("DT_HS", "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("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster1D);
    mdi.AddParameter("FLOWOUT_INDEX_D8", "", "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("STREAM_LINK", "", "Stream link (id of reaches)", "ParameterDB_Discharge", DT_Raster1D);
    mdi.AddParameter(Tag_ReachParameter, UNIT_NON_DIM, DESC_REACH_PARAMETER, Source_ParameterDB, DT_Array2D);
    mdi.AddInput("D_DissovPToCh", "m3/s", "Flux in the downslope boundary of cells", "Module", DT_Raster1D);
    mdi.AddInput("D_AmmoniumToCh", "mm", "Water depth in the downslope boundary of cells", "Module", DT_Raster1D);
    mdi.AddInput("D_NitrateToCh", "mm", "Infiltration map of watershed", "Module", DT_Raster1D);
    mdi.AddInput("HCH", "mm", "Water depth in the downslope boundary of cells", "Module", DT_Array2D);
    mdi.AddInput("QCH", "m3/s", "Flux in the downslope boundary of cells", "Module", DT_Array2D);

    mdi.AddOutput("DissovP", "kg/s", "distribution of dissovlved P in reaches", DT_Array2D);
    mdi.AddOutput("Ammonium", "kg/s", "distribution of nutrient, ammonium in reaches", DT_Array2D);
    mdi.AddOutput("Nitrate", "kg/s", "distribution of nutrient, nitrate in reaches", DT_Array2D);

    mdi.AddOutput("DissovPOutlet", "mg/s", "dissovlved P flows to outlet", DT_Single);
    mdi.AddOutput("AmmoniumOutlet", "mg/s", "ammonium flows to outlet", DT_Single);
    mdi.AddOutput("NitrateOutlet", "mg/s", "nitrate flows to outlet", DT_Single);

    // set the dependencies
    mdi.AddDependency("Dissolved Nutrient OL", "Dissolved Nutrient Overland module");      //for WH
    mdi.AddDependency("Channel routing", "Channel routing module");

    // write out the XML file.
    res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 13
0
File: api.cpp Progetto: fannq/SEIMS
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	mdi.SetAuthor("Chunping Ou");
	mdi.SetClass(MCLS_SNO_RD, MCLSDESC_SNO_RD);
	mdi.SetDescription(MDESC_SRD_MB);
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetID(MID_SRD_MB);
	mdi.SetName(MID_SRD_MB);
	mdi.SetVersion("0.5");
	mdi.SetWebsite(SEIMS_SITE);
	mdi.SetHelpfile("SRD_MB.chm");

	//3 grid parameter
	mdi.AddParameter("slope_wind","%","Slope along wind direction","ParameterDB_Snow",DT_Raster1D);
	mdi.AddParameter("curva_wind","%","curvature along wind direction","ParameterDB_Snow",DT_Raster1D);
	mdi.AddParameter("shc","m","snow holding capacity","ParameterDB_Snow",DT_Raster1D);
	mdi.AddParameter("T_snow","oC","snowfall temperature","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("swe0","mm","Initial snow water equivalent","ParameterDB_Snow",DT_Single);

	//8 single parameter
	mdi.AddParameter("shc_crop ","m","snow holding capacity of cropland with conventional tillage used to calculate land cover weighting factor","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("k_slope","-","Slope coefficient in wind direction","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("k_curvature","-","Curvature coefficient in wind direction","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("ut0","m/s","Threshold wind speed at -27 degree for starting the redistribution of sno","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("u0","m/s","a wind speed over threshold at which the decay coefficient is one","ParameterDB_Snow",DT_Single);
	//mdi.AddParameter("t_snow","oC","snowfall temperature","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("t_wind","oC","temperature at which wind transport of snow is most favorable","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("K_blow","-"," a fraction coefficient of snow blowing into or out of the watershed","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("T0","oC","the snowmelt threshold temperature ","ParameterDB_Snow",DT_Single);	

	//input from other module	
	mdi.AddInput("T_WS","m/s","wind speed measured at 10 m height","Module",DT_Array1D);			// from time series data module
	mdi.AddInput("D_NEPR","mm","net precipitation","Module",DT_Raster1D);					// from interception module
	mdi.AddInput("D_SNAC","mm", "distribution of snow accumulation", "Module",DT_Raster1D);	// from snow water balance module
	mdi.AddInput("SWE","mm","average SA of the watershed","Module",DT_Single);						// from snow water balance module
	mdi.AddInput("D_TMIN","oC","min temperature","Module",DT_Raster1D);
	mdi.AddInput("D_TMAX","oC","max temperature","Module",DT_Raster1D);

	// set the output variables
	mdi.AddOutput(VAR_SNRD,UNIT_DEPTH_MM, DESC_SNRD, DT_Raster1D);

	// 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;
}
Esempio n. 14
0
File: api.cpp Progetto: gaohr/SEIMS
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    MetadataInfo mdi;

    // set the information properties
    mdi.SetAuthor("Junzhi Liu, Zhiqiang Yu, LiangJun Zhu");
    mdi.SetClass(MCLS_SUR_RUNOFF, MCLSDESC_SUR_RUNOFF);
    mdi.SetDescription(MDESC_SUR_MR);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetHelpfile("SUR_MR.chm");
    mdi.SetID(MID_SUR_MR);
    mdi.SetName(MID_SUR_MR);
    mdi.SetVersion("1.5");
    mdi.SetWebsite(SEIMS_SITE);

    mdi.AddParameter(Tag_HillSlopeTimeStep, UNIT_SECOND, DESC_DT_HS, File_Input, DT_Single);
    //mdi.AddParameter(VAR_T_SNOW, UNIT_TEMP_DEG, DESC_T_SNOW, Source_ParameterDB, DT_Single);
    //mdi.AddParameter(VAR_T0, UNIT_TEMP_DEG, DESC_T0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_T_SOIL, UNIT_TEMP_DEG, DESC_T_SOIL, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_K_RUN, UNIT_NON_DIM, DESC_K_RUN, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_P_MAX, UNIT_DEPTH_MM, DESC_P_MAX, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_S_FROZEN, UNIT_WAT_RATIO, DESC_S_FROZEN, Source_ParameterDB, DT_Single);

    mdi.AddParameter(VAR_RUNOFF_CO, UNIT_NON_DIM, DESC_RUNOFF_CO, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_MOIST_IN, UNIT_PERCENT, DESC_MOIST_IN, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
    //mdi.AddParameter(VAR_SOILTHICK, UNIT_DEPTH_MM, DESC_SOILTHICK, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_SOL_AWC, UNIT_DEPTH_MM, DESC_SOL_AWC, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_SOL_SUMSAT, UNIT_DEPTH_MM, DESC_SOL_SUMSAT, Source_ParameterDB, DT_Raster2D);
//   mdi.AddParameter(VAR_FIELDCAP, UNIT_WAT_RATIO, DESC_FIELDCAP, Source_ParameterDB, DT_Raster2D);
    //mdi.AddParameter(VAR_WILTPOINT,UNIT_WAT_RATIO, DESC_WILTPOINT, Source_ParameterDB, DT_Raster2D);
    //mdi.AddParameter(VAR_POROST, UNIT_NON_DIM, DESC_POROST, Source_ParameterDB, DT_Raster2D);

    mdi.AddInput(VAR_NEPR, UNIT_DEPTH_MM, DESC_NEPR, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_TMEAN, UNIT_TEMP_DEG, DESC_TMEAN, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_DPST, UNIT_DEPTH_MM, DESC_DPST, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_SOTE, UNIT_TEMP_DEG, DESC_SOTE, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_IMPOUND_TRIG, UNIT_NON_DIM, DESC_IMPOUND_TRIG, Source_Module_Optional, DT_Raster1D);
    mdi.AddInput(VAR_POT_VOL, UNIT_DEPTH_MM, DESC_POT_VOL, Source_Module_Optional, DT_Raster1D);

    mdi.AddOutput(VAR_EXCP, UNIT_DEPTH_MM, DESC_EXCP, DT_Raster1D);
    mdi.AddOutput(VAR_INFIL, UNIT_DEPTH_MM, DESC_INFIL, DT_Raster1D);
    mdi.AddOutput(VAR_SOL_ST, UNIT_DEPTH_MM, DESC_SOL_ST, DT_Raster2D);
    mdi.AddOutput(VAR_SOL_SW, UNIT_DEPTH_MM, DESC_SOL_SW, DT_Raster1D);
    // 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;
}
Esempio n. 15
0
File: api.cpp Progetto: fannq/SEIMS
// 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(MCLS_GW, MCLSDESC_GW);
	mdi.SetDescription("Reservoir Method to calculate groundwater balance and baseflow.");
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetHelpfile("GWA_RE.chm");
	mdi.SetID("GWA_RE");
	mdi.SetName("GWA_RE");
	mdi.SetVersion("0.1");
	mdi.SetWebsite(SEIMS_SITE);

	mdi.AddParameter(Tag_TimeStep, UNIT_TIMESTEP_HOUR, DESC_TIMESTEP ,File_Config, 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_GW0, UNIT_DEPTH_MM, DESC_GW0, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_GWMAX, UNIT_DEPTH_MM, DESC_GWMAX, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_DF_COEF, UNIT_NON_DIM, DESC_DF_COEF, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_KG, UNIT_NON_DIM, DESC_KG, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_Base_ex, UNIT_NON_DIM, DESC_BASE_EX, Source_ParameterDB, DT_Single);

	mdi.AddParameter(VAR_SOILDEPTH, UNIT_DEPTH_MM, DESC_SOILDEPTH, Source_ParameterDB,DT_Raster1D);
	//mdi.AddParameter(Tag_SubbasinSelected, UNIT_NON_DIM, "The subbasion ids listed in file.out", File_Output, DT_Array1D);
	mdi.AddParameter(VAR_SUBBSN, UNIT_NON_DIM, DESC_SUBBSN, Source_ParameterDB,DT_Raster1D);
	mdi.AddParameter(VAR_SLOPE, UNIT_PERCENT, DESC_SLOPE, Source_ParameterDB, DT_Raster1D);
	mdi.AddInput(VAR_INET, UNIT_DEPTH_MM, DESC_INET, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_DEET, UNIT_DEPTH_MM, DESC_DEET, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_SOET, UNIT_DEPTH_MM, DESC_SOET, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_PET, UNIT_DEPTH_MM, DESC_PET, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_GWNEW, UNIT_DEPTH_MM, DESC_GWNEW, Source_Module, DT_Array1D);//from IUH_CH or other channel routing module

	mdi.AddInput(VAR_PERCO,UNIT_DEPTH_MM, DESC_PERCO, Source_Module,DT_Raster2D);
	mdi.AddInput(VAR_SOMO, UNIT_DEPTH_MM, DESC_SOMO, Source_Module, DT_Raster2D);

	mdi.AddOutput(VAR_GWWB, UNIT_NON_DIM, DESC_NONE, DT_Array2D);					//used for output file
	mdi.AddOutput(VAR_REVAP, UNIT_NON_DIM, DESC_NONE, DT_Raster1D);		//used by soil water balance module
	mdi.AddOutput(VAR_RG, UNIT_NON_DIM, DESC_NONE, DT_Array1D);					//used by soil water balance module
	mdi.AddOutput(VAR_SBQG, UNIT_NON_DIM, DESC_NONE, DT_Array1D);					//used by channel flow routing module
	mdi.AddOutput(VAR_SBPET, UNIT_NON_DIM, DESC_NONE, DT_Array1D);	
	mdi.AddOutput(VAR_SBGS, UNIT_NON_DIM, DESC_NONE, DT_Array1D);	

	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 16
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    MetadataInfo mdi;

    // set the information properties
    mdi.SetAuthor("Zhiqiang Yu, LiangJun Zhu");
    mdi.SetClass(MCLS_SNOW, MCLSDESC_SNOW);
    mdi.SetDescription(MDESC_SNO_SP);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MID_SNO_SP);
    mdi.SetName(MID_SNO_SP);
    mdi.SetVersion("1.1");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("SNO_SP.chm");

    mdi.AddParameter(VAR_T0, UNIT_TEMP_DEG, DESC_T0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_K_BLOW, UNIT_NON_DIM, DESC_K_BLOW, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_T_SNOW, UNIT_TEMP_DEG, DESC_T_SNOW, Source_ParameterDB, DT_Single);
	// I don't think VAR_SWE0 is useful. By LJ
    // mdi.AddParameter(VAR_SWE0, UNIT_DEPTH_MM, DESC_SWE0, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_LAG_SNOW, UNIT_NON_DIM, DESC_LAG_SNOW, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_C_SNOW6, UNIT_MELT_FACTOR, DESC_C_SNOW6, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_C_SNOW12, UNIT_MELT_FACTOR, DESC_C_SNOW12, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_SNOCOVMX, UNIT_DEPTH_MM, DESC_SNOCOVMX, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_SNO50COV, UNIT_NON_DIM, DESC_SNO50COV, Source_ParameterDB, DT_Single);
	// Net precipitation is updated after snow accumulation.
    mdi.AddInput(VAR_NEPR, UNIT_DEPTH_MM, DESC_NEPR, Source_Module, DT_Raster1D); // from interception module
    //TODO: SNAC is used as unknown variable in the execute() funtion, so why it here as Input, otherwise in Output? By LJ
    //mdi.AddInput(VAR_SNAC, UNIT_DEPTH_MM, DESC_SNAC, Source_Module,DT_Raster1D);	 // from snow water balance module
    // I think VAR_SWE is useless either. By LJ
	// mdi.AddInput(VAR_SWE, UNIT_DEPTH_MM, DESC_SWE, Source_Module, DT_Single);  // from snow water balance module
    // TODO: SNRD currently have not been implemented, therefore initialized as zero. By LJ
    // mdi.AddInput(VAR_SNRD, UNIT_DEPTH_MM, DESC_SNRD, Source_Module, DT_Raster1D); // from snow redistribution module
    // Snow sublimation will be considered in actual evpotranspiration module (AET_PTH), so no need to set as Input. By LJ
    // mdi.AddInput(VAR_SNSB, UNIT_DEPTH_MM, DESC_SNSB, Source_Module, DT_Raster1D); //from snow sublimation module
    mdi.AddInput(VAR_TMAX, UNIT_TEMP_DEG, DESC_TMAX, Source_Module, DT_Raster1D); // from interpolation module
    mdi.AddInput(VAR_TMEAN, UNIT_TEMP_DEG, DESC_TMEAN, Source_Module, DT_Raster1D);

    // set the output variables
    mdi.AddOutput(VAR_SNME, UNIT_DEPTH_MM, DESC_SNME, DT_Raster1D);
    mdi.AddOutput(VAR_SNAC, UNIT_DEPTH_MM, DESC_SNAC, DT_Raster1D);
	
    // 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;
}
Esempio n. 17
0
File: api.cpp Progetto: fannq/SEIMS
// 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("Junzhi Liu");
	mdi.SetClass(MCLS_CH_ROUTING, MCLSDESC_CH_ROUTING);
	mdi.SetDescription(MDESC_CH_MSK);
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetHelpfile("CH_MSK.chm");
	mdi.SetID(MID_CH_MSK);
	mdi.SetName(MID_CH_MSK);
	mdi.SetVersion("0.1");
	mdi.SetWebsite(SEIMS_SITE);

	mdi.AddParameter(Tag_HillSlopeTimeStep,UNIT_SECOND,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_MSK_X, UNIT_NON_DIM,DESC_MSK_X,Source_ParameterDB, DT_Single); 

	mdi.AddParameter(VAR_SLOPE,UNIT_PERCENT,DESC_SLOPE,Source_ParameterDB, DT_Raster1D); 
	mdi.AddParameter(VAR_FLOWDIR,UNIT_NON_DIM,DESC_FLOWDIR,Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_CHWIDTH,UNIT_LEN_M,DESC_CHWIDTH,Source_ParameterDB, DT_Raster1D); 
	// reach information
	mdi.AddParameter(Tag_FLOWOUT_INDEX_D8, UNIT_NON_DIM, DESC_FLOWOUT_INDEX_D8, Source_ParameterDB, DT_Array1D);
	mdi.AddParameter(Tag_FLOWIN_INDEX_D8,UNIT_NON_DIM,DESC_FLOWIN_INDEX_D8,Source_ParameterDB, DT_Array2D);
	mdi.AddParameter(VAR_STREAM_LINK, UNIT_NON_DIM,DESC_STREAM_LINK, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(Tag_ReachParameter, UNIT_NON_DIM, DESC_REACH_PARAMETER, Source_ParameterDB, DT_Array2D);
	mdi.AddParameter(VAR_CHS0,UNIT_STRG_M3M,DESC_CHS0,Source_ParameterDB, DT_Single);
	
	// from other module
	mdi.AddInput(VAR_SBQG,UNIT_FLOW_CMS,DESC_SBQG,Source_Module, DT_Array1D);
	mdi.AddInput(VAR_QSOIL,UNIT_FLOW_CMS,DESC_QSOIL,Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_QOVERLAND,UNIT_FLOW_CMS,DESC_QOVERLAND,Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_D_P,UNIT_DEPTH_MM,DESC_D_P,Source_Module, DT_Raster1D);

	// output
	mdi.AddOutput(VAR_QCH,UNIT_FLOW_CMS,DESC_QCH, DT_Array2D);
	mdi.AddOutput(VAR_QOUTLET,UNIT_FLOW_CMS,DESC_QOUTLET, DT_Single);
	mdi.AddOutput(VAR_QSUBBASIN,UNIT_FLOW_CMS, DESC_QSUBBASIN, DT_Array1D);
	mdi.AddOutput(VAR_HCH,UNIT_DEPTH_MM, DESC_HCH, DT_Array2D);

	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 18
0
File: api.cpp Progetto: fannq/SEIMS
// 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(MCLS_SED_ROUTING, MCLSDESC_SED_ROUTING);
	mdi.SetDescription(MDESC_SEDR_VCD);
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetHelpfile("SEDR_VCD.chm");
	mdi.SetID(MID_SEDR_VCD);
	mdi.SetName(MID_SEDR_VCD);
	mdi.SetVersion("0.1");
	mdi.SetWebsite(SEIMS_SITE);
#ifdef STORM_MODEL
	mdi.AddParameter(Tag_ChannelTimeStep,UNIT_SECOND,DESC_TIMESTEP,File_Input,DT_Single);  //for long term model // this method is daily time interval based.
#else
	mdi.AddParameter(Tag_TimeStep,UNIT_SECOND,DESC_TIMESTEP,File_Input,DT_Single); /// in Module Settings: time_t SettingsInput::getDtDaily() const{return 86400;}
#endif
	mdi.AddParameter(VAR_P_RF,UNIT_NON_DIM, DESC_P_RF,Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_SPCON,UNIT_NON_DIM, DESC_SPCON,Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_SPEXP,UNIT_NON_DIM,DESC_SPEXP ,Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_VCRIT,UNIT_SPEED_MS, DESC_VCRIT,Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_CHS0, UNIT_STRG_M3M, DESC_CHS0, Source_ParameterDB, DT_Single);
	mdi.AddParameter(Tag_RchParam,UNIT_NON_DIM,DESC_REACH_PARAMETER, Source_ParameterDB,DT_Array2D);

	mdi.AddInput(VAR_SED_TO_CH,UNIT_TONS,DESC_SED_TO_CH,Source_Module, DT_Array1D);  // for longterm model
	mdi.AddInput(VAR_SUB_SEDTOCH,UNIT_KG,DESC_SUB_SEDTOCH,Source_Module, DT_Array1D);   // for storm model
	mdi.AddInput(VAR_QRECH,UNIT_FLOW_CMS,DESC_QRECH,Source_Module,DT_Array1D);
	mdi.AddInput(VAR_QS,UNIT_FLOW_CMS,DESC_QS,Source_Module,DT_Array1D);
	mdi.AddInput(VAR_QI,UNIT_FLOW_CMS,DESC_QI,Source_Module,DT_Array1D);
	mdi.AddInput(VAR_QG,UNIT_FLOW_CMS,DESC_QG,Source_Module,DT_Array1D);
	mdi.AddInput(VAR_CHST, UNIT_VOL_M3, DESC_CHST,Source_Module,DT_Array1D);
	mdi.AddInput(VAR_CHWTDEPTH, UNIT_LEN_M, DESC_CHWTDEPTH, Source_Module,DT_Array1D);

	mdi.AddOutput(VAR_SED_RECH,UNIT_TONS,DESC_SED_RECH,DT_Array1D);
	mdi.AddOutput(VAR_CHSB,UNIT_NON_DIM,DESC_CHSB,DT_Array2D);
	mdi.AddOutput(VAR_SED_OUTLET,UNIT_TONS,DESC_SED_OUTLET, DT_Single);
	// set the dependencies
	mdi.AddDependency(MCLS_OL_EROSION,MCLSDESC_OL_EROSION);   
	mdi.AddDependency(MCLS_CH_ROUTING, MCLSDESC_CH_ROUTING);   	//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;
}
Esempio n. 19
0
File: api.cpp Progetto: fannq/SEIMS
// 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(MCLS_SUR_RUNOFF, MCLSDESC_SUR_RUNOFF);
	mdi.SetDescription(MDESC_SUR_CN);
	mdi.SetEmail(SEIMS_EMAIL);
	mdi.SetHelpfile("SUR_CN.chm");
	mdi.SetID(MID_SUR_CN);
	mdi.SetName(MID_SUR_CN);
	mdi.SetVersion("0.1");
	mdi.SetWebsite(SEIMS_SITE);

	mdi.AddParameter(VAR_T_SNOW, UNIT_TEMP_DEG, DESC_T_SNOW, Source_ParameterDB,DT_Single);
	mdi.AddParameter(VAR_T_SOIL, UNIT_TEMP_DEG, DESC_T_SOIL, Source_ParameterDB, DT_Single);
	mdi.AddParameter(VAR_T0, UNIT_TEMP_DEG, DESC_T0, Source_ParameterDB,DT_Single);
	mdi.AddParameter(VAR_S_FROZEN, UNIT_NON_DIM, DESC_S_FROZEN, Source_ParameterDB, DT_Single);  

	mdi.AddParameter(VAR_CN2, UNIT_NON_DIM, DESC_CN2, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_MOIST_IN, UNIT_VOL_FRA_M3M3, DESC_MOIST_IN, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_ROOTDEPTH, UNIT_LEN_M,DESC_ROOTDEPTH,Source_ParameterDB,DT_Raster1D);

	mdi.AddParameter(VAR_SOILDEPTH, UNIT_LEN_M, DESC_SOILDEPTH, Source_ParameterDB, DT_Raster2D);
	mdi.AddParameter(VAR_FIELDCAP, UNIT_VOL_FRA_M3M3, DESC_FIELDCAP, Source_ParameterDB, DT_Raster2D);
	mdi.AddParameter(VAR_POROST,  UNIT_NON_DIM, DESC_POROST, Source_ParameterDB, DT_Raster2D);
	mdi.AddParameter(VAR_WILTPOINT, UNIT_VOL_FRA_M3M3, DESC_WILTPOINT, Source_ParameterDB, DT_Raster2D);
	
	mdi.AddInput(VAR_NEPR, UNIT_DEPTH_MM, DESC_NEPR, Source_Module,DT_Raster1D);					//from interception module
	mdi.AddInput(VAR_TMEAN, UNIT_TEMP_DEG, DESC_TMEAN, Source_Module, DT_Raster1D);
	mdi.AddInput(VAR_DPST, UNIT_DEPTH_MM, DESC_DPST, Source_Module,DT_Raster1D);					//from depression module
	mdi.AddInput(VAR_SOTE, UNIT_TEMP_DEG, DESC_SOTE, Source_Module,DT_Raster1D);			//from soil temperature module
	mdi.AddInput(VAR_SNAC, UNIT_DEPTH_MM, DESC_SNAC, Source_Module,DT_Raster1D);					//from snow accumulation module
	mdi.AddInput(VAR_SNME, UNIT_DEPTH_MM, DESC_SNME, Source_Module,DT_Raster1D);								//from snowmelt module

	mdi.AddOutput(VAR_EXCP,  UNIT_DEPTH_MM, DESC_EXCP, DT_Raster1D);// just for depression module.
	mdi.AddOutput(VAR_INFIL, UNIT_DEPTH_MM, DESC_INFIL, DT_Raster1D);
	mdi.AddOutput(VAR_SOMO, UNIT_VOL_FRA_M3M3, DESC_SOMO, DT_Raster2D);

	// 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;
}
Esempio n. 20
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    MetadataInfo mdi;

    mdi.SetAuthor("Chunping Ou");
    mdi.SetClass(MCLS_WTRBALANCE, MCLSDESC_WTRBALANCE);
    mdi.SetDescription(MDESC_SOL_WB);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MID_SOL_WB);
    mdi.SetName(MID_SOL_WB);
    mdi.SetVersion("1.0");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("SOL_WB.chm");

	mdi.AddParameter(VAR_SOL_ZMX, UNIT_DEPTH_MM, DESC_SOL_ZMX, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_SOILTHICK,UNIT_DEPTH_MM, DESC_SOILTHICK, Source_ParameterDB, DT_Raster1D);
	/// add DT_Subbasin
	mdi.AddParameter(VAR_SUBBASIN_PARAM, UNIT_NON_DIM, DESC_SUBBASIN_PARAM, Source_ParameterDB, DT_Subbasin);

    mdi.AddInput(VAR_NEPR, UNIT_DEPTH_MM, DESC_NEPR, Source_Module, DT_Raster1D);// m_pNet
    mdi.AddInput(VAR_INFIL, UNIT_DEPTH_MM, DESC_INFIL, Source_Module, DT_Raster1D);// m_Infil
    mdi.AddInput(VAR_SOET, UNIT_DEPTH_MM, DESC_SOET, Source_Module, DT_Raster1D);//m_ES
    mdi.AddInput(VAR_REVAP, UNIT_DEPTH_MM, DESC_REVAP, Source_Module, DT_Raster1D);//m_Revap
    mdi.AddInput(VAR_SSRU, UNIT_DEPTH_MM, DESC_SSRU, Source_Module, DT_Raster2D);//m_RI
    mdi.AddInput(VAR_PERCO, UNIT_DEPTH_MM, DESC_PERCO, Source_Module, DT_Raster2D);//m_Perco
    mdi.AddInput(VAR_SOL_ST, UNIT_DEPTH_MM, DESC_SOL_ST, Source_Module, DT_Raster2D);//m_somo
	//variables used to output
	mdi.AddInput(VAR_PCP, UNIT_DEPTH_MM, DESC_PCP, Source_Module, DT_Raster1D); //m_PCP
	mdi.AddInput(VAR_INLO, UNIT_DEPTH_MM, DESC_INLO, Source_Module, DT_Raster1D);//m_Interc
	mdi.AddInput(VAR_DPST, UNIT_DEPTH_MM, DESC_DPST, Source_Module, DT_Raster1D);//m_Dep
	mdi.AddInput(VAR_INET, UNIT_DEPTH_MM, DESC_INET, Source_Module, DT_Raster1D);//m_EI
	mdi.AddInput(VAR_DEET, UNIT_DEPTH_MM, DESC_DEET, Source_Module, DT_Raster1D);//m_ED
    mdi.AddInput(VAR_SURU, UNIT_DEPTH_MM, DESC_SURU, Source_Module, DT_Raster1D);//m_RS
    mdi.AddInput(VAR_RG, UNIT_DEPTH_MM, DESC_RG, Source_Module, DT_Array1D);//m_RG
	mdi.AddInput(VAR_SNSB, UNIT_DEPTH_MM, DESC_SNSB, Source_Module_Optional,DT_Raster1D);//m_SE
	mdi.AddInput(VAR_TMEAN, UNIT_TEMP_DEG, DESC_TMEAN, Source_Module, DT_Raster1D);//m_tMean
    mdi.AddInput(VAR_SOTE, UNIT_TEMP_DEG, DESC_SOTE, Source_Module, DT_Raster1D);//m_SoilT

    // set the output variables
    mdi.AddOutput(VAR_SOWB, UNIT_DEPTH_MM, DESC_SOWB, DT_Array2D);

    string res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 21
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	mdi.SetAuthor("Cheng Wei");
	mdi.SetClass("Yield", "Calculate the amount of yield.");
	mdi.SetDescription("For simplicity purpose for the time being, the algorithm used in the original WetSpa is incorporated in the SEIMS.");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("Yield");
	mdi.SetName("Yield");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("Yield.chm");

	mdi.AddParameter("IDC","","land cover/plant classification","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("CNYLD","","fraction of nitrogen in the yield","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("CPYLD","kg/ha"," fraction of phosphorus in the yield","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("HVSTI","kg/ha"," potential harvest index for the plant at maturity given ideal growing conditions","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("WSYF","","harvest index for the plant in drought conditions and represents the minimum harvest index allowed for the plant","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("DLAI","","Decline LAI Fraction","ParameterDB_Crop",DT_Raster);
	mdi.AddParameter("harvestDate","","the simulation end of date","ParameterDB",DT_Raster);

	mdi.AddInput("LAI","","leaf area index for a given day","Module", DT_Raster);
	
	mdi.AddInput("D_PET","mm/d", "Potential evapotranspiration", "Module",DT_Raster);///////????zhiqinag: "D_PETC"
	mdi.AddInput("D_SOET","mm","soil evapotranpiration","Module",DT_Raster);					//actual evapotranspiration
	mdi.AddInput("Fr_PHU","","fraction of phu accumulated on a given day ","Module",DT_Raster);
	mdi.AddInput("BIOMASS_N","kg/ha","actual biomass N","Module",DT_Raster);
	mdi.AddInput("BIOMASS_P","kg/ha","actual biomass P","Module",DT_Raster);
	mdi.AddInput("BIOMASS_AG","kg/ha"," aboveground biomass on the day of harvest","Module",DT_Raster);
	mdi.AddInput("BIOMASS_ROOT","kg/ha","biomass root","Module",DT_Raster);
	mdi.AddInput("BIOMASS","kg/ha","total biomass","Module",DT_Raster);
	mdi.AddInput("Total_WaterUptake","mm","total water uptake","Module",DT_Raster); 
	// set the output variables
	mdi.AddOutput("Yield_N","kg/ha","amount of nitrogen removed in the yield",DT_Raster);
	mdi.AddOutput("Yield_P","kg/ha","amount of phosphorus removed in the yield",DT_Raster);
	mdi.AddOutput("Yield","kg/ha","crop yield",DT_Raster);

	// 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;
}
Esempio n. 22
0
extern "C" SEIMS_MODULE_API const char* MetadataInformation() {
    MetadataInfo mdi;
    mdi.SetAuthor("Huiran Gao; Liangjun Zhu");
    mdi.SetClass(MCLS_NUTRGW, MCLSDESC_NUTRGW);
    mdi.SetDescription(MDESC_NUTRGW);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MDESC_NUTRGW);
    mdi.SetName(MDESC_NUTRGW);
    mdi.SetVersion("1.1");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("");

    // set the parameters
    mdi.AddParameter(Tag_TimeStep, UNIT_SECOND, DESC_TIMESTEP, File_Config, DT_Single);
    mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_SUBBSNID_NUM, UNIT_NON_DIM, DESC_SUBBSNID_NUM, Source_ParameterDB, DT_Single);
    mdi.AddParameter(Tag_SubbasinId, UNIT_NON_DIM, Tag_SubbasinId, Source_ParameterDB, DT_Single);
    // parameters for subbasin sum
    mdi.AddParameter(VAR_SUBBSN, UNIT_NON_DIM, DESC_SUBBSN, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_SUBBASIN_PARAM, UNIT_NON_DIM, DESC_SUBBASIN_PARAM, Source_ParameterDB, DT_Subbasin);
    mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_GW0, UNIT_DEPTH_MM, DESC_GW0, Source_ParameterDB, DT_Single);
    // add reach information
    mdi.AddParameter(VAR_REACH_PARAM, UNIT_NON_DIM, DESC_REACH_PARAM, Source_ParameterDB, DT_Reach);
    // set the input from other modules
    mdi.AddInput(VAR_SBQG, UNIT_FLOW_CMS, DESC_SBQG, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_SBGS, UNIT_DEPTH_MM, DESC_SBGS, Source_Module, DT_Array1D);

    mdi.AddInput(VAR_SOL_NO3, UNIT_CONT_KGHA, DESC_SOL_NO3, Source_Module, DT_Raster2D);
    mdi.AddInput(VAR_SOL_SOLP, UNIT_CONT_KGHA, DESC_SOL_SOLP, Source_Module, DT_Raster2D);

    mdi.AddInput(VAR_PERCO_N_GW, UNIT_KG, DESC_PERCO_N, Source_Module, DT_Array1D);
    mdi.AddInput(VAR_PERCO_P_GW, UNIT_KG, DESC_PERCO_P, Source_Module, DT_Array1D);

    // set the output variables
    mdi.AddOutput(VAR_GWNO3_CONC, UNIT_CONCENTRATION, DESC_GWNO3_CONC, DT_Array1D);
    mdi.AddOutput(VAR_GWSOLP_CONC, UNIT_CONCENTRATION, DESC_GWSOLP, DT_Array1D);
    mdi.AddOutput(VAR_NO3GW_TOCH, UNIT_KG, DESC_NO3GW_CH, DT_Array1D);
    mdi.AddOutput(VAR_MINPGW_TOCH, UNIT_KG, DESC_MINPGW_CH, DT_Array1D);
    mdi.AddOutput(VAR_GWNO3, UNIT_KG, DESC_GWNO3, DT_Array1D);
    mdi.AddOutput(VAR_GWSOLP, UNIT_KG, DESC_GWSOLP_CONC, DT_Array1D);

    string res = mdi.GetXMLDocument();
    char* tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 23
0
File: api.cpp Progetto: gaohr/SEIMS
/// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    MetadataInfo mdi;
    string res;

    mdi.SetAuthor("LiangJun Zhu");
    mdi.SetClass(MCLS_AET, MCLSDESC_AET);
    mdi.SetDescription(MDESC_AET_PTH);
    mdi.SetID(MID_AET_PTH);
    mdi.SetName(MID_AET_PTH);
    mdi.SetVersion("1.1");
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("");
    /// set parameters from database
    mdi.AddParameter(VAR_ESCO, UNIT_NON_DIM, DESC_ESCO, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_SOILDEPTH, UNIT_DEPTH_MM, DESC_SOILDEPTH, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_SOILTHICK, UNIT_DEPTH_MM, DESC_SOILTHICK, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_SOL_AWC, UNIT_DEPTH_MM, DESC_SOL_AWC, Source_ParameterDB, DT_Raster2D);

    mdi.AddParameter(VAR_SOL_NO3, UNIT_CONT_KGHA, DESC_SOL_NO3, Source_Module, DT_Raster2D);
    /// set input from other modules
    mdi.AddInput(DataType_MeanTemperature, UNIT_TEMP_DEG, DESC_TMEAN, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_LAIDAY, UNIT_AREA_RATIO, DESC_LAIDAY, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_PET, UNIT_WTRDLT_MMD, DESC_PET, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_INET, UNIT_DEPTH_MM, DESC_INET, Source_Module_Optional, DT_Raster1D);
    mdi.AddInput(VAR_SNAC, UNIT_DEPTH_MM, DESC_SNAC, Source_Module, DT_Raster1D); /// in swat, sno_hru
    mdi.AddInput(VAR_SNSB, UNIT_DEPTH_MM, DESC_SNSB, Source_Module_Optional, DT_Raster1D);
    mdi.AddInput(VAR_SOL_COV, UNIT_CONT_KGHA, DESC_SOL_COV, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_SOL_ST, UNIT_DEPTH_MM, DESC_SOL_ST, Source_Module, DT_Raster2D);/// sol_st in SWAT
    mdi.AddInput(VAR_SOL_SW, UNIT_DEPTH_MM, DESC_SOL_SW, Source_Module, DT_Raster1D); /// sol_sw in SWAT
    /// set the output variables
    mdi.AddOutput(VAR_SNSB, UNIT_DEPTH_MM, DESC_SNSB, DT_Raster1D); /// in swat, snoev
    mdi.AddOutput(VAR_PPT, UNIT_DEPTH_MM, DESC_PPT, DT_Raster1D);
    mdi.AddOutput(VAR_SOET, UNIT_DEPTH_MM, DESC_SOET, DT_Raster1D);
    mdi.AddOutput(VAR_SNAC, UNIT_DEPTH_MM, DESC_SNAC, DT_Raster1D);
    mdi.AddOutput(VAR_SNO3UP, UNIT_CONT_KGHA, DESC_SNO3UP, DT_Single);
    //mdi.AddOutput(VAR_SOL_SW, UNIT_DEPTH_MM, DESC_SOL_SW, DT_Raster1D); /// mm, different from VAR_SOMO
    //mdi.AddOutput(VAR_SOMO, UNIT_DEPTH_MM, DESC_SOL_ST, DT_Raster2D);
    /// write out the XML file.
    res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 24
0
// 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("Junzhi Liu");
	mdi.SetClass("interflow routing", "interflow routing.");
	mdi.SetDescription("interflow routing using the method of WetSpa model.");
	mdi.SetEmail("*****@*****.**");
	mdi.SetHelpfile("INTERFLOW_IKW.chm");
	mdi.SetID("INTERFLOW_IKW");
	mdi.SetName("INTERFLOW_IKW");
	mdi.SetVersion("0.1");
	mdi.SetWebsite("http://seims.github.io/SEIMS");

	mdi.AddParameter("DT_HS", "second", "Time step of the simulation", "file.in", DT_Single); 
	mdi.AddParameter("CellWidth", "m", "Cell size", "file.in", DT_Single); 

	mdi.AddParameter("Slope", "%", "Slope", "ParameterDB_WaterBalance", DT_Raster); 
	mdi.AddParameter("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster); 

	mdi.AddParameter("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster); 
	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.AddParameter("Conductivity","mm/h","Soil hydraulic conductivity","ParameterDB_WaterBalance", DT_Raster); 
	mdi.AddParameter("Porosity", "%", "Soil porosity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("FieldCap", "%", "Field capacity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("RootDepth", "mm", "Root depth","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("Poreindex","-","pore size distribution index","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("Ki","-","Interflow scale factor","ParameterDB_WaterBalance",DT_Single);

	mdi.AddInput("D_SOMO","%","Soil Moisture","Module", DT_Raster);
	mdi.AddInput("D_SURU", "mm", "surface runoff (considering return flow)", "Module", DT_Raster);
	
	mdi.AddOutput("QSoil", "m3/s", "Flux in the downslope boundary of cells", DT_Raster);
	mdi.AddOutput("ReturnFlow", "mm", "water depth of return flow", DT_Raster);

	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 25
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	// set the information properties
	mdi.SetAuthor("Zhiqiang Yu");
	mdi.SetClass("Snowmelt", "Calculate the amount of snow melt.");
	mdi.SetDescription("Snowpack Daily, SWAT p57-59");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("SNO_SP");
	mdi.SetName("SNO_SP");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("SNO_SP.chm");

	//mdi.AddParameter("c_snow","mm/oC/delta_t","temperature impact factor ","ParameterDB_Snow",DT_Single);
	//mdi.AddParameter("c_rain","mm/mm/oC/delta_t","Rainfall impact factor","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("T0","oC","the snowmelt threshold temperature ","ParameterDB_Snow",DT_Single);	
	mdi.AddParameter("K_blow","-"," a fraction coefficient of snow blowing into or out of the watershed","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("T_snow","oC","snowfall temperature","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("swe0","mm","Initial snow water equivalent","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("lag_snow","-","Snow temperature lag factor","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("c_snow6","mm/oC/day","Melt factor on June 21","ParameterDB_Snow",DT_Single);
	mdi.AddParameter("c_snow12","mm/oC/day","Melt factor on Decemeber 21","ParameterDB_Snow",DT_Single);

	mdi.AddInput("D_NEPR","mm","net precipitation","Module",DT_Raster);								// from interception module
	mdi.AddInput("D_SNAC","mm", "distribution of snow accumulation", "Module",DT_Raster);				// from snow water balance module
	mdi.AddInput("SWE","mm","average SA of the watershed","Module",DT_Single);									// from snow water balance module
	mdi.AddInput("D_SNRD","mm", "distribution of snow blowing in or out the cell","Module", DT_Raster); // from snow redistribution module
	mdi.AddInput("D_SNSB","mm", "Distribution of snow sublimation (water equivalent) for a user defined period","Module",DT_Raster); //from snow sublimation module
	mdi.AddInput("D_TMIN","oC","min temperature","Module",DT_Raster);									// from interpolation module
	mdi.AddInput("D_TMAX","oC","max temperature","Module",DT_Raster);									// from interpolation module


	// set the output variables
	mdi.AddOutput("SNME","mm", "distribution of snowmelt", DT_Raster);

	// 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;
}
Esempio n. 26
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	mdi.SetAuthor("Zhiqiang Yu");
	mdi.SetClass("erosion", "Calculate the amount of sediment yield.");
	mdi.SetDescription("use MUSLE method to calcualte sediment yield of each cell");
	mdi.SetEmail("");
	mdi.SetID("MUSLE_I30");
	mdi.SetName("MUSLE_I30");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("");
	mdi.SetHelpfile("MUSLE_I30.chm");

	mdi.AddParameter("cellwidth","m","the width (length) of cell","mask.asc",DT_Single);
	mdi.AddParameter("USLE_C","","the cover management factor","ParameterDB_Sediment",DT_MapWindowRaster);
	mdi.AddParameter("USLE_P","","the erosion control practice factor ","ParameterDB_Sediment",DT_MapWindowRaster);
	mdi.AddParameter("USLE_K","","the soil erodibility factor","ParameterDB_Sediment",DT_MapWindowRaster);
	mdi.AddParameter("flow_acc","","the number of flow accumulation cells of each cell","ParameterDB_Sediment",DT_MapWindowRaster);
	mdi.AddParameter("slope","%","slope of the cell","ParameterDB_WaterBalance",DT_MapWindowRaster);

	mdi.AddParameter("T0_s","hr","time of concentration","ParameterDB_Sediment",DT_MapWindowRaster);
	mdi.AddParameter("adj_pkr","","peak rate adjustment factor","ParameterDB_Sediment",DT_Single);
	mdi.AddParameter("rain_yrs","","number of yeares of data used to obtain values for RAINHHMX","ParameterDB_Sediment",DT_Single);

	mdi.AddParameter("p_stat","","static information of precipitation","HydroclimateDB",DT_Array2D);

	//input from other module	
	mdi.AddInput("D_SURU","mm","surface runoff","Module",DT_MapWindowRaster);		//from depression module
	mdi.AddInput("D_SNAC","mm","snow accumulation","Module",DT_MapWindowRaster);	//from snow water balance module
	mdi.AddInput("D_P","mm","precipitation","Module",DT_MapWindowRaster);			//from interpolation module
	mdi.AddInput("D_SNME","mm","snow melt","Module",DT_MapWindowRaster);			//from snow melt module

	// set the output variables
	mdi.AddOutput("SOER","metric tons", "distribution of soil erosion", DT_MapWindowRaster);

	// 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;
}
Esempio n. 27
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char *MetadataInformation()
{
    MetadataInfo mdi;

    // set the information properties
    mdi.SetAuthor("Junzhi Liu");
    mdi.SetClass(MCLS_PERCO, MCLSDESC_PERCO);
    mdi.SetDescription(MDESC_PER_PI);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MID_PER_PI);
    mdi.SetName(MID_PER_PI);
    mdi.SetVersion("0.5");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("PER_PI.chm");

    mdi.AddParameter(Tag_TimeStep, UNIT_SECOND, UNIT_NON_DIM, File_Input, DT_Single);
    mdi.AddParameter(VAR_T_SOIL, UNIT_TEMP_DEG, DESC_T_SOIL, Source_ParameterDB, DT_Single);

    //mdi.AddParameter(VAR_SOILDEPTH, UNIT_LEN_M, DESC_SOILDEPTH, Source_ParameterDB, DT_Raster2D);
	mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D);
	mdi.AddParameter(VAR_SOILTHICK, UNIT_DEPTH_MM, DESC_SOILTHICK, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_CONDUCT, UNIT_WTRDLT_MMH, DESC_CONDUCT, Source_ParameterDB, DT_Raster2D);
    mdi.AddParameter(VAR_POREID, UNIT_NON_DIM, DESC_POREID, Source_ParameterDB, DT_Raster2D);
    //mdi.AddParameter(VAR_POROST, UNIT_NON_DIM, DESC_POROST, Source_ParameterDB, DT_Raster2D); => VAR_SOL_UL
    //mdi.AddParameter(VAR_FIELDCAP, UNIT_WAT_RATIO, DESC_FIELDCAP, Source_ParameterDB, DT_Raster2D); => VAR_SOL_AWC
	//mdi.AddParameter(VAR_WILTPOINT,UNIT_WAT_RATIO, DESC_WILTPOINT, Source_ParameterDB, DT_Raster2D); => VAR_SOL_WPMM
	mdi.AddParameter(VAR_SOL_UL, UNIT_DEPTH_MM, DESC_SOL_UL, Source_ParameterDB, DT_Raster2D); // m_sat
	mdi.AddParameter(VAR_SOL_AWC, UNIT_DEPTH_MM, DESC_SOL_AWC, Source_ParameterDB, DT_Raster2D); // m_fc
	mdi.AddParameter(VAR_SOL_WPMM, UNIT_DEPTH_MM, DESC_SOL_WPMM, Source_ParameterDB, DT_Raster2D); // m_wp

    mdi.AddInput(VAR_SOTE, UNIT_TEMP_DEG, DESC_SOTE, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_INFIL, UNIT_DEPTH_MM, DESC_INFIL, Source_Module, DT_Raster1D);
    mdi.AddInput(VAR_SOL_ST, UNIT_DEPTH_MM, DESC_SOL_ST, Source_Module, DT_Raster2D);
	mdi.AddInput(VAR_SOL_SW, UNIT_DEPTH_MM, DESC_SOL_SW, Source_Module, DT_Raster1D);
    // set the output variables
    mdi.AddOutput(VAR_PERCO, UNIT_DEPTH_MM, DESC_PERCO, DT_Raster2D);

    string res = mdi.GetXMLDocument();

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}
Esempio n. 28
0
// 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("Junzhi Liu");
	mdi.SetClass("Surface runoff", "Calculate infiltration and excess precipitation using saturation excess mechanism.");
	mdi.SetDescription("saturation excess method to calculate infiltration and excess precipitation.");
	mdi.SetEmail("*****@*****.**");
	mdi.SetHelpfile("SUR_ES.chm");
	mdi.SetID("SUR_ES");
	mdi.SetName("SUR_ES");
	mdi.SetVersion("0.1");
	mdi.SetWebsite("http://www.website.com");

	mdi.AddParameter("TimeStep","s","time step","file.in",DT_Single); 
	mdi.AddParameter("Conductivity","mm/h","Soil hydraulic conductivity","ParameterDB_WaterBalance", DT_Raster); 
	mdi.AddParameter("Moist_in","%","Initial soil moisture","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("Porosity", "%", "Soil porosity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("FieldCap", "%", "Field capacity","ParameterDB_WaterBalance", DT_Raster);
	mdi.AddParameter("RootDepth", "mm", "Root depth","ParameterDB_WaterBalance", DT_Raster);

	mdi.AddInput("D_TMin","degree Celsius","The minimum air temperature","Module",DT_Raster);	//from interpolation module
	mdi.AddInput("D_TMax","degree Celsius","The maximum air temperature","Module",DT_Raster);	//from interpolation module

	mdi.AddInput("D_NEPR","mm","The net precipitation","Module", DT_Raster);
	mdi.AddInput("D_DPST","mm","The depression storage","Module",DT_Raster);
	mdi.AddInput("D_SOTE","degree Celsius","The soil temperature","Module",DT_Raster);			//from soil temperature module
	mdi.AddInput("D_SNAC","mm","The snow accumulation","Module",DT_Raster);					//from snow accumulation module
	mdi.AddInput("D_SNME","mm","The snowmelt","Module",DT_Raster);								//from snowmelt module

	
	mdi.AddOutput("SOMO", "%", "soil moisture", DT_Raster);
	mdi.AddOutput("EXCP", "mm","The excess precipitation", DT_Raster);
	mdi.AddOutput("INFIL","mm","Infiltration map of watershed", DT_Raster);
	
	res = mdi.GetXMLDocument();

	char* tmp = new char[res.size()+1];
	strprintf(tmp, res.size()+1, "%s", res.c_str());
	return tmp;
}
Esempio n. 29
0
// function to return the XML Metadata document string
extern "C" SEIMS_MODULE_API const char* MetadataInformation()
{
	MetadataInfo mdi;

	// set the information properties
	mdi.SetAuthor("Zhiqiang Yu");
	mdi.SetClass("erosion", "Calculate the amount of sediment yield.");
	mdi.SetDescription("use MUSLE method to calcualte sediment yield of each cell");
	mdi.SetEmail("*****@*****.**");
	mdi.SetID("MUSLE_AS");
	mdi.SetName("MUSLE_AS");
	mdi.SetVersion("0.5");
	mdi.SetWebsite("http://seims.github.io/SEIMS");
	mdi.SetHelpfile("MUSLE_AS.chm");

	//3 grid parameter
	mdi.AddParameter("CellWidth","m","the width (length) of cell","mask.asc",DT_Single);
	mdi.AddParameter("USLE_C","","the cover management factor","ParameterDB_Sediment",DT_Raster);
	mdi.AddParameter("USLE_P","","the erosion control practice factor ","ParameterDB_Sediment",DT_Raster);
	mdi.AddParameter("USLE_K","","the soil erodibility factor","ParameterDB_Sediment",DT_Raster);
	mdi.AddParameter("acc","","the number of flow accumulation cells of each cell","ParameterDB_Sediment",DT_Raster);
	mdi.AddParameter("slope","%","slope of the cell","ParameterDB_WaterBalance",DT_Raster);
	mdi.AddParameter("subbasin","","subbasin grid","ParameterDB_Snow", DT_Raster);
	mdi.AddParameter("STREAM_LINK", "", "Stream link (id of reaches)", "ParameterDB_Discharge", DT_Raster);
	
	//input from other module	
	mdi.AddInput("D_SURU","mm","surface runoff","Module",DT_Raster);		//from depression module
	mdi.AddInput("D_SNAC","mm","snow accumulation","Module",DT_Raster);	//from snow water balance module

	// set the output variables
	mdi.AddOutput("SOER","metric tons", "distribution of soil erosion", DT_Raster);
	mdi.AddOutput("USLE_LS","USLE LS factor", "USLE LS factor", DT_Raster);

	mdi.AddOutput("SEDTOCH","metric tons", "sediment to channel", DT_Array1D);  // added by wu hui
	mdi.AddOutput("SEDTOCH_T","kg", "Total sediment flowing to channel", DT_Single); // added by wu hui
	// 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;
}
Esempio n. 30
0
// 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("Alex Storey, Junzhi Liu");
    mdi.SetClass(MCLS_INTERC, MCLSDESC_INTERC);
    mdi.SetDescription(MDESC_PI_STORM);
    mdi.SetEmail(SEIMS_EMAIL);
    mdi.SetID(MID_PI_STORM);
    mdi.SetName(MID_PI_STORM);
    mdi.SetVersion("0.4");
    mdi.SetWebsite(SEIMS_SITE);
    mdi.SetHelpfile("");

    // set the input variables (time series)
    mdi.AddInput(VAR_PCP, UNIT_DEPTH_MM, DESC_PCP, Source_Module, DT_Raster1D);
    mdi.AddParameter(VAR_SLOPE, UNIT_PERCENT, DESC_SLOPE, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(Tag_HillSlopeTimeStep, UNIT_SECOND, DESC_TIMESTEP, File_Input, DT_Single);
    // set the parameters (non-time series)
    mdi.AddParameter(VAR_INTERC_MAX, UNIT_DEPTH_MM, DESC_INTERC_MAX, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_INTERC_MIN, UNIT_DEPTH_MM, DESC_INTERC_MIN, Source_ParameterDB, DT_Raster1D);
    mdi.AddParameter(VAR_PI_B, UNIT_NON_DIM, DESC_PI_B, Source_ParameterDB, DT_Single);
    mdi.AddParameter(VAR_INIT_IS, UNIT_NON_DIM, DESC_INIT_IS, Source_ParameterDB, DT_Single);

    // set the output variables
    mdi.AddOutput(VAR_INLO, UNIT_DEPTH_MM, DESC_INLO, DT_Raster1D);
    mdi.AddOutput(VAR_NEPR, UNIT_DEPTH_MM, DESC_NEPR, DT_Raster1D);
    // set the dependencies
    mdi.AddDependency(MCLS_CLIMATE, MCLSDESC_CLIMATE);

    // write out the XML file.
    res = mdi.GetXMLDocument();

    //return res;

    char *tmp = new char[res.size() + 1];
    strprintf(tmp, res.size() + 1, "%s", res.c_str());
    return tmp;
}