skewt errors

From: Kate Young <kbeierle_at_nyahnyahspammersnyahnyah>
Date: Wed, 21 Mar 2007 12:55:33 -0600

Hello,
I have a class format sounding file that has very few levels and only
contains pressure, temperature, winds, and lat and lon. I would like to
plot a skew-t diagram, primarily to see to the wind barbs. I'm
receiving fatal errors I don't understand, that include:

fatal subscript out of range, error in subscript #0
An error occurred reading P
Execute: Error occurred at or near line 636 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl
Error occurred at or near line 53 in file skewt_class.ncl

I've attached my program and the sounding file.

I'd appreciate any help, thanks!
Kate

-- 
Kate Young
Associate Scientist
National Center for Atmospheric Research
Earth Observing Laboratory

;**************************************************
; skewt_class.ncl
;**************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;**************************************************
 begin

; --- Read Data ----------------------------------------;
  diri = "/scr/sci2/kbeierle/shapiro/"
  fili = "1.sounding.cls"

;Read in table. First num is ncol, second num is number of rows to skip
  data = readAsciiTable(diri+fili, 21, "float", 15)

; order: Surface is 'bottom' eg: 1000,950,935,897,...
; columns start at ZERO!!!
                            
  p = data(:, 1)
 print(p)
  tc = data(:, 2)
 print(tc)
  tdc = data(:, 3)
  z = data(:, 14)
  wspd = data(:, 7)
  wdir = data(:, 8)

  p@_FillValue = 99999
  tc@_FillValue = 999
  tdc@_FillValue = 999
  z@_FillValue = 99999
  wspd@_FillValue = 999
  wdir@_FillValue = 999

;*************************
; create plot
;*************************
  wks = gsn_open_wks ("ps", fili)
  ;wks = gsn_open_wks ("ps", "skewt")

; --- Create background skew-T and plot sounding----------------

  skewtOpts = True
  skewtOpts_at_DrawColAreaFill = True ; default is False
  skewtOpts_at_tiMainString = fili

  dataOpts = False ; options describing data and ploting

  skewt_bkgd = skewT_BackGround (wks, skewtOpts)
  skewt_data = skewT_PlotData (wks, skewt_bkgd, p,tc,tdc,z \
                                    , wspd,wdir, dataOpts)
  draw (skewt_bkgd)
  draw (skewt_data)
  frame(wks)

  dataOpts = True ; options describing data and ploting
  dataOpts_at_Wthin = 3 ; plot every n-th wind barb

  skewtOpts_at_DrawFahrenheit = False ; default is True

  skewt_bkgd = skewT_BackGround (wks, skewtOpts)
  skewt_data = skewT_PlotData (wks, skewt_bkgd, p,tc,tdc,z \
                                    , wspd,wdir, dataOpts)
  draw (skewt_bkgd)
  draw (skewt_data)
  frame(wks)

 end

Data Type: GLASS PROCESSED DATA, FileFormat 1
Project ID: Mobile, NM1 IHOP - 2002, GLASS 2.31
Launch Site Type/Site ID: NCAR GLASS RS80-15GH VAISALA
Launch Location (lon,lat,alt): 100 49.86'W, 36 44.82'N, -100.83100 36.74700 808
GMT Launch Time (y,m,d,h,m,s): 2002, 06, 03, 20:10:45
Sonde Id: 213404105
/
/
/
System Operator/Comments: cody,G1,7 mi South of Turpin Term at 90 mb ro next launch
/
/
 Time Press Temp Dewpt RH Uwind Vwind Wspd Dir dZ Lon Lat Rng Az Alt Qp Qt Qh Qu Qv Quv
  sec mb C C % m/s m/s m/s deg m/s deg deg km deg m mb C % m/s m/s m/s
------ ------ ----- ----- ----- ------ ------ ----- ----- ----- -------- ------- ----- ----- ------- ---- ---- ---- ---- ---- ----
-1.0 970.0 2.34 999.00 999.00 -20.68 -3.65 21.00 259.99 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 0.0 965.0 999.0 999.00 999.00 -22.65 -3.99 23.00 260.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 1.0 958.0 999.0 999.00 999.00 -29.94 -8.02 31.00 255.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 2.0 948.0 999.0 999.00 999.00 -32.50 -5.73 33.00 260.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 3.0 927.0 999.0 999.00 999.00 -29.94 -8.02 31.00 255.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 4.0 925.0 0.37 999.00 999.00 -28.98 -7.76 30.00 255.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 5.0 921.0 999.0 999.00 999.00 -27.25 -9.92 29.00 250.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 6.0 905.0 999.0 999.00 999.00 -34.77 -9.32 36.00 255.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 7.0 896.0 999.0 999.00 999.00 -33.48 -5.90 34.00 260.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 8.0 850.0 -4.41 999.00 999.00 -40.00 0.00 40.00 270.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
 9.0 766.0 -3.31 999.00 999.00 -20.57 24.51 32.00 320.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
10.0 700.0 999.0 999.00 999.00 -16.63 23.76 29.00 325.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
11.0 672.0 999.0 999.00 999.00 -12.26 26.28 29.00 334.99 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
12.0 500.0 999.0 999.00 999.00 -12.16 45.40 47.00 345.01 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
13.0 474.0 999.0 999.00 999.00 -13.98 52.16 54.00 345.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
14.0 400.0 -35.69 999.00 999.00 -17.10 46.98 50.00 340.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
15.0 380.0 999.0 999.00 999.00 -13.20 49.26 51.00 345.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
16.0 362.0 999.0 999.00 999.00 -15.05 41.35 44.00 340.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00
17.0 359.0 999.0 999.00 999.00 -13.46 50.23 52.00 345.00 99.00 328.40 59.40 999.00 999.00 99999.00 99.00 99.00 99.00 99.00 99.00 99.00

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 21 2007 - 12:55:33 MDT

This archive was generated by hypermail 2.2.0 : Thu Mar 22 2007 - 09:26:28 MDT