void ReservoirMethod::Set1DData(const char *key, int n, float *data) { string sk(key); if (StringMatch(sk, VAR_GWNEW)) { m_VgroundwaterFromBankStorage = data; return; } //check the input data if (!CheckInputSize(key, n)) return; //set the value if (StringMatch(sk, VAR_INET)) m_D_EI = data; else if (StringMatch(sk, VAR_DEET)) m_D_ED = data; else if (StringMatch(sk, VAR_SOET)) m_D_ES = data; else if (StringMatch(sk, VAR_AET_PLT)) m_plantEP = data; else if (StringMatch(sk, VAR_PET)) m_D_PET = data; else if (StringMatch(sk, VAR_SLOPE)) m_Slope = data; else if (StringMatch(sk, VAR_SOILLAYERS)) m_soilLayers = data; else throw ModelException(MID_GWA_RE, "Set1DData", "Parameter " + sk + " does not exist in current module."); }
void SOL_WB::Set1DData(const char* key, int nRows, float* data) { string s(key); if(StringMatch(s, Tag_SubbasinSelected)) { m_subbasinSelected = data; m_subbasinSelectedCount = nRows; return; } if(StringMatch(s, VAR_T_RG)) { m_RG = data; m_subbasinTotalCount = nRows; return; } CheckInputSize(key,nRows); if(StringMatch(s, VAR_INLO)) m_Interception = data; else if(StringMatch(s, VAR_PRECI)) m_Precipitation = data; else if(StringMatch(s, VAR_INET)) m_EI = data; else if(StringMatch(s, VAR_DPST)) m_Depression = data; else if(StringMatch(s, VAR_DEET)) m_ED = data; else if(StringMatch(s, VAR_INFIL)) m_Infil = data; else if(StringMatch(s, VAR_SOET)) m_ES = data; else if(StringMatch(s, VAR_REVAP)) m_Revap = data; else if(StringMatch(s, VAR_SURU)) m_RS = data; else if(StringMatch(s, VAR_T_RG)) m_RG = data; else if(StringMatch(s, VAR_SNSB)) m_SE = data; else if(StringMatch(s, VAR_TMIN)) m_tMin = data; else if(StringMatch(s, VAR_TMAX)) m_tMax = data; else if(StringMatch(s, VAR_SOTE)) m_SoilT = data; else if(StringMatch(s, VAR_SUBBSN)) m_subbasin = data; else if(StringMatch(s, VAR_SOILDEPTH)) m_Rootdepth = data; else if(StringMatch(s, VAR_NEPR)) m_pNet = data; else throw ModelException("SOL_WB", "Set1DData", "Parameter " + s + " does not exist in the SOL_WB module."); }
void IUH_OL::Set1DData(const char* key, const int n, float* data) { CheckInputSize(key, n); string sk(key); if (StringMatch(sk, VAR_SUBBSN)) m_subbsnID = data; else if (StringMatch(sk, VAR_SURU)) m_surfRf = data; else { throw ModelException(MID_IUH_OL, "Set1DData", "Parameter " + sk + " does not exist."); } }
void SNO_SP::Set1DData(const char* key, const int n, float* data) { CheckInputSize(key, n); string s(key); if (StringMatch(s, VAR_TMEAN)) m_meanTemp = data; else if (StringMatch(s, VAR_TMAX)) m_maxTemp = data; else if (StringMatch(s, VAR_NEPR)) m_netPcp = data; else { throw ModelException(MID_SNO_SP, "Set1DData", "Parameter " + s + " does not exist."); } }
void IUH_OL::Set2DData(const char* key, const int nRows, const int nCols, float** data) { string sk(key); if (StringMatch(sk, VAR_OL_IUH)) { CheckInputSize(VAR_OL_IUH, nRows); m_iuhCell = data; m_iuhCols = nCols; } else { throw ModelException(MID_IUH_OL, "Set2DData", "Parameter " + sk + " does not exist."); } }
void PER_PI::Set1DData(const char* key, int nRows, float* data) { string s(key); CheckInputSize(key,nRows); if(StringMatch(s,VAR_SOTE)) m_soilT = data; else if(StringMatch(s,VAR_INFIL)) m_infil = data; else throw ModelException(MID_PER_PI,"Set1DData", "Parameter " + s + " does not exist in current module. Please contact the module developer."); }
void ReservoirMethod::Set1DData(const char* key, int n, float *data) { string sk(key); //if (StringMatch(sk,"subbasinSelected")) //{ // m_subbasinSelected = data; // m_subbasinSelectedCount = n; //} if (StringMatch(sk,"T_GWNEW")) { m_VgroundwaterFromBankStorage = data; } //check the input data if (!CheckInputSize(key,n)) return; //set the value if (StringMatch(sk,"D_INET")) { m_D_EI = data; } else if (StringMatch(sk, "D_DEET")) { m_D_ED = data; } else if (StringMatch(sk, "D_SOET")) { m_D_ES = data; } else if (StringMatch(sk, "D_PET")) { m_D_PET = data; } else if (StringMatch(sk,"Subbasin")) { m_subbasin = data; } else if (StringMatch(sk,"Slope")) { m_Slope = data; } else if (StringMatch(sk,"Rootdepth")) { m_rootDepth = data; } else { throw ModelException("GWA_RE","Set1DData","Parameter " + sk + " does not exist in GWA_RE module. Please contact the module developer."); } }
void MUSLE_AS::Set2DData(const char *key, int nRows, int nCols, float **data) { string s(key); CheckInputSize(key, nRows); m_nSoilLayers = nCols; if (StringMatch(s, VAR_USLE_K)) { this->m_usle_k = data; } else throw ModelException(MID_MUSLE_AS, "Set2DData", "Parameter " + s + " does not exist in current module. Please contact the module developer."); }
void ReservoirMethod::Set2DData(const char* key, int nrows, int ncols, float** data) { string sk(key); CheckInputSize(key, nrows); m_nSoilLayers = ncols; if (StringMatch(sk,"D_Percolation_2D")) m_perc = data; else if(StringMatch(sk, "D_SOMO_2D")) m_soilMoisture = data; else throw ModelException("PER_PI", "Set2DData", "Parameter " + sk + " does not exist. Please contact the module developer."); }
void DepressionFS::Set1DData(const char* key, int n, float* data) { //check the input data CheckInputSize(key,n); string sk(key); if(StringMatch(sk, "Depression")) m_depCap = data; else if(StringMatch(sk, "D_PET")) m_pet = data; else throw ModelException("DEP_FS", "Set1DData", "Parameter " + sk + " does not exist in the DEP_FS module. Please contact the module developer."); }
void PER_PI::Set2DData(const char* key, int nrows, int ncols, float** data) { string sk(key); CheckInputSize(key, nrows); m_nSoilLayers = ncols; if(StringMatch(sk, VAR_CONDUCT)) m_ks = data; else if(StringMatch(sk, VAR_SOILDEPTH)) m_soilDepth = data; else if (StringMatch(sk, VAR_POROST)) m_porosity = data; else if (StringMatch(sk, VAR_FIELDCAP)) m_fc = data; else if(StringMatch(sk, VAR_POREID)) m_poreIndex = data; else if(StringMatch(sk, VAR_SOMO)) m_somo = data; else throw ModelException(MID_PER_PI, "Set2DData", "Parameter " + sk + " does not exist. Please contact the module developer."); }
void PER_STR::Set2DData(const char *key, int nrows, int ncols, float **data) { string sk(key); CheckInputSize(key, nrows); m_nSoilLayers = ncols; if (StringMatch(sk, VAR_CONDUCT)) m_ks = data; else if (StringMatch(sk, VAR_SOILTHICK)) m_soilThick = data; else if (StringMatch(sk, VAR_POROST)) m_porosity = data; else if (StringMatch(sk, VAR_FIELDCAP)) m_fc = data; else if (StringMatch(sk, VAR_WILTPOINT)) m_wp = data; else if (StringMatch(sk, VAR_SOL_ST)) m_somo = data; else throw ModelException(MID_PER_STR, "Set2DData", "Parameter " + sk + " does not exist. Please contact the module developer."); }
void ReservoirMethod::Set2DData(const char *key, int nrows, int ncols, float **data) { string sk(key); CheckInputSize(key, nrows); m_nSoilLayers = ncols; if (StringMatch(sk, VAR_PERCO)) m_perc = data; else if (StringMatch(sk, VAR_SOL_ST)) m_soilStorage = data; else if (StringMatch(sk, VAR_SOILDEPTH)) m_soilDepth = data; else if (StringMatch(sk, VAR_SOILTHICK)) m_soilThick = data; else throw ModelException(MID_GWA_RE, "Set2DData", "Parameter " + sk + " does not exist."); }
void PER_PI::Set2DData(const char *key, int nrows, int ncols, float **data) { string sk(key); CheckInputSize(key, nrows); m_soilLayers = ncols; if (StringMatch(sk, VAR_CONDUCT)) m_ks = data; else if (StringMatch(sk, VAR_SOILTHICK)) m_soilThick = data; else if (StringMatch(sk, VAR_SOL_UL)) m_sat = data; else if (StringMatch(sk, VAR_SOL_AWC)) m_fc = data; else if (StringMatch(sk, VAR_SOL_WPMM)) m_wp = data; else if (StringMatch(sk, VAR_POREID)) m_poreIndex = data; else if (StringMatch(sk, VAR_SOL_ST)) m_soilStorage = data; else throw ModelException(MID_PER_PI, "Set2DData", "Parameter " + sk + " does not exist. Please contact the module developer."); }
void SOL_WB::Set2DData(const char* key, int nrows, int ncols, float** data) { string s(key); CheckInputSize(key, nrows); m_nSoilLayers = ncols; if(StringMatch(s, VAR_PERCO)) m_Percolation = data; else if(StringMatch(s, VAR_SSRU)) m_RI = data; else if(StringMatch(s, VAR_SOMO)) m_sm = data; else throw ModelException("SOL_WB", "Set2DData", "Parameter " + s + " does not exist. Please contact the module developer."); }
void DepressionFSDaily::Set1DData(const char *key, int n, float *data) { //check the input data CheckInputSize(key, n); string sk(key); if (StringMatch(sk, VAR_DEPRESSION)) m_depCap = data; else if (StringMatch(sk, VAR_INET)) m_ei = data; else if (StringMatch(sk, VAR_PET)) m_pet = data; else if (StringMatch(sk, VAR_EXCP)) m_pe = data; else if (StringMatch(sk, VAR_IMPOUND_TRIG)) m_impoundTriger = data; else if (StringMatch(sk, VAR_POT_VOL)) m_potVol = data; else throw ModelException(MID_DEP_LINSLEY, "Set1DData", "Parameter " + sk+" does not exist."); }
void YLD::Set1DData(const char *key, int n, float *data) { //check the input data string s(key); CheckInputSize(key, n); if (StringMatch(s, "CNYLD")) m_frNyld = data; else if (StringMatch(s, "CPYLD")) m_frPyld = data; else if (StringMatch(s, "IDC")) m_classification = data; else if (StringMatch(s, "DLAI")) m_frDeclineLAI = data; else if (StringMatch(s, "HVSTI")) m_HiOpt = data; else if (StringMatch(s, "WSYF")) m_HiMin = data; else if (StringMatch(s, "D_PET")) m_PET = data; else if (StringMatch(s, "D_SOET")) m_soilET = data; else if (StringMatch(s, "Fr_PHU")) m_frPHU = data; else if (StringMatch(s, "BIOMASS")) m_biomass = data; else if (StringMatch(s, "BIOMASS_N")) m_biomassN = data; else if (StringMatch(s, "BIOMASS_P")) m_biomassP = data; else if (StringMatch(s, "BIOMASS_AG")) m_biomassAG = data; else if (StringMatch(s, "BIOMASS_ROOT")) m_biomassRoot = data; else if (StringMatch(s, "LAI")) m_LAI = data; else if (StringMatch(s, "Total_WaterUptake")) m_totalWaterUptake = data; else throw ModelException("Yield", "Set1DData", "Parameter " + s + " does not exist in Yield method. Please contact the module developer."); }
void MUSLE_AS::Set1DData(const char *key, int n, float *data) { CheckInputSize(key, n); string s(key); if (StringMatch(s, VAR_USLE_C)) m_usle_c = data; else if (StringMatch(s, VAR_USLE_P)) m_usle_p = data; else if (StringMatch(s, VAR_ACC)) m_flowacc = data; else if (StringMatch(s, VAR_SLOPE)) m_slope = data; //else if (StringMatch(s, VAR_SUBBSN)) m_subbasin = data; //else if (StringMatch(s, VAR_SURU)) m_surfaceRunoff = data; else if (StringMatch(s, VAR_OLFLOW))m_surfaceRunoff = data; else if (StringMatch(s, VAR_SNAC)) m_snowAccumulation = data; else if (StringMatch(s, VAR_STREAM_LINK))m_streamLink = data; else if (StringMatch(s, VAR_DETACH_SAND)) m_detachSand = data; else if (StringMatch(s, VAR_DETACH_SILT)) m_detachSilt = data; else if (StringMatch(s, VAR_DETACH_CLAY)) m_detachClay = data; else if (StringMatch(s, VAR_DETACH_SAG)) m_detachSmAggre = data; else if (StringMatch(s, VAR_DETACH_LAG)) m_detachLgAggre = data; else throw ModelException(MID_MUSLE_AS, "Set1DData", "Parameter " + s + " does not exist."); }