#include "frost_point.h" #include float h2o_vapr_ice_mauersberger(const float& t) { /* function h2o_vapr_ice_mauersberger,t ;------------------------------------------------------------------ ; Purpose: ; Compute the saturation vapor pressure of h2o over ice according ; to Mauersberger and Krankowsky GRL, 10.1029/2002GL016183, 2003. ; The M&K relationships are valid for 273.15 > T > 164.5. This ; routine allow the calculation of vapor pressures at T < 164.5, ; users be warned! ; ; Input: ; t.......temp in K ; ; Output: ; p_sat...saturation vapor pressure (mbar) ; ; Source: Mark Hervig ;------------------------------------------------------------------ nt = n_elements(t) p_sat = fltarr(nt) for i = 0, nt-1 do begin */ float retval; // the return value if( t <= 169.0) { retval = 0.01 * std::pow( 10.0, (14.88 -3059.0 / t ) ); } else if (t <= 273.15) { retval = 0.01 * std::pow(10.0, (12.537 -2663.5 / t ) ); } return retval; /* if (t(i) gt 169.0 and t(i) le 273.15) then $ p_sat(i) = 0.01 * 10^(12.537 -2663.5 / t(i) ) if (t(i) le 169.0) then $ p_sat(i) = 0.01 * 10^(14.88 -3059.0 / t(i) ) endfor return,p_sat end */ }