Dew point temperature sea level pressure scene pressure calculation formula class

Source: Internet
Author: User

Using system;using system.collections.generic;using system.linq;using system.text;namespace LuDianOperation{Public        Class Ludian {//Based on Magolas improved formula calculates water vapor pressure and dew point temperature public double T {get; set;}        Public double F {get; set;}        Private double Pa {get; set;}        Private double A {get; set;}        Private double b {get; set;}        public static readonly Double E0 = 6.1078;         Sea level pressure//p0=psx10^[h/18400 (1+tm/273)]//p0 for sea level pressure, Unit HPA,//ps for the station air pressure, Unit hpa,//h for the pressure sensor to pull the sea height, in units of M;        The Tm is the average temperature of the gas column, the unit is ℃,tm= (t+t12)/2+h/400,//t is the dry bulb temperature, unit ℃,//t12 for the observation 12 hours before the temperature, unit ℃. <summary>//Get sea level pressure///</summary>//<param name= "Currentt" > Current time temperature </par am>//<param name= "T12" >12 hours before the temperature </param>///<param Name= "Currentstationps" > Air pressure at the current site </param>//<param name= "Haibah" > Barometric pressure Sensor extraction height (altitude) </param>//<returns> sea level pressure (DOUBLe) </returns> public double Gethaipingmianqiya (double Currentt, double T12, double Currentstationps, double Ha Ibah) {try {//tm= (t+t12)/2+h/400; double Tm = (Currentt + T12                )/2 + haibah/400;                [H/18400 (1+tm/273)] double centerdataone = Haibah/(18400 * (1 + tm/273));                10^[h/18400 (1+tm/273)] Double centerdatatwo = Math.pow (10.0, Centerdataone);            psx10^[h/18400 (1+tm/273)] return Math.Round (CURRENTSTATIONPS * centerdatatwo, 1); } catch (Exception ex) {Console.WriteLine (ex.                Message);            return 0.0;                     }}///<summary>///parameterless constructor///</summary> public Ludian () { }///<summary>//constructor///</summary>//<param name= "T" > Temperature Degree </param>        <param name= "F" > Humidity </param> public Ludian (Double T, double f) {this.            t = t; This.            f = f; if (this.                T > 0) {this.a = 7.69;            this.b = 243.92;                } else {this.a = 9.5;            this.b = 265.5; }} #region dew point temperature and saturated water pressure///<summary>///To obtain saturated vapor pressure///</summary>// /<returns></returns> public double getes () {Double Center = (A * this. T)/(b + this.            T);        Return Math.Round (E0 * MATH.POW (10.0, Center), 1);        }///<summary>//Calculate intermediate variables///</summary>//<returns></returns>        Private double E () {return getes () * F * 0.01; }///<summary>//Calculate dew point temperature////</summary>//<returns>double</returNs> public Double Gettd () {Double ESS = E ();            Double AAA = b * MATH.LOG10 (ESS/E0);            Double BBB = a-math.log10 (ESS/E0);        Return Math.Round (AAA/BBB, 1);        } #endregion #region Water pressure///<summary>////////</summary>  <returns></returns> public double Geteshuiqiya (double Ts) {double 17.269            * ((Ts-273.16)/(Ts-35.86));        Return Math.Round (610.78 * MATH.EXP (both), 1); }///<summary>//dry ball algorithm for water vapor pressure///</summary>//<param name= "FSS" > Relative humidity </ param>//<returns></returns> public double Geteshuiqiya () {return Math. Round (this.        F * getes ()/100), 2); } #endregion}}

Dew point temperature sea level pressure scene pressure calculation formula class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.