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 : !! Calculates the vapor pressure of water vapor over liquid water and ice according 6 : !! to the parameterization of Murphy & Koop [2005]. 7 : !! 8 : !! NOTE: <pvapl> and <pvapi> are vapor pressures in units of [dyne/cm^2] 9 : !! 10 : !! @author Chuck Bardeen 11 : !! @version May-2009 12 2988364956 : subroutine vaporp_h2o_murphy2005(carma, cstate, iz, rc, pvap_liq, pvap_ice) 13 : 14 : ! types 15 : use carma_precision_mod 16 : use carma_enums_mod 17 : use carma_constants_mod 18 : use carma_types_mod 19 : use carmastate_mod 20 : use carma_mod 21 : 22 : implicit none 23 : 24 : type(carma_type), intent(in) :: carma !! the carma object 25 : type(carmastate_type), intent(inout) :: cstate !! the carma state object 26 : integer, intent(in) :: iz !! z index 27 : real(kind=f), intent(out) :: pvap_liq !! vapor pressure wrt liquid [dyne/cm2] 28 : real(kind=f), intent(out) :: pvap_ice !! vapor pressure wrt ice [dyne[cm2] 29 : integer, intent(inout) :: rc !! return code, negative indicates failure 30 : 31 : ! Local declarations 32 : real(kind=f) :: tt 33 : 34 : 35 : ! Saturation vapor pressure over liquid water and water ice from 36 : ! Murphy and Koop, Quart. J. Roy. Meteo. Soc., 131, 1539-1565, [2005]. 37 2988364956 : tt = t(iz) 38 : 39 : pvap_liq = 10.0_f * exp(54.842763_f - (6763.22_f / tt) - (4.210_f * log(tt)) + (0.000367_f * tt) + & 40 : (tanh(0.0415_f * (tt - 218.8_f)) * & 41 2988364956 : (53.878_f - (1331.22_f / tt) - (9.44523_f * log(tt)) + 0.014025_f * tt))) 42 : 43 2988364956 : pvap_ice = 10.0_f * exp(9.550426_f - (5723.265_f / tt) + (3.53068_f * log(tt)) - (0.00728332_f * tt)) 44 : 45 : ! Check to see whether temperature is ouside range of validity for the parameterization. 46 : ! 47 : ! pvapl is defined for 123 < T < 332 K 48 : ! pvapi is defined for T > 110 K 49 : ! 50 : ! NOTE: Don't stop the simulation if the limits are exceeded. 51 : ! if ((t(iz) .le. 123.0_f) .or. (t(iz) .ge. 332.0_f)) then 52 : ! if (do_print) write(LUNOPRT,*) 'vaporp_h2o_murphy2005::WARNING - Temperature', t(iz), & 53 : ! ' out of range at iz = ', iz, "lat=", lat, "lon=", lon 54 : ! rc = RC_WARNING 55 : ! endif 56 : 57 : ! Return to caller with vapor pressures evaluated. 58 2988364956 : return 59 2988364956 : end