Re: Error occurred at or near line 1417 in file $NCARG_ROOT

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 17 2014 - 11:42:21 MDT

Verena,

As Karin pointed out, without seeing your full script, we can't tell what line number the problem is on.

The error is likely coming from an attribute that is being set to one value, and then to another type later in the script.

For example, if you did this:

>> res2@cnMaxLevelValF = 5.

and then later did this:

>> res2@cnMaxLevelValF = 1

You would get an error because the first time, you are using a float, and the second time you are using an integer.

You can't mix types this way. You either have to use the "toint", "tofloat" type of functions, or else make sure the
types are the same:

>> res2@cnMaxLevelValF = 1.

--Mary

On Mar 16, 2014, at 8:06 AM, Karin Meier-Fleischer <meier-fleischer@dkrz.de> wrote:

> Hi Verena,
>
> the problem occurs near to line 135 of your test.ncl script. The other fatal errors are consecutive faults.
> Without having the script its not possible to say what is going wrong, so could you provide us the complete
> script?
>
> Bye,
> Karin
>
>
> Am 15.03.2014 um 23:17 schrieb Verena Lili <verena.prick@gmail.com>:
>
>> Dear NCL Folks,
>> I'm wondering, where are these errors coming from?
>>
>> fatal:Assignment type mismatch, right hand side can't be coerced to type of left hand side
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 1417 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 9624 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl
>>
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 10773 in file $NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>>
>> fatal:["Execute.c":8128]:Execute: Error occurred at or near line 135 in file test.ncl
>>
>> [SNIP]
>>
>> res1 = True
>> wks = gsn_open_wks(pdf,"test" )
>>
>> res1@gsnDraw = False
>> res1@gsnFrame = False
>>
>> ;; ...standardize the font sizes
>> res1@cnInfoLabelFontHeightF = fontHeightF
>> res1@gsnLeftStringFontHeightF = fontHeightF
>> res1@gsnRightStringFontHeightF = fontHeightF
>> res1@lbTitleFontHeightF = fontHeightF
>> res1@lbLabelFontHeightF = fontHeightF
>> res1@tiMainFontHeightF = fontHeightF * 1.3
>> res1@tiYAxisFontHeightF = fontHeightF
>> res1@tiXAxisFontHeightF = fontHeightF
>> res1@tmXBLabelFontHeightF = fontHeightF
>> res1@tmYLLabelFontHeightF = fontHeightF
>>
>> ;; ...shading resources
>> res1@cnFillOn = True
>> res1@cnFillMode = "CellFill"
>> res1@cnRasterSmoothingOn = True
>> res1@cnMonoFillColor = False
>> res1@cnInfoLabelOn = False
>> res1@cnLineLabelsOn = False
>> res1@cnLinesOn = False
>> res1@cnLineColor = "gray"
>> res1@cnMissingValFillPattern = "SolidFill"
>> res1@cnMissingValFillColor = "gray"
>>
>> ;; ...set the contour levels
>> if( shdLevels(0).eq.-999 ) then
>> res1@cnMaxLevelCount = 16
>> else
>> res1@cnLevelSelectionMode = "ExplicitLevels"
>> res1@cnLevels = shdLevels
>> end if
>>
>> ;; ...labelbar resources
>> res1@lbLabelBarOn = True
>> res1@lbOrientation = "Horizontal"
>> res1@lbTitlePosition = "Right"
>> res1@lbTitleDirection = "Across"
>> res1@lbTitleString = shdData@units
>> res1@pmLabelBarOrthogonalPosF = fontHeightF * 25
>>
>>
>> ;; ...set the bounds of a map plot
>> res1@mpMinLatF = minLat
>> res1@mpMaxLatF = maxLat
>> res1@mpMinLonF = minLon
>> res1@mpMaxLonF = maxLon
>> res1@mpCenterLonF = centerLon
>>
>> ;; ...set map resources
>> res1@mpFillOn = False
>> res1@mpGeophysicalLineThicknessF = 1
>> res1@mpGeophysicalLineColor = "darkgreen"
>> res1@mpNationalLineColor = "darkgreen"
>> res1@mpUSStateLineColor = "darkgreen"
>> res1@mpOutlineBoundarySets = "AllBoundaries"
>>
>>
>> res2 = True
>> res2@cnLevelSelectionMode = "ManualLevels"
>> res2@cnMinLevelValF = -5.
>> res2@cnMaxLevelValF = 5.
>> res2@cnLevelSpacingF = 1.
>> res2@cnLineLabelsOn = True
>> res2@gsnContourZeroLineThicknessF = 2.
>> res2@gsnContourNegLineDashPattern = 1.
>>
>>
>> plot = gsn_csm_contour_map_overlay(wks,data(0,:,:),contour(0,:,:),res1,res2)
>> draw(plot)
>> frame(wks)
>>
>>
>> Thank you
>>
>> --
>> Regards,
>> Dr. Verena.
>> School of Marine and Atmospheric Sciences
>> Stony Brook University
>> homepage: http://www.somas.stonybrook.edu/
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _________________________________
> Karin Meier-Fleischer
> Deutsches Klimarechenzentrum GmbH
>
> Application Support
>
> Visualization
>
> Bundesstrasse 45a
> D-20146 Hamburg, Germany
>
> E-Mail:
> meier-fleischer@dkrz.de
>
> Internet:
> http://www.dkrz.de/
>
> Phone: +49 40 460094 126
> Fax: +49 40 460094 270
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 17 11:42:31 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 21 2014 - 15:49:21 MDT