Re: ncl fatal:ContourPlotDraw: CTTMTL/ICAEDG - LOGIC ERROR

From: Ekin Akoglu <ekin_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 08 2010 - 10:53:40 MDT

Dear Dennis,

I know it is a huge data to plot. I have already looked at the data
before posting and I am aware this way it cannot be plotted. I plotted
it in MATLAB with a custom grid without problem. However, I could not
figure it out how to do a similar thing (custom grid via interpolating
the data) through the documentation on NCL web site. But I suggest that
NCL may try to be a little bit more "logical" while giving errors so
that people can understand. If it has been so, I wouldn't have posted
this as a problem.

Thank you again for your help.

Regards,

Ekin

On 06/08/2010 05:59 PM, Dennis Shea wrote:
> The most important thing in data processing is to look at your data.
>
> %> ncdump -v x_range,y_range,spacing,dimension marmara.nc
>
> xysize = 108781
> [SNIP]
> x_range = 26, 36 ;
>
> y_range = 40, 43 ;
>
> spacing = 0.0166666666666667, 0.0166666666666667 ;
>
> dimension = 601, 181 ;
>
> ===
> the way you did things you were trying to plot a
> 108781*108781 array.
>
> The array is (601,181) or (181,601) not sure.
>
> The attached script works. You may have to change things.
> Again, please look at your data files.
>
> Good luck
> D
>
>
>
>
>>> On 06/07/2010 05:37 AM, Ekin Akoglu wrote:
>>>> Sorry for cross-posting but I think the full error message will be
>>>> more
>>>> meaningful. Here the error I get:
>>>>
>>>> fatal:ContourPlotDraw: CTTMTL/ICAEDG - LOGIC ERROR
>>>> ERROR 5 IN CTTMTL/ICAEDG - LOGIC ERROR
>>>> fatal:ContourPlotDraw: CTMESH - UNCLEARED PRIOR ERROR
>>>> fatal:ContourPlotDraw: draw error
>>>> warning:WorkstationDeactivate: workstation not active or not opened
>>>>
>>>> And the code is:
>>>>
>>>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>>>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>>>>
>>>>> begin
>>>>>
>>>>> inf = addfile("marmara.nc","r")
>>>>>
>>>>> scale_factor = inf->z@scale_factor
>>>>> add_offset = inf->z@add_offset
>>>>> topo = scale_factor * (inf->z) + add_offset
>>>>>
>>>>> lons = inf->x_range
>>>>> lats = inf->y_range
>>>>> latarray = fspan(lats(0),lats(1),108781)
>>>>> lonarray = fspan(lons(0),lons(1),108781)
>>>>>
>>>>> wks = gsn_open_wks("x11","Black_Sea")
>>>>> gsn_define_colormap (wks,"gui_default")
>>>>>
>>>>> res = True
>>>>> res@cnFillOn = True ; turn on color
>>>>> res@cnLinesOn = False ; no contour lines
>>>>> res@gsnSpreadColors = True ; use full color map
>>>>> res@lbLabelAutoStride = True ; every other label
>>>>> res@cnRasterModeOn = True
>>>>> res@gsnAddCyclic = False ; regional data
>>>>>
>>>>> res@cnLevelSelectionMode = "AutomaticLevels" ; automatic levels
>>>>> ;res@cnMinLevelValF = 100.
>>>>> ;res@cnMaxLevelValF = 3500.
>>>>> ;res@cnLevelSpacingF = 100.
>>>>>
>>>>>
>>>>> res@tiMainString = "Black Sea"
>>>>> res@sfXArray = lonarray ; uses longitude as plot x-axis
>>>>> res@sfYArray = latarray ; uses latitude as plot y-axis
>>>>>
>>>>> res@tfDoNDCOverlay = True ; do not transform data
>>>>> res@pmTickMarkDisplayMode = "Always" ; get a box around the plot
>>>>>
>>>>> plot = gsn_csm_contour(wks,topo,res)
>>>>>
>>>>> end
>>>>
>>>>
>>>> Regards,
>>>> --
>>>> *Ekin Akoglu*
>>>>
>>>> Institute of Marine Sciences
>>>> Middle East Technical University
>>>> P.O. Box 28, 33731
>>>> Erdemli, Mersin
>>>> Turkey
>>>>
>>>> Web: www.ims.metu.edu.tr
>>>> Email: ekin@ims.metu.edu.tr <mailto:ekin@ims.metu.edu.tr>
>>>> Phone: +90 324 521 34 34
>>>> GSM: +90 506 554 03 90
>>>>
>>>> --
>>>> *Ekin Akoglu*
>>>>
>>>> Institute of Marine Sciences
>>>> Middle East Technical University
>>>> P.O. Box 28, 33731
>>>> Erdemli, Mersin
>>>> Turkey
>>>>
>>>> Web: www.ims.metu.edu.tr
>>>> Email: ekin@ims.metu.edu.tr <mailto:ekin@ims.metu.edu.tr>
>>>> Phone: +90 324 521 34 34
>>>> GSM: +90 506 554 03 90
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> --
>> *Ekin Akoglu*
>>
>> Institute of Marine Sciences
>> Middle East Technical University
>> P.O. Box 28, 33731
>> Erdemli, Mersin
>> Turkey
>>
>> Web: www.ims.metu.edu.tr
>> Email: ekin@ims.metu.edu.tr <mailto:ekin@ims.metu.edu.tr>
>> Phone: +90 324 521 34 34
>> GSM: +90 506 554 03 90

-- 
*Ekin Akoglu*
Institute of Marine Sciences
Middle East Technical University
P.O. Box 28, 33731
Erdemli, Mersin
Turkey
Web: www.ims.metu.edu.tr
Email: ekin@ims.metu.edu.tr <mailto:ekin@ims.metu.edu.tr>
Phone: +90 324 521 34 34
GSM: +90 506 554 03 90

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jun 8 10:53:52 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 11 2010 - 09:33:24 MDT