module NumRu::Met::SkewT

Draw Skew-T log-p diagram by using RubyDCL

Sample image

Example

require "numru/met"
include NumRu
include NumRu::Met
DCL.gropn(1)
DCL.grfrm
DCL.grsvpt(0.25,0.75,0.2,0.8)
SkewT.frame([-10.0,40.0],[1000.0,250.0])
prs = [1000,850,700,500,300]
temp = [20,10,0,-20,-45]
r = [0.012,0.008,0.004,0.0005,0.0001]
SkewT.plot_tempC(temp,prs)
SkewT.plot_mixing_ratio(r,prs)
DCL.grcls

Module functions

frame(t_range=nil, p_range=nil, title=nil)

Defines viewport, draws axes, and isopleths needed for a skew-T diagram (temperature, mixing ratio, potential temperature, saturation equivalent potential temperature (pseudo-adiabatic))

ARGUMENTS

plot_tempC(tempC, prs, line_type=1, line_index=5)

Plots temperarue on the skew-T diagram. You have to call frame in advance.

ARGUMENTS

plot_mixing_ratio(r, prs, line_type=3, line_index=5)

Plots mixing ratio -- dew(frost) point temperature on the skew-T diagram. You have to call frame in advance.

ARGUMENTS

plot_specific_humidity(q, prs, line_type=3, line_index=5)

Same as plot_mixing_ratio, but takes specific humidity as an argument (internally converted to mixing ratio) Plots mixing ratio -- dew(frost) point temperature on the skew-T diagram. You have to call frame in advance.

ARGUMENTS