﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
422	Bugfix in check_qsat	Ian Culverwell	Ian Culverwell	"There's a typo in subroutine check_qsat in '''ropp_fm/model_meto/ropp_fm_state2state_meto.f90''' and
'''ropp_fm/model_ecmwf/ropp_fm_state2state_ecmwf.f90'''.  The SVP over water at 373.16 K is ten times too large.

{{{
    WHERE(temp >= 273.16)
      es = 1013246.0_wp * (10**Z)
    ELSEWHERE
      es = 610.71_wp * (10**X)
    ENDWHERE
}}}

should be replaced by

{{{
    WHERE(temp >= 273.16)
      es = 101324.6_wp * (10**Z)
    ELSEWHERE
      es = 610.71_wp * (10**X)
    ENDWHERE
}}}

(es is the saturated vapour pressure in Pa.)

This means that in the lower troposphere, where temp >= 273.16 K, the saturated humidity is too high, so the saturation check is not being applied as strongly or as often as it should be.

Note that the check on qsat was introduced in [2217], in response to #172. There's a simpler formula for SVP than the Goff & Gratch (1946) formula used in check_qsat, which agrees with it to within 0.25% (1): namely, the CIMO Guide formula (WMO 2008)

{{{
    theta = temp - t_freeze  ! temperature in deg C

    WHERE (theta >= 0.0_wp)  ! svp over liquid water

      svp = svp_freeze * EXP( c_wat(1) * theta / (c_wat(2) + theta) )

    ELSEWHERE  ! svp over ice

      svp = svp_freeze * EXP( c_ice(1) * theta / (c_ice(2) + theta) )

    END WHERE

}}}  

This is used in '''ropp_apps/pblh/ropp_apps_pblh_rhum.f90''', so now might be a good time to adopt it here. 

(1) Fig 3 of http://cires1.colorado.edu/~voemel/vp.pro claims the two formulae are within ~1.5%, but I estimate the maximum difference to be 0.25% at T ~ 230 K ~ -45 deg C.  Check this if I do decide to amend this part of check_qsat."	defect	closed	normal	9.0	ropp_fm	8.0	fixed	saturation	
