/// <summary> /// Get example function. /// </summary> /// <returns></returns> public object GetExamples() { EvapotranspirationInput example = new EvapotranspirationInput() { Source = "nldas", DateTimeSpan = new DateTimeSpan() { StartDate = new DateTime(2015, 01, 01), EndDate = new DateTime(2015, 01, 08) }, Geometry = new TimeSeriesGeometry() { Point = new PointCoordinate() { Latitude = 33.925673, Longitude = -83.355723 }, Timezone = new Timezone() { Name = "EST", Offset = -5, DLS = false } } }; return(example); }
public ITimeSeriesOutput POST([FromBody] EvapotranspirationInput evapoInput) { WSEvapotranspiration evapo = new WSEvapotranspiration(); ITimeSeriesOutput results = evapo.GetEvapotranspiration(evapoInput); results.Metadata = Utilities.Metadata.AddToMetadata("request_url", this.Request.Path, results.Metadata); return(results); }
/// <summary> /// Get example function. /// </summary> /// <returns></returns> public object GetExamples() { EvapotranspirationInput example = new EvapotranspirationInput() { Source = "nldas", DateTimeSpan = new DateTimeSpan() { StartDate = new DateTime(2015, 01, 01), EndDate = new DateTime(2015, 01, 08) }, Geometry = new TimeSeriesGeometry() { Point = new PointCoordinate() { Latitude = 33.925673, Longitude = -83.355723 }, Timezone = new Timezone() { Name = "EST", Offset = -5, DLS = false } }, Algorithm = "nldas", DataValueFormat = "E3", TemporalResolution = "default", TimeLocalized = true, Units = "default", OutputFormat = "json", Albedo = 0.23, CentralLongitude = 75.0, SunAngle = 17.2, Emissivity = 0.92, Model = "ETP", Zenith = 0.05, LakeSurfaceArea = 0.005, LakeDepth = 0.2, SubsurfaceResistance = 500.0, StomatalResistance = 400.0, LeafWidth = 0.02, RoughnessLength = 0.02, VegetationHeight = 0.12, LeafAreaIndices = new Hashtable { { 1, 2.51 }, { 2, 2.51 }, { 3, 2.51 }, { 4, 2.51 }, { 5, 2.51 }, { 6, 2.51 }, { 7, 2.51 }, { 8, 2.51 }, { 9, 2.51 }, { 10, 2.51 }, { 11, 2.51 }, { 12, 2.51 } }, AirTemperature = new Hashtable { { 1, 1.0 }, { 2, 1.0 }, { 3, 1.0 }, { 4, 1.0 }, { 5, 1.0 }, { 6, 1.0 }, { 7, 1.0 }, { 8, 1.0 }, { 9, 1.0 }, { 10, 1.0 }, { 11, 1.0 }, { 12, 1.0 } }, UserData = "2015-01-01 00Z -2.7000E-03\n2015 - 01 - 01 01Z - 1.9000E-03\n2015 - 01 - 01 02Z - 1.3000E-03\n2015 - 01 - 01 03Z - 9.0000E-04\n2015 - 01 - 01 04Z - 3.0000E-04" }; return(example); }
public async Task <IActionResult> POST([FromBody] EvapotranspirationInput evapoInput) { var watch = System.Diagnostics.Stopwatch.StartNew(); //For Debugging WSEvapotranspiration evapo = new WSEvapotranspiration(); ITimeSeriesOutput results = await evapo.GetEvapotranspiration(evapoInput); results.Metadata = Utilities.Metadata.AddToMetadata("request_url", this.Request.Path, results.Metadata); watch.Stop(); string elapsed = TimeSpan.FromMilliseconds(watch.ElapsedMilliseconds).TotalMinutes.ToString(); results.Metadata.Add("Time Elapsed", elapsed); return(new ObjectResult(results)); }
/// <summary> /// Get example function. /// </summary> /// <returns></returns> public object GetExamples() { EvapotranspirationInput example = new EvapotranspirationInput() { Source = "nldas", DateTimeSpan = new DateTimeSpan() { StartDate = new DateTime(2015, 01, 01), EndDate = new DateTime(2015, 01, 08), DateTimeFormat = "yyyy-MM-dd HH" }, Geometry = new TimeSeriesGeometry() { Description = "EPA Athens Office", Point = new PointCoordinate() { Latitude = 33.925673, Longitude = -83.355723 }, GeometryMetadata = new Dictionary <string, string>() { { "City", "Athens" }, { "State", "Georgia" }, { "Country", "United States" } }, Timezone = new Timezone() { Name = "EST", Offset = -5, DLS = false } }, DataValueFormat = "E3", TemporalResolution = "default", TimeLocalized = true, Units = "default", OutputFormat = "json" }; return(example); }