function q = td2q(td,pmb)
%{
    converts dew point to specific humidity
    input dew point, td, in deg C and P in mb
%}

e = 6.11*10.^(7.5*td./(237.7+td));
q = e*622./(pmb - 0.378*e);
end