LCOV - code coverage report
Current view: top level - air_casawvr/src - basicphys.cc (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 8 0.0 %
Date: 2024-10-29 13:38:20 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /**
       2             :    \file basicphys.cpp
       3             :    Bojan Nikolic <bn204@mrao.cam.ac.uk>, <bojan@bnikolic.co.uk>
       4             :    
       5             :    Initial version February 2008
       6             :    Maintained by ESO since 2013.
       7             : 
       8             :    Renamed basicphys.cc 2023
       9             : 
      10             : */
      11             : 
      12             : #include "basicphys.h"
      13             : 
      14             : namespace LibAIR2 {
      15             : 
      16           0 :   double SW_WaterToPath_Simplified( double c, 
      17             :                                     double T)
      18             :   {
      19           0 :     return  c * ( pmw_mm_to_n *  h2o_1_mass_amu * amu_kg )* 1.742 * 1e7 / T;
      20             :   }
      21             : 
      22           0 :   double AbsHum(double rh,
      23             :                 double T,
      24             :                 double P)
      25             :   {
      26             : 
      27             :     // Saturation pressure of water vapour
      28           0 :     const double es = 6.105*exp(25.22 / T * (T - 273.0) - 5.31 * log(T / 273.0));
      29             : 
      30           0 :     double e = 1.0 - (1.0 - rh) * es / P;
      31           0 :     e = es * rh / e;
      32             : 
      33           0 :     double rwat0 = e * 216.502 / T;
      34           0 :     return rwat0;
      35             :   }
      36             : 
      37             : 
      38             : }
      39             : 
      40             : 

Generated by: LCOV version 1.16