// 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("*****@*****.**"); 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; }
// 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("Dissolved Nutrient OL", "Dissolved Nutrient Overland."); mdi.SetDescription("Dissolved Nutrient Overland transport method using Knisel functions."); mdi.SetEmail("*****@*****.**"); mdi.SetHelpfile("DissolvedNutrient_OL.chm"); mdi.SetID("DissolvedNutrient_OL"); mdi.SetName("DissolvedNutrient_OL"); 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("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_Raster); mdi.AddParameter("Porosity", "m/m", "Soil porosity", "ParameterDB_WaterBalance", DT_Raster); mdi.AddParameter("CHWIDTH", "m", "Channel width", "ParameterDB_Discharge", DT_Raster); mdi.AddInput("D_FlowWidth","m", "Flow width of overland plane","Module",DT_Raster); //mdi.AddInput("D_FlowLen","m", "Flow length of overland plane","Module",DT_Raster); mdi.AddParameter("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster); mdi.AddParameter("Manning", "", "Manning's roughness", "ParameterDB_Discharge", DT_Raster); //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_CELLQ", "m3/s", "Flux in the downslope boundary of cells", "Module",DT_Raster); mdi.AddInput("D_CELLH","mm","Water depth in the downslope boundary of cells","Module",DT_Raster); mdi.AddInput("D_INFIL","mm","Infiltration map of watershed", "Module", DT_Raster); mdi.AddInput("D_DPST", "mm", "Distribution of depression storage", "Module", DT_Raster); mdi.AddInput("D_HTOCH", "mm", "Water depth added to channel water depth","Module", DT_Raster); mdi.AddOutput("DissovP", "kg/s", "distribution of dissovlved P", DT_Raster); mdi.AddOutput("Ammonium", "kg/s", "distribution of nutrient, ammonium", DT_Raster); mdi.AddOutput("Nitrate", "kg/s", "distribution of nutrient, nitrate", DT_Raster); mdi.AddOutput("DissovPToCh", "kg", "dissovlved P flow to channel", DT_Raster); mdi.AddOutput("AmmoniumToCh", "kg", "ammonium flow to channel", DT_Raster); mdi.AddOutput("NitrateToCh", "kg", "nitrate flow to channel", DT_Raster); //test mdi.AddOutput("TESTDPST", "mm", "Distribution of depression storage", DT_Raster); //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; }
extern "C" SEIMS_MODULE_API const char* MetadataInformation() { MetadataInfo mdi; mdi.SetAuthor("Huiran Gao, Liangjun Zhu"); mdi.SetClass(MCLS_NutCHRout, MCLSDESC_NutCHRout); mdi.SetDescription(MDESC_NUTRCH_QUAL2E); mdi.SetEmail(SEIMS_EMAIL); mdi.SetID(MDESC_NUTRCH_QUAL2E); mdi.SetName(MDESC_NUTRCH_QUAL2E); mdi.SetVersion("1.2"); mdi.SetWebsite(SEIMS_SITE); mdi.SetHelpfile(""); // set the parameters mdi.AddParameter(Tag_SubbasinId, UNIT_NON_DIM, Tag_SubbasinId, Source_ParameterDB, DT_Single); mdi.AddParameter(Tag_ChannelTimeStep, UNIT_SECOND, DESC_TIMESTEP, File_Input, DT_Single); mdi.AddParameter(VAR_RNUM1, UNIT_NON_DIM, DESC_RNUM1, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_IGROPT, UNIT_NON_DIM, DESC_IGROPT, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI0, UNIT_NUTR_RATIO, DESC_AI0, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI1, UNIT_NUTR_RATIO, DESC_AI1, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI2, UNIT_NUTR_RATIO, DESC_AI2, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI3, UNIT_NUTR_RATIO, DESC_AI3, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI4, UNIT_NUTR_RATIO, DESC_AI4, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI5, UNIT_NUTR_RATIO, DESC_AI5, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_AI6, UNIT_NUTR_RATIO, DESC_AI6, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_LAMBDA0, UNIT_NON_DIM, DESC_LAMBDA0, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_LAMBDA1, UNIT_NON_DIM, DESC_LAMBDA1, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_LAMBDA2, UNIT_NON_DIM, DESC_LAMBDA2, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_K_L, UNIT_SR, DESC_K_L, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_K_N, UNIT_CONCENTRATION, DESC_K_N, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_K_P, UNIT_CONCENTRATION, DESC_K_P, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_P_N, UNIT_CONCENTRATION, DESC_P_N, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_TFACT, UNIT_NON_DIM, DESC_TFACT, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_MUMAX, UNIT_PER_DAY, DESC_MUMAX, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_RHOQ, UNIT_PER_DAY, DESC_RHOQ, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_COD_N, UNIT_NON_DIM, DESC_COD_N, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_COD_K, UNIT_NON_DIM, DESC_COD_K, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_STREAM_LINK, UNIT_NON_DIM, DESC_STREAM_LINK, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_CH_ONCO, UNIT_CONCENTRATION, DESC_CH_ONCO, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_CH_OPCO, UNIT_CONCENTRATION, DESC_CH_OPCO, Source_ParameterDB, DT_Single); // add reach information mdi.AddParameter(VAR_REACH_PARAM, UNIT_NON_DIM, DESC_REACH_PARAM, Source_ParameterDB, DT_Reach); // add BMPs management operations, such as point source discharge mdi.AddParameter(VAR_SCENARIO, UNIT_NON_DIM, DESC_SCENARIO, Source_ParameterDB, DT_Scenario); // set the input variables mdi.AddInput(DataType_SolarRadiation, UNIT_SR, DESC_SR, Source_Module, DT_Raster1D); mdi.AddInput(VAR_DAYLEN, UNIT_HOUR, DESC_DAYLEN, Source_Module, DT_Raster1D); mdi.AddInput(VAR_SOTE, UNIT_TEMP_DEG, DESC_SOTE, Source_Module, DT_Raster1D); mdi.AddInput(VAR_QRECH, UNIT_FLOW_CMS, DESC_QRECH, Source_Module, DT_Array1D); mdi.AddInput(VAR_CHST, UNIT_VOL_M3, DESC_CHST, Source_Module, DT_Array1D); mdi.AddInput(VAR_RTE_WTRIN, UNIT_VOL_M3, DESC_RTE_WTRIN, Source_Module, DT_Array1D); mdi.AddInput(VAR_RTE_WTROUT, UNIT_VOL_M3, DESC_RTE_WTROUT, Source_Module, DT_Array1D); mdi.AddInput(VAR_CHWTRDEPTH, UNIT_LEN_M, DESC_CHWTDEPTH, Source_Module, DT_Array1D); /// input from hillslope //nutrient from surface water mdi.AddInput(VAR_SUR_NO3_TOCH, UNIT_KG, DESC_SUR_NO3_ToCH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SUR_NH4_TOCH, UNIT_KG, DESC_SUR_NH4_ToCH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SUR_SOLP_TOCH, UNIT_KG, DESC_SUR_SOLP_ToCH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SUR_COD_TOCH, UNIT_KG, DESC_SUR_COD_ToCH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SEDORGN_TOCH, UNIT_KG, DESC_SEDORGN_CH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SEDORGP_TOCH, UNIT_KG, DESC_SEDORGP_CH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SEDMINPA_TOCH, UNIT_KG, DESC_SEDMINPA_CH, Source_Module, DT_Array1D); mdi.AddInput(VAR_SEDMINPS_TOCH, UNIT_KG, DESC_SEDMINPS_CH, Source_Module, DT_Array1D); //nutrient from interflow mdi.AddInput(VAR_LATNO3_TOCH, UNIT_KG, DESC_LATNO3_CH, Source_Module, DT_Array1D); //nutrient from ground water mdi.AddInput(VAR_NO3GW_TOCH, UNIT_KG, DESC_NO3GW_CH, Source_Module, DT_Array1D); mdi.AddInput(VAR_MINPGW_TOCH, UNIT_KG, DESC_MINPGW_CH, Source_Module, DT_Array1D); // channel erosion mdi.AddInput(VAR_RCH_DEG, UNIT_KG, DESC_RCH_DEG, Source_Module_Optional, DT_Array1D); // set the output variables /// 1. Amount (kg) outputs mdi.AddInOutput(VAR_CH_ALGAE, UNIT_KG, DESC_CH_ALGAE, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_ORGN, UNIT_KG, DESC_CH_ORGN, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_ORGP, UNIT_KG, DESC_CH_ORGP, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NH4, UNIT_KG, DESC_CH_NH4, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NO2, UNIT_KG, DESC_CH_NO2, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NO3, UNIT_KG, DESC_CH_NO3, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_SOLP, UNIT_KG, DESC_CH_SOLP, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_COD, UNIT_KG, DESC_CH_COD, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_CHLORA, UNIT_KG, DESC_CH_CHLORA, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_DOX, UNIT_KG, DESC_CH_DOX, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_TN, UNIT_KG, DESC_CH_TN, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_TP, UNIT_KG, DESC_CH_TP, DT_Array1D, TF_SingleValue); /// 2. Concentration (mg/L) outputs mdi.AddInOutput(VAR_CH_ALGAEConc, UNIT_CONCENTRATION, DESC_CH_ALGAE, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_ORGNConc, UNIT_CONCENTRATION, DESC_CH_ORGN, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_ORGPConc, UNIT_CONCENTRATION, DESC_CH_ORGP, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NH4Conc, UNIT_CONCENTRATION, DESC_CH_NH4, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NO2Conc, UNIT_CONCENTRATION, DESC_CH_NO2, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_NO3Conc, UNIT_CONCENTRATION, DESC_CH_NO3, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_SOLPConc, UNIT_CONCENTRATION, DESC_CH_SOLP, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_CODConc, UNIT_CONCENTRATION, DESC_CH_COD, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_CHLORAConc, UNIT_CONCENTRATION, DESC_CH_CHLORA, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_DOXConc, UNIT_CONCENTRATION, DESC_CH_DOX, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_TNConc, UNIT_CONCENTRATION, DESC_CH_TNConc, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CH_TPConc, UNIT_CONCENTRATION, DESC_CH_TPConc, DT_Array1D, TF_SingleValue); // 3. point source loadings mdi.AddOutput(VAR_PTTN2CH, UNIT_KG, DESC_PTTN2CH, DT_Array1D); mdi.AddOutput(VAR_PTTP2CH, UNIT_KG, DESC_PTTP2CH, DT_Array1D); mdi.AddOutput(VAR_PTCOD2CH, UNIT_KG, DESC_PTCOD2CH, DT_Array1D); // 4. nutrient stored in reaches mdi.AddInOutput(VAR_CHSTR_NH4, UNIT_KG, DESC_CHSTR_NH4, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CHSTR_NO3, UNIT_KG, DESC_CHSTR_NO3, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CHSTR_TN, UNIT_KG, DESC_CHSTR_TN, DT_Array1D, TF_SingleValue); mdi.AddInOutput(VAR_CHSTR_TP, UNIT_KG, DESC_CHSTR_TP, DT_Array1D, TF_SingleValue); string res = mdi.GetXMLDocument(); char* tmp = new char[res.size() + 1]; strprintf(tmp, res.size() + 1, "%s", res.c_str()); return tmp; }
/// function to return the XML Metadata document string extern "C" SEIMS_MODULE_API const char *MetadataInformation() { MetadataInfo mdi; string res; mdi.SetAuthor("Liang-Jun Zhu"); mdi.SetClass(MCLS_MGT, MCLSDESC_MGT); mdi.SetDescription(MDESC_PLTMGT_SWAT); mdi.SetID(MID_PLTMGT_SWAT); mdi.SetName(MID_PLTMGT_SWAT); mdi.SetVersion("0.1"); mdi.SetEmail(SEIMS_EMAIL); mdi.SetWebsite(SEIMS_SITE); mdi.SetHelpfile(""); /// set parameters from database mdi.AddParameter(VAR_CSWAT, UNIT_NON_DIM, DESC_CSWAT, Source_ParameterDB, DT_Single); //mdi.AddParameter(VAR_BACT_SWF, UNIT_NON_DIM, DESC_BACT_SWF, Source_ParameterDB, DT_Single); ///TODO mdi.AddParameter(Tag_CellWidth, UNIT_LEN_M, DESC_CellWidth, Source_ParameterDB, DT_Single); /// basic parameters mdi.AddParameter(VAR_SUBBASIN_PARAM, UNIT_NON_DIM, DESC_SUBBASIN_PARAM, Source_ParameterDB, DT_Subbasin); mdi.AddParameter(VAR_SUBBSN, UNIT_NON_DIM, DESC_SUBBSN, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_MGT_FIELD, UNIT_NON_DIM, DESC_MGT_FIELD, Source_ParameterDB, DT_Raster1D); /// soil mdi.AddParameter(VAR_SOILLAYERS, UNIT_NON_DIM, DESC_SOILLAYERS, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_SOL_ZMX, UNIT_DEPTH_MM, DESC_SOL_ZMX, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_SOL_SUMAWC, UNIT_DEPTH_MM, DESC_SOL_SUMAWC, Source_ParameterDB, DT_Raster1D); /// m_soilSumFC 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_BD, UNIT_DENSITY, DESC_SOL_BD, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_CBN, UNIT_PERCENT, DESC_SOL_CBN, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_N, UNIT_CONT_KGHA, DESC_SOL_N, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_CLAY, UNIT_PERCENT, DESC_CLAY, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SILT, UNIT_PERCENT, DESC_SILT, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SAND, UNIT_PERCENT, DESC_SAND, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_ROCK, UNIT_PERCENT, DESC_ROCK, Source_ParameterDB, DT_Raster2D); /// landuse/landcover mdi.AddParameter(VAR_LANDUSE, UNIT_NON_DIM, DESC_LANDUSE, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_LANDCOVER, UNIT_NON_DIM, DESC_LANDCOVER, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_CN2, UNIT_NON_DIM, DESC_CN2, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_HVSTI, UNIT_CONT_RATIO, DESC_HVSTI, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_WSYF, UNIT_CONT_RATIO, DESC_WSYF, Source_ParameterDB, DT_Raster1D); mdi.AddParameter(VAR_PHUPLT, UNIT_HEAT_UNIT, DESC_PHUPLT, Source_ParameterDB, DT_Raster1D); /// lookup table as 2D array, such as crop, management, landuse, tillage, etc. mdi.AddParameter(VAR_LANDUSE_LOOKUP, UNIT_NON_DIM, DESC_LANDUSE_LOOKUP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_CROP_LOOKUP, UNIT_NON_DIM, DESC_CROP_LOOKUP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_TILLAGE_LOOKUP, UNIT_NON_DIM, DESC_TILLAGE_LOOKUP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_FERTILIZER_LOOKUP, UNIT_NON_DIM, DESC_FERTILIZER_LOOKUP, Source_ParameterDB, DT_Array2D); /// set scenario data mdi.AddParameter(VAR_SCENARIO, UNIT_NON_DIM, DESC_SCENARIO, Source_ParameterDB, DT_Scenario); mdi.AddParameter(VAR_SOL_SORGN, UNIT_CONT_KGHA, DESC_SOL_SORGN, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_HORGP, UNIT_CONT_KGHA, DESC_SOL_HORGP, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_SOLP, UNIT_CONT_KGHA, DESC_SOL_SOLP, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_NH3, UNIT_CONT_KGHA, DESC_SOL_NH3, Source_ParameterDB, DT_Raster2D); mdi.AddParameter(VAR_SOL_NO3, UNIT_CONT_KGHA, DESC_SOL_NO3, Source_Module, DT_Raster2D); /// set input from other modules /// soil properties mdi.AddInput(VAR_SOL_AORGN, UNIT_CONT_KGHA, DESC_SOL_AORGN, Source_Module, DT_Raster2D); mdi.AddInput(VAR_SOL_FON, UNIT_CONT_KGHA, DESC_SOL_FON, Source_Module, DT_Raster2D); mdi.AddInput(VAR_SOL_FOP, UNIT_CONT_KGHA, DESC_SOL_FOP, Source_Module, DT_Raster2D); mdi.AddInput(VAR_SOL_ACTP, UNIT_CONT_KGHA, DESC_SOL_ACTP, Source_Module, DT_Raster2D); mdi.AddInput(VAR_SOL_STAP, UNIT_CONT_KGHA, DESC_SOL_STAP, Source_Module, DT_Raster2D); mdi.AddInput(VAR_SOL_RSD, UNIT_CONT_KGHA, DESC_SOL_RSD, Source_Module, DT_Raster2D); /// landuse/landcover mdi.AddInput(VAR_PHUBASE, UNIT_HEAT_UNIT, DESC_PHUBASE, Source_Module, DT_Raster1D); /// PET modules mdi.AddInput(VAR_IGRO, UNIT_NON_DIM, DESC_IGRO, Source_Module, DT_Raster1D); /// BIO_EPIC module mdi.AddInput(VAR_FR_PHU_ACC, UNIT_HEAT_UNIT, DESC_FR_PHU_ACC, Source_Module, DT_Raster1D); /// BIO_EPIC module mdi.AddParameter(VAR_TREEYRS, UNIT_YEAR, DESC_TREEYRS, Source_ParameterDB, DT_Raster1D); /// m_curYearMat, from ParameterDB mdi.AddInput(VAR_HVSTI_ADJ, UNIT_CONT_RATIO, DESC_HVSTI_ADJ, Source_Module, DT_Raster1D); mdi.AddInput(VAR_LAIDAY, UNIT_AREA_RATIO, DESC_LAIDAY, Source_Module, DT_Raster1D); mdi.AddInput(VAR_DORMI, UNIT_NON_DIM, DESC_DORMI, Source_Module, DT_Raster1D); mdi.AddInput(VAR_LAIMAXFR, UNIT_NON_DIM, DESC_LAIMAXFR, Source_Module, DT_Raster1D); mdi.AddInput(VAR_OLAI, UNIT_AREA_RATIO, DESC_OLAI, Source_Module, DT_Raster1D); mdi.AddInput(VAR_PLANT_N, UNIT_CONT_KGHA, DESC_PLANT_N, Source_Module, DT_Raster1D); mdi.AddInput(VAR_PLANT_P, UNIT_CONT_KGHA, DESC_PLANT_P, Source_Module, DT_Raster1D); mdi.AddInput(VAR_FR_PLANT_N, UNIT_NON_DIM, DESC_FR_PLANT_N, Source_Module, DT_Raster1D); mdi.AddInput(VAR_FR_PLANT_P, UNIT_NON_DIM, DESC_FR_PLANT_P, Source_Module, DT_Raster1D); mdi.AddInput(VAR_PLTET_TOT, UNIT_DEPTH_MM, DESC_PLTET_TOT, Source_Module, DT_Raster1D); mdi.AddInput(VAR_PLTPET_TOT, UNIT_DEPTH_MM, DESC_PLTPET_TOT, Source_Module, DT_Raster1D); mdi.AddInput(VAR_FR_ROOT, UNIT_NON_DIM, DESC_FR_ROOT, Source_Module, DT_Raster1D); mdi.AddInput(VAR_BIOMASS, UNIT_CONT_KGHA, DESC_BIOMASS, Source_Module, DT_Raster1D); mdi.AddInput(VAR_LAST_SOILRD, UNIT_DEPTH_MM, DESC_LAST_SOILRD, Source_Module, DT_Raster1D); mdi.AddInput(VAR_FR_STRSWTR, UNIT_NON_DIM, DESC_FR_STRSWTR, Source_Module, DT_Raster1D); /// groundwater table, currently, shallow and deep aquifer are not distinguished //mdi.AddInput(VAR_DEEPST, UNIT_DEPTH_MM, DESC_DEEPST, Source_Module, DT_Raster1D); //mdi.AddInput(VAR_SHALLST, UNIT_DEPTH_MM, DESC_SHALLST, Source_Module, DT_Raster1D); mdi.AddInput(VAR_SBGS, UNIT_DEPTH_MM, DESC_SBGS, Source_Module, DT_Array1D); /// set the output variables ///// outputs of plant operation. NO NEED TO OUTPUT? mdi.AddOutput(VAR_BIOTARG, UNIT_CONT_KGHA, DESC_BIOTARG, DT_Raster1D); mdi.AddOutput(VAR_HVSTI_TARG, UNIT_NON_DIM, DESC_HVSTI_TARG, DT_Raster1D); ///// outputs of irrigation / autoIrrigation operation mdi.AddOutput(VAR_IRR_FLAG, UNIT_NON_DIM, DESC_IRR_FLAG, DT_Raster1D); mdi.AddOutput(VAR_IRR_WTR, UNIT_DEPTH_MM, DESC_IRR_WTR, DT_Raster1D); mdi.AddOutput(VAR_IRR_SURFQ, UNIT_DEPTH_MM, DESC_IRR_SURFQ, DT_Raster1D); /// defined in auto irrigation operation mdi.AddOutput(VAR_AWTR_STRS_ID, UNIT_NON_DIM, DESC_AWTR_STRS_ID, DT_Raster1D); mdi.AddOutput(VAR_AWTR_STRS_TRIG, UNIT_NON_DIM, DESC_AWTR_STRS_TRIG, DT_Raster1D); mdi.AddOutput(VAR_AIRR_SOURCE, UNIT_NON_DIM, DESC_AIRR_SOURCE, DT_Raster1D); mdi.AddOutput(VAR_AIRR_LOCATION, UNIT_NON_DIM, DESC_AIRR_LOCATION, DT_Raster1D); mdi.AddOutput(VAR_AIRR_EFF, UNIT_NON_DIM, DESC_AIRR_EFF, DT_Raster1D); mdi.AddOutput(VAR_AIRRWTR_DEPTH, UNIT_DEPTH_MM, DESC_AIRRWTR_DEPTH, DT_Raster1D); mdi.AddOutput(VAR_AIRRSURF_RATIO, UNIT_NON_DIM, DESC_AIRRSURF_RATIO, DT_Raster1D); /// outputs of fertilizer / auto fertilizer operations mdi.AddOutput(VAR_AFERT_ID, UNIT_NON_DIM, DESC_AFERT_ID, DT_Raster1D); mdi.AddOutput(VAR_AFERT_NSTRSID, UNIT_NON_DIM, DESC_AFERT_NSTRSID, DT_Raster1D); mdi.AddOutput(VAR_AFERT_NSTRS, UNIT_NON_DIM, DESC_AFERT_NSTRS, DT_Raster1D); mdi.AddOutput(VAR_AFERT_MAXN, UNIT_CONT_KGHA, DESC_AFERT_MAXN, DT_Raster1D); mdi.AddOutput(VAR_AFERT_AMAXN, UNIT_CONT_KGHA, DESC_AFERT_AMAXN, DT_Raster1D); mdi.AddOutput(VAR_AFERT_NYLDT, UNIT_NON_DIM, DESC_AFERT_NYLDT, DT_Raster1D); mdi.AddOutput(VAR_AFERT_FRTEFF, UNIT_NON_DIM, DESC_AFERT_FRTEFF, DT_Raster1D); mdi.AddOutput(VAR_AFERT_FRTSURF, UNIT_NON_DIM, DESC_AFERT_FRTSURF, DT_Raster1D); //// outputs of grazing operation mdi.AddOutput(VAR_GRZ_DAYS, UNIT_NON_DIM, DESC_GRZ_DAYS, DT_Raster1D); mdi.AddOutput(VAR_GRZ_FLAG, UNIT_NON_DIM, DESC_GRZ_FLAG, DT_Raster1D); //// output of impound/release operation mdi.AddOutput(VAR_IMPOUND_TRIG, UNIT_NON_DIM, DESC_IMPOUND_TRIG, DT_Raster1D); /// 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; }
// 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("Overland Erosion", "Calculate the amount overland erosion."); mdi.SetDescription("use energy function(Govers) method to calculate sediment yield routing of each hillslope cell"); mdi.SetEmail("*****@*****.**"); mdi.SetID("KinWavSed_OL"); mdi.SetName("KinWavSed_OL"); mdi.SetVersion("0.5"); mdi.SetWebsite("http://seims.github.io/SEIMS"); mdi.SetHelpfile("KinWavSed_OL.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("Slope", "%", "Slope", "ParameterDB_WaterBalance", DT_Raster); mdi.AddParameter("eco1","","calibration coefficient of transport capacity calculation","ParameterDB_Sediment",DT_Single); mdi.AddParameter("eco2","","calibration coefficient of transport capacity calculation","ParameterDB_Sediment",DT_Single); mdi.AddParameter("ccoe","","calibration coefficient of overland 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("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("STREAM_LINK", "", "Stream link", "ParameterDB_Discharge", DT_Raster); mdi.AddParameter("Manning","","Manning's roughness","ParameterDB_Discharge",DT_Raster); mdi.AddParameter("CHWIDTH", "m", "Channel width", "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); //input from other module //mdi.AddInput("D_CELLH","mm","Water depth in the downslope boundary of cells","Module",DT_Raster); //WH, from Overland routing module mdi.AddInput("D_SURU","mm","Distribution of surface runoff","Module",DT_Raster); mdi.AddInput("D_FlowWidth","m", "Flow width of overland plane","Module",DT_Raster); //FlowWidth, from Overland routing module mdi.AddInput("D_DETSplash","kg","the distribution of splash detachment","Module",DT_Raster); //Splash eosion, from splash erosion module mdi.AddInput("D_QOverland", "m3/s", "Flux in the downslope boundary of cells", "Module",DT_Raster); //mdi.AddInput("D_HTOCH", "mm", "Water depth added to channel water depth", "Module",DT_Raster); // set the output variables mdi.AddOutput("DETOverland","kg", "distribution of overland flow detachment", DT_Raster); //mdi.AddOutput("DETFLOW","kg/m^2", "distribution of flow detachment", DT_Raster); mdi.AddOutput("SEDDEP","kg", "distribution of sediment deposition", DT_Raster); //mdi.AddOutput("SEDCONC","kg/m^3", "distribution of sediment concentration in flow", DT_Raster); //mdi.AddOutput("SedKG","kg", "distribution of sediment content in flow", DT_Raster); mdi.AddOutput("TestV","m/s", "distribution of sediment content in flow", DT_Raster); mdi.AddOutput("TestQV","m/s", "distribution of sediment content in flow", DT_Raster); mdi.AddOutput("SEDTOCH","kg", "distribution of sediment flowing to channel", DT_Raster); mdi.AddDependency("Depression","Depression storage module"); //for WH mdi.AddDependency("Overland routing","Overland routing module"); mdi.AddDependency("Soil Detachment","Rain and overland soil detachment erosion module"); // for DETSplash // 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; }
// 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("NutrientTransport_OL", "Nutrient Transport Overland."); mdi.SetDescription("Nutrient Transport Overland."); mdi.SetEmail(SEIMS_EMAIL); mdi.SetHelpfile("NutrientTransport_OL.chm"); mdi.SetID("NutrientTransport_OL"); mdi.SetName("NutrientTransport_OL"); mdi.SetVersion("0.1"); mdi.SetWebsite(SEIMS_SITE); // Nitrate mdi.AddParameter("AniExcF", "", "the fraction of porosity from which anions are excluded", "file.in", DT_Single); mdi.AddParameter("NitPC", "", "the nitrate percolation coefficient", "file.in", DT_Single); mdi.AddParameter("Porosity_2D", "m3/m3", "soil porosity", "ParameterDB_WaterBalance", DT_Array2D); mdi.AddInput("D_Nitrate", "kg N/ha", "amount of nitrate", "Module", DT_Array2D); mdi.AddInput("D_SURU", "mm", "Distribution of surface runoff", "Module", DT_Raster1D); //from DEP_LINSLEY mdi.AddInput("D_SSRU_2D", "mm", "Distribution of subsurface runoff(lateral flow / interflow).", "Module", DT_Array2D); //from SSR_DA mdi.AddInput("D_Percolation_2D", "mm", "Distribution of groundwater recharge (percolation)", "Module", DT_Array2D); // from PER_PI // Ammonium mdi.AddParameter("Clay_2D", "", "Clay fraction in soil", "ParameterDB_WaterBalance", DT_Raster1D); 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; }
//! function to return the XML Metadata document string extern "C" SEIMS_MODULE_API const char* MetadataInformation() { MetadataInfo mdi; mdi.SetAuthor("Huiran Gao"); mdi.SetClass(MCLS_NMINRL, MCLSDESC_NMINRL); mdi.SetDescription(MDESC_NMINRL); mdi.SetEmail(SEIMS_EMAIL); mdi.SetID(MDESC_NMINRL); mdi.SetName(MDESC_NMINRL); mdi.SetVersion("1.0"); mdi.SetWebsite(SEIMS_SITE); mdi.SetHelpfile("NMINRL.html"); // set the parameters //Latitude is used to calculate max solar radiation. It is read in the similar format with elevation. mdi.AddParameter(VAR_CMN, UNIT_NON_DIM, DESC_CMN,Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_NACTFR, UNIT_NON_DIM, DESC_NACTFR, Source_ParameterDB, 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_WSHD_DNIT, UNIT_CONT_KGKM2, DESC_WSHD_DNIT, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_HMN, UNIT_CONT_KGKM2, DESC_WSHD_HMN, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_HMP, UNIT_CONT_KGKM2, DESC_WSHD_HMP, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_RMN, UNIT_CONT_KGKM2, DESC_WSHD_RMN, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_RMP, UNIT_CONT_KGKM2, DESC_WSHD_RMP, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_RWN, UNIT_CONT_KGKM2, DESC_WSHD_RWN, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_NITN, UNIT_CONT_KGKM2, DESC_WSHD_NITN, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_VOLN, UNIT_CONT_KGKM2, DESC_WSHD_VOLN, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_PAL, UNIT_CONT_KGKM2, DESC_WSHD_PAL, Source_ParameterDB, DT_Single); mdi.AddParameter(VAR_WSHD_PAS, UNIT_CONT_KGKM2, DESC_WSHD_PAS, Source_ParameterDB, DT_Single); // set the input mdi.AddParameter(VAR_CDN, UNIT_NON_DIM, DESC_CDN, Source_ParameterDB, DT_Array1D); mdi.AddParameter(VAR_LCC, UNIT_NON_DIM, DESC_LCC, Source_ParameterDB, DT_Array1D); mdi.AddParameter(VAR_PL_RSDCO, UNIT_NON_DIM, DESC_PL_RSDCO, Source_ParameterDB, DT_Array1D); mdi.AddParameter(VAR_PSP, UNIT_NON_DIM, DESC_PSP, Source_ParameterDB, DT_Array1D); mdi.AddParameter(VAR_SOL_CBN, UNIT_PERCENT, DESC_SOL_CBN, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_WST, UNIT_DEPTH_MM, DESC_SOL_WST, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_WFC, UNIT_DEPTH_MM, DESC_SOL_WFC, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_TMP, UNIT_TEMP_DEG, DESC_SOL_TMP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_WH, UNIT_DEPTH_MM, DESC_SOL_WH, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_AORGN, UNIT_CONT_KGKM2, DESC_SOL_AORGN, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_FON, UNIT_CONT_KGKM2, DESC_SOL_FON, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_FOP, UNIT_CONT_KGKM2, DESC_SOL_FOP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_NO3, UNIT_CONT_KGKM2, DESC_SOL_NO3, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_ORGN, UNIT_CONT_KGKM2, DESC_SOL_ORGN, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_ORGP, UNIT_CONT_KGKM2, DESC_SOL_ORGP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_RSD, UNIT_CONT_KGKM2, DESC_SOL_RSD, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_SOLP, UNIT_CONT_KGKM2, DESC_SOL_SOLP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_NH3, UNIT_CONT_KGKM2, DESC_SOL_NH3, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_WPMM, UNIT_CONT_KGKM2, DESC_SOL_WPMM, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_ROOTDEPTH, UNIT_CONT_KGKM2, DESC_ROOTDEPTH, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_ACTP, UNIT_CONT_KGKM2, DESC_SOL_ACTP, Source_ParameterDB, DT_Array2D); mdi.AddParameter(VAR_SOL_STAP, UNIT_CONT_KGKM2, DESC_SOL_STAP, Source_ParameterDB, DT_Array2D); // set the input // set the output variables mdi.AddOutput(VAR_HMNTL, UNIT_CONT_KGKM2, DESC_HMNTL, DT_Single); mdi.AddOutput(VAR_HMPTL, UNIT_CONT_KGKM2, DESC_HMPTL, DT_Single); mdi.AddOutput(VAR_RMN2TL, UNIT_CONT_KGKM2, DESC_RMN2TL, DT_Single); mdi.AddOutput(VAR_RMPTL, UNIT_CONT_KGKM2, DESC_RMPTL, DT_Single); mdi.AddOutput(VAR_RWNTL, UNIT_CONT_KGKM2, DESC_RWNTL, DT_Single); mdi.AddOutput(VAR_WDNTL, UNIT_CONT_KGKM2, DESC_WDNTL, DT_Single); mdi.AddOutput(VAR_RMP1TL, UNIT_CONT_KGKM2, DESC_RMP1TL, DT_Single); mdi.AddOutput(VAR_ROCTL, UNIT_CONT_KGKM2, DESC_ROCTL, DT_Single); mdi.AddOutput(VAR_WSHD_DNIT, UNIT_CONT_KGKM2, DESC_WSHD_DNIT, DT_Single); mdi.AddOutput(VAR_WSHD_HMN, UNIT_CONT_KGKM2, DESC_WSHD_HMN, DT_Single); mdi.AddOutput(VAR_WSHD_HMP, UNIT_CONT_KGKM2, DESC_WSHD_HMP, DT_Single); mdi.AddOutput(VAR_WSHD_RMN, UNIT_CONT_KGKM2, DESC_WSHD_RMN, DT_Single); mdi.AddOutput(VAR_WSHD_RMP, UNIT_CONT_KGKM2, DESC_WSHD_RMP, DT_Single); mdi.AddOutput(VAR_WSHD_RWN, UNIT_CONT_KGKM2, DESC_WSHD_RWN, DT_Single); mdi.AddOutput(VAR_WSHD_NITN, UNIT_CONT_KGKM2, DESC_WSHD_NITN, DT_Single); mdi.AddOutput(VAR_WSHD_VOLN, UNIT_CONT_KGKM2, DESC_WSHD_VOLN, DT_Single); mdi.AddOutput(VAR_WSHD_PAL, UNIT_CONT_KGKM2, DESC_WSHD_PAL, DT_Single); mdi.AddOutput(VAR_WSHD_PAS, UNIT_CONT_KGKM2, DESC_WSHD_PAS, DT_Single); mdi.AddOutput(VAR_SOL_AORGN, UNIT_CONT_KGKM2, DESC_SOL_AORGN, DT_Array2D); mdi.AddOutput(VAR_SOL_FON, UNIT_CONT_KGKM2, DESC_SOL_FON, DT_Array2D); mdi.AddOutput(VAR_SOL_FOP, UNIT_CONT_KGKM2, DESC_SOL_FOP, DT_Array2D); mdi.AddOutput(VAR_SOL_NO3, UNIT_CONT_KGKM2, DESC_SOL_NO3, DT_Array2D); mdi.AddOutput(VAR_SOL_ORGN, UNIT_CONT_KGKM2, DESC_SOL_ORGN, DT_Array2D); mdi.AddOutput(VAR_SOL_ORGP, UNIT_CONT_KGKM2, DESC_SOL_ORGP, DT_Array2D); mdi.AddOutput(VAR_SOL_RSD, UNIT_CONT_KGKM2, DESC_SOL_RSD, DT_Array2D); mdi.AddOutput(VAR_SOL_SOLP, UNIT_CONT_KGKM2, DESC_SOL_SOLP, DT_Array2D); mdi.AddOutput(VAR_SOL_NH3, UNIT_CONT_KGKM2, DESC_SOL_NH3, DT_Array2D); mdi.AddOutput(VAR_SOL_WPMM, UNIT_CONT_KGKM2, DESC_SOL_WPMM, DT_Array2D); mdi.AddOutput(VAR_ROOTDEPTH, UNIT_CONT_KGKM2, DESC_ROOTDEPTH, DT_Array2D); mdi.AddOutput(VAR_SOL_ACTP, UNIT_CONT_KGKM2, DESC_SOL_ACTP, DT_Array2D); mdi.AddOutput(VAR_SOL_STAP, UNIT_CONT_KGKM2, DESC_SOL_STAP, DT_Array2D); string res = mdi.GetXMLDocument(); char* tmp = new char[res.size()+1]; strprintf(tmp, res.size()+1, "%s", res.c_str()); return tmp; }