<div dir="ltr"><div><div><div>Hi <span style="color:rgb(0,0,0)"><span class="gmail-HOEnZb">Paolina,<br><br></span></span></div><span style="color:rgb(0,0,0)"><span class="gmail-HOEnZb">As far as I can tell that is a bug in one of the supporting scripts that has since been fixed. The version you appear to be using, 6.2.0, is a number of years old by now. If at all possible, I would recommend you upgrade to the latest 6.4.0. If that's not possible, I could likely send you the "contributed.ncl" script -- however that may be fraught with incompatibility issues too.<br><br></span></span></div><span style="color:rgb(0,0,0)"><span class="gmail-HOEnZb">Hope that helps...<br></span></span></div><span style="color:rgb(0,0,0)"><span class="gmail-HOEnZb">Rick<br><br></span></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 11, 2017 at 12:06 PM, Paolina Bongioannini Cerlini <span dir="ltr"><<a href="mailto:paolina.cerlini@unipg.it" target="_blank">paolina.cerlini@unipg.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi NCL people,<br>
I read some data and since I have days and hours I build a<br>
time as YYYYMMDDHH then I convert it in yrfrac:<br>
<br>
; ******************************<wbr>*****************<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl"<br>
;*****************************<wbr>*******************<br>
begin<br>
;*****************************<wbr>*******************<br>
; read in data<br>
;*****************************<wbr>*******************<br>
;<br>
diri = "./"<br>
fili = systemfunc("cd "+diri+" ; ls rce-bret-2005-rad.*.nc")<br>
nfili= dimsizes(fili)<br>
print("nfili="+nfili)<br>
;<br>
f = addfiles(diri+fili,"r")<br>
ListSetType (f, "join")<br>
;<br>
; vNam = getfilevarnames (f) ; all variables on file<br>
; print(vNam)<br>
;<br>
vNam1 = (/"x","y","z","p","raing","<wbr>prcate1","tke","radfrc","<wbr>radflx","ptsflx","qvsflx"/) ; manually specify<br>
print(vNam1)<br>
;<br>
;<br>
x = f[0]->x<br>
y = f[0]->y<br>
z = f[0]->z<br>
p = f[:]->p<br>
PREC= f[:]->raing<br>
RADQR= f[:]->rnflx<br>
LHF = f[:]->ptsflx<br>
SHF = f[:]->qvsflx<br>
;<br>
printVarSummary(x)<br>
printVarSummary(y)<br>
printVarSummary(z) ; [74]<br>
printVarSummary(p)<br>
;<br>
; create time<br>
TIME3D = yyyymmddhh_time(2017, 2017, 1, "integer")<br>
printVarSummary(TIME3D)<br>
; time3D = TIME3D({2017040100:2017051000}<wbr>) ; coordinate subscripting<br>
time3D = TIME3D({2017040100:2017040203}<wbr>)<br>
time3D!0="time"<br>
time3D&time=time3D<br>
printVarSummary(time3D)<br>
;<br>
;<br>
; print(time3D)<br>
;<br>
yrfrac = yyyymmddhh_to_yyyyfrac(time3D, 0)<br>
print(yrfrac)<br>
;<br>
but it gives the following<br>
error:<br>
<br>
[paolina@cloud outputcheck]$ ncl energy_ARPS-PROVA_0.ncl><wbr>output.txt<br>
[paolina@cloud outputcheck]$ more output.txt<br>
Copyright (C) 1995-2014 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.2.0<br>
The use of this software is governed by a License Agreement.<br>
See <a href="http://www.ncl.ucar.edu/" rel="noreferrer" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
(0) nfili=28<br>
<br>
<br>
Variable: vNam1<br>
Type: string<br>
Total Size: 88 bytes<br>
11 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [11]<br>
Coordinates:<br>
(0) x<br>
(1) y<br>
(2) z<br>
(3) p<br>
(4) raing<br>
(5) prcate1<br>
(6) tke<br>
(7) radfrc<br>
(8) radflx<br>
(9) ptsflx<br>
(10) qvsflx<br>
<br>
Variable: x<br>
Type: float<br>
Total Size: 780 bytes<br>
195 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [fakeDim0 | 195]<br>
Coordinates:<br>
Number Of Attributes: 3<br>
hdf_name : x<br>
units : m<br>
comment : x coordinate<br>
<br>
Variable: y<br>
Type: float<br>
Total Size: 780 bytes<br>
195 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [fakeDim1 | 195]<br>
Coordinates:<br>
Number Of Attributes: 3<br>
hdf_name : y<br>
units : m<br>
comment : y coordinate<br>
<br>
Variable: z<br>
Type: float<br>
Total Size: 296 bytes<br>
74 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [fakeDim2 | 74]<br>
Coordinates:<br>
Number Of Attributes: 3<br>
hdf_name : z<br>
units : m<br>
comment : z coordinate<br>
<br>
Variable: p<br>
Type: float<br>
Total Size: 315151200 bytes<br>
78787800 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: [ncl_join | 28] x [fakeDim39 | 74] x [fakeDim40 | 195] x [fakeDim41 | 195]<br>
Coordinates:<br>
Number Of Attributes: 6<br>
hdf_name : p<br>
stag_dim : 0<br>
units : Pascal<br>
comment : Pressure<br>
hdf_comp_prm : 6<br>
hdf_comp_code : 4<br>
<br>
Variable: TIME3D<br>
Type: integer<br>
Total Size: 35040 bytes<br>
8760 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [time | 8760]<br>
Coordinates:<br>
time: [2017010100..2017123123]<br>
Number Of Attributes: 2<br>
long_name : time<br>
units : YYYYMMDDHH<br>
<br>
Variable: time3D<br>
Type: integer<br>
Total Size: 112 bytes<br>
28 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [time | 28]<br>
Coordinates:<br>
time: [2017040100..2017040203]<br>
Number Of Attributes: 2<br>
units : YYYYMMDDHH<br>
long_name : time<br>
<br>
<br>
Variable: time3D<br>
Type: integer<br>
Total Size: 112 bytes<br>
28 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [time | 28]<br>
Coordinates:<br>
time: [2017040100..2017040203]<br>
Number Of Attributes: 2<br>
units : YYYYMMDDHH<br>
long_name : time<br>
(0) 2017040100<br>
(1) 2017040101<br>
(2) 2017040102<br>
(3) 2017040103<br>
(4) 2017040104<br>
(5) 2017040105<br>
(6) 2017040106<br>
(7) 2017040107<br>
(8) 2017040108<br>
(9) 2017040109<br>
(10) 2017040110<br>
(11) 2017040111<br>
(12) 2017040112<br>
(13) 2017040113<br>
(14) 2017040114<br>
(15) 2017040115<br>
(16) 2017040116<br>
(17) 2017040117<br>
(18) 2017040118<br>
(19) 2017040119<br>
(20) 2017040120<br>
(21) 2017040121<br>
(22) 2017040122<br>
(23) 2017040123<br>
(24) 2017040200<br>
(25) 2017040201<br>
(26) 2017040202<br>
(27) 2017040203<br>
fatal:Variable (nDay) is undefined<br>
fatal:["Execute.c":8567]:<wbr>Execute: Error occurred at or near line 7879 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.ncl<br>
<br>
fatal:["Execute.c":8567]:<wbr>Execute: Error occurred at or near line 7937 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.ncl<br>
<br>
fatal:["Execute.c":8567]:<wbr>Execute: Error occurred at or near line 63 in file energy_ARPS-PROVA_0.ncl<br>
------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>-------------------<br>
In attachment the files.<br>
Thank you for your help.<br>
<span class="HOEnZb"><font color="#888888"><br>
Paolina<br>
<br>
<br>
<br>
--<br>
Paolina Bongioannini Cerlini Ph.D.<br>
University of Perugia<br>
CIRIAF -room 8<br>
06125 - Perugia<br>
<br>
Tel.<a href="tel:%2B39%20075%205853576" value="+390755853576">+39 075 5853576</a><br>
e-mail: <a href="mailto:paolina.cerlini@unipg.it">paolina.cerlini@unipg.it</a><br>
skype: pcerlini<br>
--<br>
</font></span><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>