[ncl-talk] Error

Najib Yusuf najibgal at yahoo.com
Tue Oct 6 05:52:40 MDT 2015


Dear NCL Forum,
Kindly assist me with the solutions to these errors. I tried to figure it but I couldn't instead i was getting different errors. Below is the scripts please.


ncl 0> dir = "/home/model-user/CESM/"
ncl 1> filen = "cesmdata/inputdata/atm/cam/ozone/waccm_ozone_c121126.nc"
ncl 2> f1 = addfile("cesmdata/inputdata/atm/cam/ozone/waccm_ozone_c121126.nc","r")
ncl 3> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" 
ncl 4> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
ncl 5> begin
ncl 6> vNames = getfilevarnames (f1)
ncl 7> nNames = dimsizes (vNames)
ncl 8> print (vNames)
ncl 9> O3 = f1->O3
ncl 10> O33d = O3(0,:,:,:,)
fatal:syntax error: line 10 before or near ) 
O33d = O3(0,:,:,:,)
------------------^

fatal:Error in subscript, normal subscripting is being used, make sure named subscripting has not been used
ncl 11> wks = gsn_open_wks("ps","proj")
ncl 12> gsn_define_colormap(wks,"gui_default")
ncl 13> res = True
ncl 14> res at mpProjection = "Mollweide"
ncl 15> res at mpGridAndLimb0n = True
ncl 16> res at mpPerimon = False      
ncl 17> res at mpGridLatSpacingF = 30
ncl 18> res at mpGridLonSpacingF = 30 
ncl 19> res at mpFillOn = False
ncl 20> res at cnFillOn = True 
ncl 21> res at cnLineLabelsOn = False
ncl 22> res at txFontHeightF = 0.015
ncl 23> res at vpXF =0.1
ncl 24> res at vpXF = 0.1
ncl 25> res at vpYF = 0.1 
ncl 26> res at vpYF = 0.8
ncl 27> res at vpWidthF = 0.8
ncl 28> res at vpHeightF = 0.8    
ncl 29> res at gsnSpreadColors = True
ncl 30> res at gsnSpreadColorStart = 2
ncl 31> res at gsnSpreadColorEnd = -3 
ncl 32> res at lbLabelFontHeightF = 0.015
ncl 33> res at tiMainString = "Figure 5"
ncl 34> res at tiMainFontHeightF = .018
ncl 35> contour = gsn_csm_contour_map(wks,O33d(0,:,:,:,),res)
fatal:syntax error: line 35 before or near ) 
contour = gsn_csm_contour_map(wks,O33d(0,:,:,:,)
-----------------------------------------------^

fatal:Error in subscript, normal subscripting is being used, make sure named subscripting has not been used
fatal:syntax error: function gsn_csm_contour_map expects 3 arguments, got 1
fatal:error at line 35

ncl 36> end


Variable: vNames
Type: string
Total Size: 88 bytes
            11 values
Number of Dimensions: 1
Dimensions and sizes:    [11]
Coordinates: 
(0)    O3
(1)    P0
(2)    PS
(3)    date
(4)    datesec
(5)    hyam
(6)    hybm
(7)    lat
(8)    lev
(9)    lon
(10)    time
ncl 37> 
Thank you.
Najib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151006/c60fffda/attachment.html 


More information about the ncl-talk mailing list