[ncl-talk] Error with skewT_PlotData

James Russell jorussel at ncsu.edu
Tue Oct 30 17:36:08 MDT 2018


I didn’t think to check the wind directions since the errors didn’t mention
it. But Thanks for working on that and noting the bug!

James

On Tue, Oct 30, 2018 at 5:37 PM Dennis Shea <shea at ucar.edu> wrote:

> Hi James,
>
> Thx for sending the data.
>
> The issue is that while *all* the *wind speeds are valid*; *all* the *wind
> directions are missing* (_FilValue).
> The easiest solution is to set:
>
>         dataOpts at PlotWindP = False                    ; default is True
>
> ===
> BUG: The 'skewt_func.ncl' does all the tests on wind speed. It should be
> fixed. I will add a trouble report.
>
> Cheers
> D
>
> On Mon, Oct 29, 2018 at 10:25 AM James Russell <jorussel at ncsu.edu> wrote:
>
>> Hi,
>>
>> I'm currently trying to plot skewT diagrams with the standard
>> skewT_PlotData function. However, I'm getting an error about subscripting
>> at the skewT_PlotData line in my code. This is shown in the print out
>> below. I've seen this error a thousand times and it's usually a very simple
>> correction in my own code. However, this time I'm subscripting nothing and
>> feeding skewT_PlotData arrays that are all just one dimension, with 39
>> points.
>>
>> An exert from my code is below (the rest is just reading in the data) and
>> also a print out from the code. Any help would be appreciated?
>>
>> Thanks,
>> James
>> ------------------------------------------------------
>> ;*************************
>> ; Resources
>> ;*************************
>>
>> skewtOpts                 = True
>> skewtOpts at DrawColAreaFill = True
>> skewtOpts at tiMainString    = ""
>> skewtOpts at vpWidthF        = 0.38
>> skewtOpts at vpHeightF       = 0.38
>> skewtOpts at DrawFahrenheit  = False
>> skewtOpts at tiXAxisString  = "Temperature (C)"
>> skewtOpts at tmXBLabelFontHeightF = 0.0225
>> skewtOpts at tmYLLabelFontHeightF = 0.0225
>> skewtOpts at tiMainFontHeightF    = 0.0225
>> skewtOpts at tiMainOffsetXF  = 0.0
>>
>> dataOpts = True
>> dataOpts at DrawWindBarbThk = 2.0
>>
>> ;*************************
>> ; Plot
>> ;*************************
>>
>> print(PR07n)
>>
>> print("Plotting data")
>>
>> wks  = gsn_open_wks ("png", "skewt_norsou")
>>
>> skewtOpts at vpXF            = 0.08
>> skewtOpts at vpYF            = 0.95
>> skewt_bkgd_1 = skewT_BackGround(wks,skewtOpts)
>> skewt_data_1 =
>> skewT_PlotData(wks,skewt_bkgd_1,PR07n,TC07n,TD07n,Zm07n,Ws07n,Wd07n,dataOpts)
>> draw(skewt_bkgd_1)
>> draw(skewt_data_1)
>>
>> -------------------------------------------------
>>
>> Print out:
>>
>> data/figs> ncl plot_skewT_ns.ncl
>>  Copyright (C) 1995-2017 - All Rights Reserved
>>  University Corporation for Atmospheric Research
>>  NCAR Command Language Version 6.4.0
>>  The use of this software is governed by a License Agreement.
>>  See http://www.ncl.ucar.edu/ for more details.
>> (0) Reading data
>>
>>
>> Variable: PR07n
>> Type: float
>> Total Size: 156 bytes
>>             39 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [lev | 39]
>> Coordinates:
>>             lev: [0.9965..0.002989615]
>> Number Of Attributes: 4
>>   _FillValue : 9.96921e+36
>>   units : Pa
>>   long_name : PR
>>   average_op_ncl : dim_avg_n over dimension(s): time
>> (0) 965.5065
>> (1) 957.6194
>> (2) 946.9515
>> (3) 933.5039
>> (4) 916.8141
>> (5) 895.9583
>> (6) 870.9427
>> (7) 842.1523
>> (8) 811.4512
>> (9) 780.7855
>> (10) 750.1562
>> (11) 707.0631
>> (12) 653.2709
>> (13) 602.9095
>> (14) 555.7852
>> (15) 511.7217
>> (16) 470.5537
>> (17) 432.1226
>> (18) 396.2743
>> (19) 362.8608
>> (20) 331.7417
>> (21) 302.7841
>> (22) 275.8629
>> (23) 250.8601
>> (24) 227.664
>> (25) 206.1693
>> (26) 186.2755
>> (27) 167.8874
>> (28) 151.0405
>> (29) 135.8232
>> (30) 122.1585
>> (31) 109.8879
>> (32) 98.86901
>> (33) 88.97418
>> (34) 80.08877
>> (35) 72.10982
>> (36) 64.94485
>> (37) 58.51083
>> (38) 52.73309
>> (0) Plotting data
>> fatal:Subscript out of range, error in subscript #0
>> fatal:An error occurred reading P
>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 950 in
>> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl
>>
>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 2199 in
>> file $NCARG_ROOT/lib/ncarg/nclscripts/csm/skewt_func.ncl
>>
>> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 79 in
>> file plot_skewT_ns.ncl
>>
>>
>>
>> -----------------------------------------------------------------------------
>> Graduate Research & Teaching Assistant
>> PhD Candidate: Atmospheric Science
>> Department of Marine, Earth, and Atmospheric Sciences
>> North Carolina State University
>> http://go.ncsu.edu/james-russell
>> --------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
> --
This message was sent from my mobile device. Sorry for the brevity!

go.ncsu.edu/james-russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181030/fee716b2/attachment.html>


More information about the ncl-talk mailing list