<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
Thanks for the help, but the error persists in the line 75</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
PrintVarSummary:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
<div>Variable: nlat</div>
<div>Type: integer</div>
<div>Total Size: 4 bytes</div>
<div>            1 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: [1]</div>
<div>Coordinates: </div>
<div><br>
</div>
<div>Variable: mlon</div>
<div>Type: integer</div>
<div>Total Size: 4 bytes</div>
<div>            1 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: [1]</div>
<div>Coordinates: </div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: ntimes</div>
<div>Type: integer</div>
<div>Total Size: 4 bytes</div>
<div>            1 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: [1]</div>
<div>Coordinates: </div>
<div>(0) 6024</div>
<br>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Dave Allured - NOAA Affiliate <dave.allured@noaa.gov><br>
<b>Enviado:</b> segunda-feira, 11 de janeiro de 2021 20:27<br>
<b>Para:</b> Vanúcia Schumacher <vanucia-schumacher@hotmail.com><br>
<b>Cc:</b> ncl-talk@ucar.edu <ncl-talk@ucar.edu><br>
<b>Assunto:</b> Re: [ncl-talk] Adding time coordinate</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Your script looks pretty good so far.  This does not look right:
<div>    new_data = new((/nlat,mlon,toint(time(1))/),"float")<br>
</div>
<div><br>
</div>
<div>Try this:</div>
<div>    ntimes = dimsizes (time)</div>
<div>    new_data = new((/nlat,mlon,ntimes/),"float")</div>
<div><br>
</div>
<div>Always use printVarSummary when you are having problems with arrays; and look at dimensions, coordinates, attributes, and such.</div>
<div><br>
</div>
<div>Also, in the future, please show the *first* error received, and be sure to show exactly which line it occurs on.  Usually the first error causes more problems later, and it is harder to sort out.  I am not sure what happened this time, but that does not
 matter now.  Good luck.</div>
<div><br>
</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Mon, Jan 11, 2021 at 2:51 PM Vanúcia Schumacher via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span style="font-size:11pt">Hi users,</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span style="font-size:11pt">I need to add the time information (</span><span style="font-size:11pt">preference in hh and mn)</span><span style="font-size:11pt"> extracted from an ascii file to a new variable (new_data from script), but I am not having success.</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span style="font-size:11pt">Attached is the script I am trying using the function cd_inv_calendar and the error obtained:</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span style="font-size:11pt">fatal:No coordinate variable exists for dimension (time) in variable (new_data)</span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span style="font-size:11pt">I appreciate some help to attach this information to my new variable</span></div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>