module LogP : log-pressure coordinate support
returns the current value of the log-p scale height (in UNumeric)
# File ../../lib/numru/ganalysis/log_p.rb, line 27 def h @@H.clone end
convert pressure to log-p height
# File ../../lib/numru/ganalysis/log_p.rb, line 32 def p2z(p) z = (p/P00).convert_units("1").log * (-@@H) z.name = "z" z.long_name = "log-p z" z.del_att("positive") z end
del/delz applied to data with the p coordinate
# File ../../lib/numru/ganalysis/log_p.rb, line 41 def pcdata_dz(gphys, pdim=nil) pdim = Met.find_prs_d(gphys) if !pdim p = gphys.axis(pdim).to_gphys z = p2z(p.data) bc = Derivative::LINEAR_EXT delz = gphys.threepoint_O2nd_deriv(pdim, bc, z) delz.name = gphys.name+"_z" delz.long_name = "del/delz (#{gphys.long_name})" delz end
del2/del2z applied to data with the p coordinate
# File ../../lib/numru/ganalysis/log_p.rb, line 53 def pcdata_dz2(gphys, pdim=nil) pdim = Met.find_prs_d(gphys) if !pdim p = gphys.axis(pdim).to_gphys z = p2z(p.data) bc = Derivative::LINEAR_EXT delz = gphys.deriv2nd(pdim, bc, z) delz.name = gphys.name+"_zz" delz.long_name = "del2/del2z (#{gphys.long_name})" delz end
p^{-1} del_z ( p del_z self ) where del_z = del/del z
# File ../../lib/numru/ganalysis/log_p.rb, line 66 def pcdata_pi_dz_p_dz(gphys, pdim=nil) pdim = Met.find_prs_d(gphys) if !pdim p = gphys.axis(pdim).to_gphys z = p2z(p.data) bc = Derivative::LINEAR_EXT p_dz = gphys.threepoint_O2nd_deriv(pdim, bc, z) * p pi_dz_p_p_dz = p_dz.threepoint_O2nd_deriv(pdim, bc, z) / p pi_dz_p_p_dz.long_name = "1/p del_z (p del_z #{gphys.name})" pi_dz_p_p_dz end
Generated with the Darkfish Rdoc Generator 2.