Re: time_lon plot problem.

From: Kyle Griffin <kgriffin_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 13 2012 - 12:22:39 MDT

Hi Antonio,

Looks like you changed more than you needed to. From your original script,
the line

tTick( origData&time, res, resTick )

can simply be changed to

time_axis_labels( origData&time, res, resTick )

The 'res' resource that is being passed to the time_axis_labels needs to be
the one associated with the plot you're making. In your next script, you
create a brand new resource and give that to the procedure. If you plotted
gsn_csm_contour with 'resPlot', you would get the axis right, but without
the additional resources you set in 'res'.

Key thing to remember here is that this procedure simply sets the tickmark
resource in an already established variable. Edit the original script with
just the one line changed and I think you should be good. If not, reply
(and make sure to include ncl-talk) and let us know how it works.

Kyle
-----------------------------------------------------
Kyle S. Griffin
Dept. of Atmospheric and Environmental Sciences
University at Albany, SUNY
1400 Washington Ave, Albany, NY 12222
Office: ES-218 Email: kgriffin@albany.edu
http://www.atmos.albany.edu/student/kgriffin/

On Fri, Jul 13, 2012 at 2:16 PM, antonio avio <antonioavio@googlemail.com>wrote:

> Hi Kyle,
>
> I have modified the script in line 105-113
>
> ; use tTick to set the time axis
> resplot = True
> restick = True
> restick@ttFormat = "%d %c"
> restick@ttAxis = "YL"
> restick@ttMajorStride = 40
> time_axis_labels( origData&time, resplot, restick )
>
> plot = gsn_csm_hov( wks, origData({startDate:endDate},{120:320}), res )
>
>
> and its running well, but the time axis is still wrong,
> Any suggestion,
> thanks for your help.
> here i attached the plot.
>
> Thanks alot,
> Antonio
>
>
>
>
> On Fri, Jul 13, 2012 at 7:39 PM, Kyle Griffin <kgriffin@albany.edu> wrote:
>
>> Hi Antonio,
>>
>> You'll notice that in the contributed scripts you load at the top of
>> the file, you load a "time_axis_labels" function, which replaces the
>> utility that tTick once provided. While some older versions of code still
>> include tTick, it is no longer included in releases of NCL, thus leading to
>> your problem.
>>
>> If you change tTick to time_axis_labels, the script should work fine.
>> See:
>>
>>
>> http://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml
>>
>> and you'll notice the documentation to be similar to that of tTick,
>> with the exact same required inputs to the procedure.
>>
>> If it doesn't, we still have an old copy of the tTick.ncl procedure
>> floating around here at Albany that can be sent along for your purpose.
>>
>>
>> Kyle
>> -----------------------------------------------------
>> Kyle S. Griffin
>> Dept. of Atmospheric and Environmental Sciences
>> University at Albany, SUNY
>> 1400 Washington Ave, Albany, NY 12222
>> Office: ES-218 Email: kgriffin@albany.edu
>> http://www.atmos.albany.edu/student/kgriffin/
>>
>>
>>
>> On Fri, Jul 13, 2012 at 1:31 PM, antonio avio <
>> antonioavio@googlemail.com> wrote:
>>
>>> Hi NCL,
>>>
>>> I've been trying to make some experiments with the script provided by Carl
>>> Schreck
>>> as provided in
>>> http://www.ncl.ucar.edu/Applications/Scripts/wkSpaceTime_5.ncl
>>> I used the same data and the same script firstly in order to understand
>>> to the way of this
>>> code works. The script has successfully compiled. But the problem is i
>>> always get the error
>>> message that:
>>>
>>> fatal:syntax error: line 109 before or near \n
>>> tTick( origData&time, res, resTick )
>>> ---------------------------------------^
>>>
>>> fatal:syntax error: possibly an undefined procedure
>>> fatal:Syntax Error in block, block not executed
>>> fatal:error at line 129
>>>
>>> But, i f compiled this script by command ncl -X scritp.ncl
>>> everything was fine but the time plot is wrong.
>>> anybody has an idea?
>>>
>>> the script and the plot results i attached here.
>>>
>>> Thanks,
>>> Antonio
>>>
>>>
>>>
>>> _______________________________________________
>>> 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 Fri Jul 13 12:23:09 2012

This archive was generated by hypermail 2.1.8 : Wed Jul 18 2012 - 14:33:00 MDT