;**************************************************** ; xy_28.ncl ; ; Concepts illustrated: ; - Drawing a hodograph plot ; - Reading data from an ASCII file ; - Drawing XY plot curves with both lines and markers ; - Putting labels on an XY plot ; ;**************************************************** ; ; This script was contributed by Haoming Chen from ; LASG/IAP in Beijing, China. ; ; A hodograph plot is a suitable approach in ; describing diurnal variations in the wind vector ; at a given point. ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" begin plev = (/ 972,962,953,946,938.7,925,905.8,898 /) mr = (/9.72,9.5,9.1,9.2,9.1,8.8,7.9,7.5 /) plev = plev*100. plev@units = "Pa" ; Convert to Pascals mr@units = "g/kg" ptop = min(plev) psfc = 983*100 psfc@units = "Pa" dp = dpres_plevel(plev, psfc, ptop, 0) ;total mix ratio tot_mr = sum(mr*dp) avg_mr_test = tot_mr/sum(dp) ;Conventional Calculation print(avg_mr_test) end