c$Author: fredfox $ c$Date: 2001-07-09 23:02:37 $ c$Revision: 1.1.2.2 $ c$Source: /weru/cvs/weps/weps.src/hydro/vaporden.for,v $ real*4 function vaporden( airtemp, relhum ) c returns the water vapor density in air (kg/m^3) c calculated directly from PV = nRT c*** Argument declarations *** real*4 airtemp, relhum c airtemp - the temperature of the air (C) c relhum - relative humidity of the air (fraction) c*** function declarations *** real*4 satvappres c satvappres - function to find the saturated vapor pressure (Pascals) c*** Local declarations *** real*4 actvappres c actvappres - actual vapor pressure (kPa) actvappres = relhum * satvappres(airtemp) c if(actvappres.lt.1.0e-34) write(*,*) 'vaporden:',relhum,airtemp vaporden = 2.166 * actvappres / (airtemp + 273.15) return end