[ncl-talk] Problem using contributed function "time_axes_labels"
Tabish Ansari
tabishumaransari at gmail.com
Sun Aug 20 18:33:06 MDT 2023
Hi
I'm running an NCL script which utilizes the time_axes_labels function on
two different machines. Since it is a contributed function, it needs to be
loaded manually in the preamble. The script runs smoothly on one of the
machines but fails on the other.
I use these two lines in the beginning of my script:
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
and the code snippet where I use the function is here:
;--------------------------------------------------
; The time_axis_label function adds additional
; resources to "res" to produce nicely-formatted
; time labels on X axis. This function only works
; if you have a time "units" recognized by the
; cd_calendar function.
;--------------------------------------------------
restick = True
restick at ttmFormat = "%Y"
restick at ttmMajorStride= 12
restick at ttmMinorStride= 1
timearr = ispan (1,228,1)
timearr at units = "months since 2000-01-01 00:00:00"
time_axis_labels(timearr,res,restick) ; this is line no. 154
res at trXMaxF=max(timearr)
I get the following error on one of the machines:
fatal:["NclAtt.c":262]:Attribute assignment type mismatch.
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 214 in
file $NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 154 in
file noxtagging-stackedcontributions.ncl
Please let me know if you can spot something obviously wrong here. I'm
running NCL 6.6.2 on both machines.
Thanks.
kind regards,
Tabish
--------------------------------------------------------------------------------------
Dr Tabish Ansari
Research Associate
Air Quality Modelling Group
Research Institute for Sustainability (RIFS) - Helmholtz Centre Potsdam
Potsdam, Germany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230821/9593efcc/attachment.htm>
More information about the ncl-talk
mailing list