<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1499831043994_5311"></div><div id="yui_3_16_0_ym19_1_1499831043994_5468"><span id="yui_3_16_0_ym19_1_1499831043994_5469">Dear all</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5470"><span id="yui_3_16_0_ym19_1_1499831043994_5471">I want to draw SKEWT gfs data. I write below script. but I have below error:</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5472"><span id="yui_3_16_0_ym19_1_1499831043994_5473">fatal:Number of dimensions in parameter (2) of (skewT_PlotData) is (3), (1) dimensions were expected<br id="yui_3_16_0_ym19_1_1499831043994_5474">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 113 in file grb-SKEWT-1.ncl<br id="yui_3_16_0_ym19_1_1499831043994_5475"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5476"><span id="yui_3_16_0_ym19_1_1499831043994_5477"><br id="yui_3_16_0_ym19_1_1499831043994_5478"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5479"><span id="yui_3_16_0_ym19_1_1499831043994_5480">Please guide me.</span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5481"><span id="yui_3_16_0_ym19_1_1499831043994_5482">thanks<br id="yui_3_16_0_ym19_1_1499831043994_5483"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5484"><span id="yui_3_16_0_ym19_1_1499831043994_5485">************************<br id="yui_3_16_0_ym19_1_1499831043994_5486"></span></div><div dir="ltr" id="yui_3_16_0_ym19_1_1499831043994_5487"><span id="yui_3_16_0_ym19_1_1499831043994_5488"><br id="yui_3_16_0_ym19_1_1499831043994_5489"></span></div><span id="yui_3_16_0_ym19_1_1499831043994_5490">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br id="yui_3_16_0_ym19_1_1499831043994_5491">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl"<br id="yui_3_16_0_ym19_1_1499831043994_5492">begin<br id="yui_3_16_0_ym19_1_1499831043994_5493"> a = addfile("./gfs.t12z.pgrb2.0p50.f012.nc","r")<br id="yui_3_16_0_ym19_1_1499831043994_5494">type = "x11"<br id="yui_3_16_0_ym19_1_1499831043994_5495"> wks = gsn_open_wks(type,"gfs-skewt")<br id="yui_3_16_0_ym19_1_1499831043994_5496"><br id="yui_3_16_0_ym19_1_1499831043994_5497"> gsn_define_colormap(wks,"WhViBlGrYeOrReWh")<br id="yui_3_16_0_ym19_1_1499831043994_5498"><br id="yui_3_16_0_ym19_1_1499831043994_5499">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br id="yui_3_16_0_ym19_1_1499831043994_5500">; First get the variables we will need at time 2<br id="yui_3_16_0_ym19_1_1499831043994_5501"><br id="yui_3_16_0_ym19_1_1499831043994_5502"> tk = a->TMP_P0_L100_GLL0(lv_ISBL0|:, lat_0|:, lon_0|:) ; T in C<br id="yui_3_16_0_ym19_1_1499831043994_5503"> tk1 = tk<br id="yui_3_16_0_ym19_1_1499831043994_5504"> tc = tk1 - 273.15<br id="yui_3_16_0_ym19_1_1499831043994_5505"> tc@units= "degC"<br id="yui_3_16_0_ym19_1_1499831043994_5506"><br id="yui_3_16_0_ym19_1_1499831043994_5507"> rh = a->RH_P0_L100_GLL0(lv_ISBL0|:, lat_0|:, lon_0|:)<br id="yui_3_16_0_ym19_1_1499831043994_5508"> rh1 = rh<br id="yui_3_16_0_ym19_1_1499831043994_5509"> td = dewtemp_trh(tk1,rh1) - 273.15<br id="yui_3_16_0_ym19_1_1499831043994_5510"> td@units = "degC"<br id="yui_3_16_0_ym19_1_1499831043994_5511"><br id="yui_3_16_0_ym19_1_1499831043994_5512">; p = a->lv_ISBL0(lv_ISBL0|:) ; ( lv_ISBL0 )<br id="yui_3_16_0_ym19_1_1499831043994_5513"><br id="yui_3_16_0_ym19_1_1499831043994_5514">;p = a->PRES_P0_L103_GLL0(lat_0|:, lon_0|:)<br id="yui_3_16_0_ym19_1_1499831043994_5515"> p = a->PRES_P0_L109_GLL0(lv_PVL3|:, lat_0|:, lon_0|:)<br id="yui_3_16_0_ym19_1_1499831043994_5516"> p = p*0.01 ; change units<br id="yui_3_16_0_ym19_1_1499831043994_5517"> p@units = "hPa" ; skewT, mixhum_ptrh use mb (hPa)<br id="yui_3_16_0_ym19_1_1499831043994_5518"><br id="yui_3_16_0_ym19_1_1499831043994_5519"><br id="yui_3_16_0_ym19_1_1499831043994_5520"> u = a->UGRD_P0_L100_GLL0(lv_ISBL0|:, lat_0|:, lon_0|:)<br id="yui_3_16_0_ym19_1_1499831043994_5521"> v = a->VGRD_P0_L100_GLL0(lv_ISBL0|:, lat_0|:, lon_0|:)<br id="yui_3_16_0_ym19_1_1499831043994_5522"><br id="yui_3_16_0_ym19_1_1499831043994_5523"> ; q = mixhum_ptrh (p, tk1, rh1, 2)<br id="yui_3_16_0_ym19_1_1499831043994_5524"> ; q@units = "kg/kg"<br id="yui_3_16_0_ym19_1_1499831043994_5525"> z = a->HGT_P0_L100_GLL0<br id="yui_3_16_0_ym19_1_1499831043994_5526"><br id="yui_3_16_0_ym19_1_1499831043994_5527"> wspd = sqrt(u^2 + v^2)<br id="yui_3_16_0_ym19_1_1499831043994_5528"> wdir = wind_direction(u,v,0)<br id="yui_3_16_0_ym19_1_1499831043994_5529"><br id="yui_3_16_0_ym19_1_1499831043994_5530"><br id="yui_3_16_0_ym19_1_1499831043994_5531">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br id="yui_3_16_0_ym19_1_1499831043994_5532">; Get ij point in model domain for our location of interest<br id="yui_3_16_0_ym19_1_1499831043994_5533">; loc(1) is south-north (y) and loc(0) is west-east (x)<br id="yui_3_16_0_ym19_1_1499831043994_5534">; Ensure this point is in the domain, as we are not checking<br id="yui_3_16_0_ym19_1_1499831043994_5535">; We are interested in NCL array pointers, so subtract 1<br id="yui_3_16_0_ym19_1_1499831043994_5536"><br id="yui_3_16_0_ym19_1_1499831043994_5537">; loc = wrf_user_ll_to_ij(a, 59.6, 36.3, True)<br id="yui_3_16_0_ym19_1_1499831043994_5538"> ; locX = loc(0) - 1<br id="yui_3_16_0_ym19_1_1499831043994_5539"> ; locY = loc(1) - 1<br id="yui_3_16_0_ym19_1_1499831043994_5540"><br id="yui_3_16_0_ym19_1_1499831043994_5541"><br id="yui_3_16_0_ym19_1_1499831043994_5542">; Define a few skew-T plotting options<br id="yui_3_16_0_ym19_1_1499831043994_5543"> skewtOpts = True<br id="yui_3_16_0_ym19_1_1499831043994_5544"> skewtOpts@DrawHeightScale = True ; plot height scale on side<br id="yui_3_16_0_ym19_1_1499831043994_5545"> skewtOpts@DrawHeightScaleFt = False ; plot height scale in km<br id="yui_3_16_0_ym19_1_1499831043994_5546"> skewtOpts@DrawStandardAtm = True ; draw standard atm on plot<br id="yui_3_16_0_ym19_1_1499831043994_5547"> skewtOpts@vpXF = 0.12 ; controls off-set from left<br id="yui_3_16_0_ym19_1_1499831043994_5548"> skewtOpts@vpYF = 0.87 ; controls off-set from top<br id="yui_3_16_0_ym19_1_1499831043994_5549"> skewtOpts@vpWidthF = 0.75 ; controls size of plot<br id="yui_3_16_0_ym19_1_1499831043994_5550"> skewtOpts@vpHeightF = 0.75 ; controls size of plot<br id="yui_3_16_0_ym19_1_1499831043994_5551"> skewtOpts@DrawFahrenheit = False ; use deg C scale<br id="yui_3_16_0_ym19_1_1499831043994_5552"> skewtOpts@tiMainFontHeightF = 0.015 ; change height of main title<br id="yui_3_16_0_ym19_1_1499831043994_5553"> ;skewtOpts@DrawColLine = False ; draw lines in black<br id="yui_3_16_0_ym19_1_1499831043994_5554"> skewtOpts@DrawColAreaFill = True ; color on background plot<br id="yui_3_16_0_ym19_1_1499831043994_5555"> ;skewtOpts@DrawColAreaColor = "Green" ; final color may depend on the color table used<br id="yui_3_16_0_ym19_1_1499831043994_5556"> skewtOpts@DrawColAreaColor = 53 ; Light Green for WhViBlGrYeOrReWh color table<br id="yui_3_16_0_ym19_1_1499831043994_5557"> skewtOpts@PrintOpts = False ; do not print options out<br id="yui_3_16_0_ym19_1_1499831043994_5558"><br id="yui_3_16_0_ym19_1_1499831043994_5559"><br id="yui_3_16_0_ym19_1_1499831043994_5560">; Get the skew-T background<br id="yui_3_16_0_ym19_1_1499831043994_5561"> skewtOpts@tiMainString = "Initial Condition: 12UTC 20161127, Valid for: 00UTC 20161128, D1(22.5KM)"<br id="yui_3_16_0_ym19_1_1499831043994_5562"> skewt_bkgd = skewT_BackGround (wks, skewtOpts)<br id="yui_3_16_0_ym19_1_1499831043994_5563"> draw (skewt_bkgd)<br id="yui_3_16_0_ym19_1_1499831043994_5564"><br id="yui_3_16_0_ym19_1_1499831043994_5565"><br id="yui_3_16_0_ym19_1_1499831043994_5566">; Draw the skew-T plot<br id="yui_3_16_0_ym19_1_1499831043994_5567"> dataOpts = True<br id="yui_3_16_0_ym19_1_1499831043994_5568"> dataOpts@colTemperature = "Red" ; default -> "Foreground"<br id="yui_3_16_0_ym19_1_1499831043994_5569"> dataOpts@Parcel = 1<br id="yui_3_16_0_ym19_1_1499831043994_5570"> dataOpts@WspdWdir = False ; wind speed and dir [else: u,v]<br id="yui_3_16_0_ym19_1_1499831043994_5571"> dataOpts@HspdHdir = True ; wind speed and dir [else: u,v]<br id="yui_3_16_0_ym19_1_1499831043994_5572"> skewtOpts@tiMainString = "Raob; Thicker Wind Barbs"<br id="yui_3_16_0_ym19_1_1499831043994_5573"> dataOpts@DrawWindBarbThk = 1.5 ; default value is 1.0 (may be fractional)<br id="yui_3_16_0_ym19_1_1499831043994_5574"><br id="yui_3_16_0_ym19_1_1499831043994_5575">skewt_bkgd = skewT_BackGround (wks, skewtOpts)<br id="yui_3_16_0_ym19_1_1499831043994_5576">skewt_data = skewT_PlotData (wks, skewt_bkgd, p,tc,td,z,wspd,wdir,dataOpts)<br id="yui_3_16_0_ym19_1_1499831043994_5577"><br id="yui_3_16_0_ym19_1_1499831043994_5578"><br id="yui_3_16_0_ym19_1_1499831043994_5579">draw (skewt_bkgd)<br id="yui_3_16_0_ym19_1_1499831043994_5580">draw (skewt_data)<br id="yui_3_16_0_ym19_1_1499831043994_5581"> frame(wks)<br id="yui_3_16_0_ym19_1_1499831043994_5582"><br id="yui_3_16_0_ym19_1_1499831043994_5583">end</span><div id="yui_3_16_0_ym19_1_1499831043994_5320"> </div><div class="signature" id="yui_3_16_0_ym19_1_1499831043994_5314"><br><div id="yui_3_16_0_ym19_1_1499831043994_5588"><br></div></div></div></body></html>