[ncl-talk] Error with "time_axis_labels(cd_date, resT1, restick)"

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Jul 9 10:18:20 MDT 2019


That is not the correct load command for this function.  Time_axis_labels
is loaded separately.  Please go to the documentation page for
time_axis_labels, find the correct load command at the top of that page,
and add it to your script.


On Tue, Jul 9, 2019 at 12:27 AM Zilore Mumba <zmumba at gmail.com> wrote:

> Thanks Dave for the hint. i did load the contributed package. I still get
> the same error. The package I loaded is
> "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
> When I check this script I do not see anywhere where there is a function
> like "time_axis_labels".
> I will continue to probe and see where am going wrong
> Incidentally, example6 on
> https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml,
> gives
>
> *time_axis_labels*( data&time,  res, restick )
>
> I assumed there was a mistake  on data&time and corrected it to
> *time_axis_labels*( date&time,  res, restick )
>
> Thanks
>
> Zilore
>
>
> On Mon, Jul 8, 2019 at 10:00 PM Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> wrote:
>
>> This is one of the contributed functions that is not loaded
>> automatically.  You are missing a "load" command.  NCL gave you a clue:
>>  "possibly an undefined procedure".  Please look at the top of the function
>> documentation page.
>>
>>
>> On Mon, Jul 8, 2019 at 9:14 AM Zilore Mumba via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> I am trying to plot a time series. I have converted the dates in the
>>> file to the format YYYYMMDD with the function
>>>    t = f->time                            ; to get time in file
>>>    cd_date = cd_calendar(t, -2)   ; print(cd_date) prints correctly, eg
>>> 19960101,...
>>> Then to prepare the format for the x-axis label, I have:
>>>
>>>  resT1  = true
>>>
>>>  some resources
>>>  ..............
>>>
>>>  restick = True
>>>  restick at ttmFormat = "%d %c"
>>>  restick at ttmAxis = "YL"
>>>  restick at ttmMajorStride = 20
>>>  *time_axis_labels*( data&time,  res, restick )
>>>
>>> I am getting the error:
>>> fatal:syntax error: line 57 in file two-line-plot.ncl before or near \n
>>>    time_axis_labels( data&time,  resT1, restick )
>>> -------------------------------------------------^
>>>
>>> fatal:syntax error: possibly an undefined procedure
>>> fatal:syntax error: line 72 in file two-line-plot.ncl before or near \n
>>>    time_axis_labels(cd_date,resT1,restick)
>>> ------------------------------------------^
>>>
>>> fatal:syntax error: possibly an undefined procedure
>>> fatal:Syntax Error in block, block not executed
>>> fatal:error at line 76 in file two-line-plot.ncl
>>>
>>> Is the
>>>
>>> *time_axis_labels function still valid, or is there an alternative function?*
>>>
>>>
>>> *Help will be appreciated.*
>>>
>>> *Zilore*
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190709/c8dde091/attachment.html>


More information about the ncl-talk mailing list