コード例 #1
0
ファイル: PRISM.cs プロジェクト: jsclough/hms_backend
        public ITimeSeriesOutput GetData(out string errorMsg, ITimeSeriesOutput output, ITimeSeriesInput input)
        {
            errorMsg = "";
            Data.Source.PRISM prism = new Data.Source.PRISM();
            string            data  = prism.GetData(out errorMsg, "ppt", input);

            ITimeSeriesOutput prismOutput = output;

            if (errorMsg.Contains("ERROR"))
            {
                Utilities.ErrorOutput err = new Utilities.ErrorOutput();
                output   = err.ReturnError("Precipitation", "PRISM", errorMsg);
                errorMsg = "";
                return(output);
            }
            else
            {
                prismOutput = prism.SetDataToOutput(out errorMsg, "Precipitation", data, output, input);
            }

            prismOutput = TemporalAggregation(out errorMsg, output, input);
            if (errorMsg.Contains("ERROR"))
            {
                return(null);
            }

            return(prismOutput);
        }
コード例 #2
0
ファイル: PRISM.cs プロジェクト: quanted/hms
        /// <summary>
        /// Makes the GetData call to the base PRISM class.
        /// </summary>
        /// <param name="errorMsg"></param>
        /// <param name="output"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        public ITimeSeriesOutput GetData(out string errorMsg, ITimeSeriesOutput output, ITimeSeriesInput input)
        {
            errorMsg = "";
            Data.Source.PRISM prism = new Data.Source.PRISM();
            string            data  = prism.GetData(out errorMsg, "'tmax', 'tmin'", input);

            if (errorMsg.Contains("ERROR"))
            {
                return(null);
            }

            ITimeSeriesOutput prismOutput = output;

            prismOutput = prism.SetDataToOutput(out errorMsg, "Temperature", data, output, input);
            if (errorMsg.Contains("ERROR"))
            {
                return(null);
            }

            prismOutput = TemporalAggregation(out errorMsg, output, input);
            if (errorMsg.Contains("ERROR"))
            {
                return(null);
            }

            return(prismOutput);
        }