;+ ; ; ============= ; rh_to_spechum ; ============= ; ; .. function:: rh_to_spechum(rh,ta,P) ; ; :param rh: in % ; :param ta: air temperature in degC ; :param P: pressure in hPa ; ; :returns: Air specific humidity (g/kg) ; ; EXAMPLES ; ======== ; ; :: ; ; IDL> rh=+todo+ ; IDL> ta=+todo+ ; IDL> P=+todo+ ; IDL> result=rh_to_spechum(rh,ta,P) ; ; TODO ; ==== ; ; hard coded directory - usage of ${PROJECT_ID} ; ; coding rules ; ; EVOLUTIONS ; ========== ; ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) ; ; * minimal header ; ; - pbk 2008 ; ; * creation ; ;- function rh_to_spechum, rh,ta,P rhf=rh/100. qw=qsat(ta,P)/1000. ; Air specific humidity (g/kg) q=(rhf*qw)/(1.-qw*(1-rhf))*1e3 return, q end