LCOV - code coverage report
Current view: top level - physics/carma/base - vaporp.F90 (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 11 54.5 %
Date: 2025-03-14 01:30:37 Functions: 1 1 100.0 %

          Line data    Source code
       1             : ! Include shortname defintions, so that the F77 code does not have to be modified to
       2             : ! reference the CARMA structure.
       3             : #include "carma_globaer.h"
       4             : 
       5             : !!  This routine calculates the vapor pressure for all gases at one altitude.
       6             : !!
       7             : !!  <pvapl> and <pvapi> are vapor pressures in units of [dyne/cm^2]
       8             : !!
       9             : !!  Uses temperature <t> as input.
      10             : !!
      11             : !! @author Andy Ackerman
      12             : !! @version Dec-1995
      13   923864952 : subroutine vaporp(carma, cstate, iz, igas, rc)
      14             : 
      15             :   !     types
      16             :   use carma_precision_mod
      17             :   use carma_enums_mod
      18             :   use carma_constants_mod
      19             :   use carma_types_mod
      20             :   use carmastate_mod
      21             :   use carma_mod
      22             : 
      23             :   implicit none
      24             : 
      25             :   type(carma_type), intent(in)         :: carma   !! the carma object
      26             :   type(carmastate_type), intent(inout) :: cstate  !! the carma state object
      27             :   integer, intent(in)                  :: iz      !! z index
      28             :   integer, intent(in)                  :: igas    !! gas index
      29             :   integer, intent(inout)               :: rc      !! return code, negative indicates failure
      30             : 
      31             :   ! Each gas should have a vapor pressure routine specified for it.
      32             :   !
      33             :   ! As new gases are supported, this table should be expanded with new entries for
      34             :   ! the appropriate vapor pressure rotuines.
      35   923864952 :   select case(ivaprtn(igas))
      36             : 
      37             :     case (I_VAPRTN_H2O_BUCK1981)
      38           0 :       call vaporp_h2o_buck1981(carma, cstate, iz, rc, pvapl(iz, igas), pvapi(iz, igas))
      39             :     
      40             :     case(I_VAPRTN_H2O_MURPHY2005)
      41   461932476 :       call vaporp_h2o_murphy2005(carma, cstate, iz, rc, pvapl(iz, igas), pvapi(iz, igas))
      42             :     
      43             :     case(I_VAPRTN_H2O_GOFF1946)
      44           0 :       call vaporp_h2o_goff1946(carma, cstate, iz, rc, pvapl(iz, igas), pvapi(iz, igas))
      45             :     
      46             :     case(I_VAPRTN_H2SO4_AYERS1980)
      47   461932476 :       call vaporp_h2so4_ayers1980(carma, cstate, iz, rc, pvapl(iz, igas), pvapi(iz, igas))
      48             : 
      49             :     case default
      50           0 :       if (do_print) write(LUNOPRT,*) "vaporp:: ERROR - Unknown vapor pressure routine  (", ivaprtn(igas), &
      51           0 :         ") for gas (", igas, ")."
      52           0 :       rc = RC_ERROR
      53  1847729904 :       return
      54             :   end select
      55             : 
      56             :   ! Return to caller with vapor pressures evaluated.
      57             :   return
      58   923864952 : end

Generated by: LCOV version 1.14