//--------------------------------------------------------------------- public static void Initialize(IInputParameters parameters) { transpiration = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); AnnualTranspiration = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); infiltration = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); runoff = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); waterleakage = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); evaporation = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); WHC = parameters.WHC; EvaporationFraction = parameters.EvaporationFraction; LeakageFraction = parameters.LeakageFraction; SnowPack = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); Water = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); foreach (ActiveSite site in PlugIn.ModelCore.Landscape) { SnowPack[site] = 0; Water[site] = 0; infiltration[site] = 0; runoff[site] = 0; evaporation[site] = 0; transpiration[site] = 0; AnnualTranspiration[site] = 0; } PlugIn.ModelCore.RegisterSiteVar(AnnualTranspiration, "Succession.AnnualTranspiration"); PlugIn.ModelCore.RegisterSiteVar(Water, "Succession.SoilWater"); }
public static void Initialize(IInputParameters parameters) { AET = parameters.AET; FolLignin = parameters.FolLignin; KNwdLitter = GetKNwdLitter(); }
public static void Initialize(IInputParameters parameters) { Canopy.Initialize(parameters); TOroot = parameters.TOroot; TOwood = parameters.TOwood; TOfol = parameters.TOfol; FolRet = parameters.FolRet; HalfSat = parameters.HalfSat; PsnTMin = parameters.PsnTMin; GrMstSens = parameters.GrMstSens; SLWmax = parameters.SLWmax; SLWDel = parameters.SLWDel; k = parameters.K; CDDFolEnd = parameters.CDDFolEnd; PsnAgeRed = parameters.PsnAgeRed; GDDFolSt = parameters.GDDFolSt; RtStRatio = parameters.RtStRatio; MaintRespFrac = parameters.MaintResp; DNSC = parameters.DNSC; BFolResp = parameters.BFolResp; Porosity = parameters.Porosity; }
public static void Initialize(IInputParameters parameters) { WHC = parameters.WHC; PrecipLossFrac = parameters.PrecipLossFrac; Porosity = parameters.Porosity; LeakageFrac = parameters.LeakageFrac; }
public VarEcoregionDate(string label, DateTime[] DateRange) { values = new Library.Biomass.Ecoregions.AuxParm <VarDate <T> >(PlugIn.modelCore.Ecoregions); foreach (IEcoregion eco in PlugIn.ModelCore.Ecoregions) { values[eco] = new VarDate <T>(label, DateRange); } }
public static void Initialize(IInputParameters parameters) { EstRad = parameters.EstRad; EstMoist = parameters.EstMoist; GDDFolSt = parameters.GDDFolSt; PsnTMin = parameters.PsnTMin; CDDFolEnd = parameters.CDDFolEnd; HalfSat = parameters.HalfSat; Porosity = parameters.Porosity; }
//--------------------------------------------------------------------- public static Landis.Library.Biomass.Species.AuxParm <Landis.Library.Biomass.Ecoregions.AuxParm <T> > CreateSpeciesEcoregionParm <T>(ISpeciesDataset speciesDataset, IEcoregionDataset ecoregionDataset) { Landis.Library.Biomass.Species.AuxParm <Landis.Library.Biomass.Ecoregions.AuxParm <T> > newParm; newParm = new Landis.Library.Biomass.Species.AuxParm <Landis.Library.Biomass.Ecoregions.AuxParm <T> >(speciesDataset); foreach (ISpecies species in speciesDataset) { newParm[species] = new Landis.Library.Biomass.Ecoregions.AuxParm <T>(ecoregionDataset); } return(newParm); }
public static void Initialize(IInputParameters parameters) { AET = parameters.AET; HeterotrophicRespiration = PlugIn.ModelCore.Landscape.NewSiteVar <float>(); woodyDebris = PlugIn.ModelCore.Landscape.NewSiteVar <Pool>(); litter = PlugIn.ModelCore.Landscape.NewSiteVar <Pool>(); foreach (ActiveSite site in PlugIn.ModelCore.Landscape) { // site cohorts are initialized by the PlugIn.InitializeSite method woodyDebris[site] = new Pool(); litter[site] = new Pool(); HeterotrophicRespiration[site] = 0; } PlugIn.ModelCore.RegisterSiteVar(WoodyDebris, "Succession.WoodyDebris"); PlugIn.ModelCore.RegisterSiteVar(Litter, "Succession.Litter"); }
//--------------------------------------------------------------------- public InputParameters() { hassiteoutput = PlugIn.ModelCore.Landscape.NewSiteVar <bool>(); canopylayerbiomfractions = new List <float[]>(); canopylayerages = new List <int>(); climatefilename = new Library.Biomass.Ecoregions.AuxParm <string>(PlugIn.modelCore.Ecoregions); slwdel = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); toroot = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); towood = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); folret = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); tofol = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); gddfolst = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); mortCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); growthCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); slwmax = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); cddfolend = new Landis.Library.Biomass.Species.AuxParm <int>(PlugIn.ModelCore.Species); wuecnst = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); q10 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); psntmin = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); halfsat = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); estradsensitivity = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); estmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); psntopt = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); foln = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); bfolresp = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); follignin = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); kwdlit = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); grmstsens = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dvpd2 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dvpd1 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); amaxa = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); amaxb = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); psnagered = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); k = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dnsc = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); maintresp = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); wltpnt = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); rtstratio = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); whc = new Landis.Library.Biomass.Ecoregions.AuxParm <int>(PlugIn.ModelCore.Ecoregions); aet = new Landis.Library.Biomass.Ecoregions.AuxParm <int>(PlugIn.ModelCore.Ecoregions); preciplossfrac = new Landis.Library.Biomass.Ecoregions.AuxParm <float>(PlugIn.ModelCore.Ecoregions); porosity = new Landis.Library.Biomass.Ecoregions.AuxParm <int>(PlugIn.ModelCore.Ecoregions); leakagefrac = new Landis.Library.Biomass.Ecoregions.AuxParm <float>(PlugIn.ModelCore.Ecoregions); canopylayernumbers = new List <int>(); }
//--------------------------------------------------------------------- public InputParameters() { hassiteoutput = PlugIn.ModelCore.Landscape.NewSiteVar <bool>(); slwdel = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); rootturnover = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); woodturnover = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); folreten = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); foliageturnover = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); gddfolend = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); gddfolstart = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); mortCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); growthCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); slwmax = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); senescStart = new Landis.Library.Biomass.Species.AuxParm <int>(PlugIn.ModelCore.Species); wueconst = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); respq10 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); psntmin = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); halfsat = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); estradsensitivity = new Landis.Library.Biomass.Species.AuxParm <float[]>(PlugIn.ModelCore.Species); estmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm <float[]>(PlugIn.ModelCore.Species); psntopt = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); folncon = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); basefolrespfrac = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); growthmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dvpd2 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dvpd1 = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); amaxa = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); amaxb = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); psnagered = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); k = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); dnsc = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); maintresp = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); wiltingpoint = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); rootstemratio = new Landis.Library.Biomass.Species.AuxParm <float>(PlugIn.ModelCore.Species); whc = new Landis.Library.Biomass.Ecoregions.AuxParm <float>(PlugIn.ModelCore.Ecoregions); aet = new Landis.Library.Biomass.Ecoregions.AuxParm <int>(PlugIn.ModelCore.Ecoregions); evaporationfraction = new Landis.Library.Biomass.Ecoregions.AuxParm <float>(PlugIn.ModelCore.Ecoregions); leakagefraction = new Landis.Library.Biomass.Ecoregions.AuxParm <float>(PlugIn.ModelCore.Ecoregions); }
//--------------------------------------------------------------------- public InputParameters() { hassiteoutput = PlugIn.ModelCore.Landscape.NewSiteVar<bool>(); canopylayerbiomfractions = new List<float[]>(); canopylayerages = new List<int>(); climatefilename = new Library.Biomass.Ecoregions.AuxParm<string>(PlugIn.modelCore.Ecoregions); slwdel = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); toroot = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); towood = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); folret = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); tofol = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); gddfolst = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); mortCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); growthCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); slwmax = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); cddfolend = new Landis.Library.Biomass.Species.AuxParm<int>(PlugIn.ModelCore.Species); wuecnst = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); q10 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); psntmin = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); halfsat = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); estradsensitivity = new Landis.Library.Biomass.Species.AuxParm<float >(PlugIn.ModelCore.Species); estmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); psntopt = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); foln = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); bfolresp = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); follignin = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); kwdlit = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); grmstsens = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dvpd2 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dvpd1 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); amaxa = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); amaxb = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); psnagered = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); k = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dnsc = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); maintresp = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); wltpnt = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); rtstratio = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); whc = new Landis.Library.Biomass.Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions); aet = new Landis.Library.Biomass.Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions); preciplossfrac = new Landis.Library.Biomass.Ecoregions.AuxParm<float>(PlugIn.ModelCore.Ecoregions); porosity = new Landis.Library.Biomass.Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions); leakagefrac = new Landis.Library.Biomass.Ecoregions.AuxParm<float>(PlugIn.ModelCore.Ecoregions); canopylayernumbers = new List<int>(); }
//--------------------------------------------------------------------- public static void Initialize(IInputParameters parameters) { transpiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); AnnualTranspiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); infiltration = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); runoff = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); waterleakage = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); evaporation = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); WHC = parameters.WHC; EvaporationFraction = parameters.EvaporationFraction; LeakageFraction = parameters.LeakageFraction; SnowPack = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); Water = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); foreach (ActiveSite site in PlugIn.ModelCore.Landscape) { SnowPack[site] = 0; Water[site] = 0; infiltration[site] = 0; runoff[site] = 0; evaporation[site] = 0; transpiration[site] = 0; AnnualTranspiration[site] = 0; } PlugIn.ModelCore.RegisterSiteVar(AnnualTranspiration, "Succession.AnnualTranspiration"); PlugIn.ModelCore.RegisterSiteVar(Water, "Succession.SoilWater"); }
public static void Initialize(IInputParameters parameters) { AET = parameters.AET; HeterotrophicRespiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>(); woodyDebris = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>(); litter = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>(); foreach (ActiveSite site in PlugIn.ModelCore.Landscape) { // site cohorts are initialized by the PlugIn.InitializeSite method woodyDebris[site] = new Pool(); litter[site] = new Pool(); HeterotrophicRespiration[site] = 0; } PlugIn.ModelCore.RegisterSiteVar(WoodyDebris, "Succession.WoodyDebris"); PlugIn.ModelCore.RegisterSiteVar(Litter, "Succession.Litter"); }
//--------------------------------------------------------------------- public InputParameters() { hassiteoutput = PlugIn.ModelCore.Landscape.NewSiteVar<bool>(); slwdel = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); rootturnover = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); woodturnover = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); folreten = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); foliageturnover = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); gddfolend = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); gddfolstart = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); mortCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); growthCurveShapeParm = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); slwmax = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); senescStart = new Landis.Library.Biomass.Species.AuxParm<int>(PlugIn.ModelCore.Species); wueconst = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); respq10 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); psntmin = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); halfsat = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); estradsensitivity = new Landis.Library.Biomass.Species.AuxParm<float[] >(PlugIn.ModelCore.Species); estmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm<float[]>(PlugIn.ModelCore.Species); psntopt = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); folncon = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); basefolrespfrac = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); growthmoisturesensitivity = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dvpd2 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dvpd1 = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); amaxa = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); amaxb = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); psnagered = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); k = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); dnsc = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); maintresp = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); wiltingpoint = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); rootstemratio = new Landis.Library.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species); whc = new Landis.Library.Biomass.Ecoregions.AuxParm<float>(PlugIn.ModelCore.Ecoregions); aet = new Landis.Library.Biomass.Ecoregions.AuxParm<int>(PlugIn.ModelCore.Ecoregions); evaporationfraction = new Landis.Library.Biomass.Ecoregions.AuxParm<float>(PlugIn.ModelCore.Ecoregions); leakagefraction = new Landis.Library.Biomass.Ecoregions.AuxParm<float>(PlugIn.ModelCore.Ecoregions); }
private bool TrySet(string ReadLabel, string VariableLabel, InputValue <string> value, float mininput, float maxinput, IEcoregion ecoregion, Landis.Library.Biomass.Ecoregions.AuxParm <float> EcoPar) { double value_in_double; if (double.TryParse(value.Actual, out value_in_double) == false) { return(false); } InputValue <double> dv = new InputValue <double>(value_in_double, ""); if (System.String.Compare(ReadLabel, VariableLabel, System.StringComparison.OrdinalIgnoreCase) == 0) { EcoPar[ecoregion] = (float)Landis.Library.Biomass.Util.CheckBiomassParm(ReadLabel, dv, mininput, maxinput); return(true); } return(false); }
private bool TrySet(string ReadLabel, string VariableLabel, InputValue <string> value, IEcoregion ecoregion, Landis.Library.Biomass.Ecoregions.AuxParm <string> EcoPar) { // VariableLabel has to occur in headers if (System.String.Compare(ReadLabel, VariableLabel, System.StringComparison.OrdinalIgnoreCase) == 0) { EcoPar[ecoregion] = value; return(true); } return(false); }
//--------------------------------------------------------------------- private bool TrySet(string ReadLabel, string VariableLabel, InputValue <string> value, float mininput, float maxinput, IEcoregion ecoregion, Landis.Library.Biomass.Ecoregions.AuxParm <int> EcoPar) { double value_in_double; if (double.TryParse(value.Actual, out value_in_double) == false) { return(false); } InputValue <double> dv = new InputValue <double>(value_in_double, ""); // VariableLabel has to occur in headers if (System.String.Compare(ReadLabel, VariableLabel, System.StringComparison.OrdinalIgnoreCase) == 0) { try { EcoPar[ecoregion] = (int)Landis.Library.Biomass.Util.CheckBiomassParm(ReadLabel, dv, mininput, maxinput); } catch (System.Exception e) { throw new System.Exception("Cannot set " + ReadLabel + e.Message); } return(true); } return(false); }