<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Anne,<br>
<br>
you have to create the named dimension for time_counter and commit
the time_counter data:<br>
<br>
<font color="#3333ff"><tt> time_counter =
tofloat(time)</tt><tt><br>
</tt><tt> time_counter!0 = "time_counter"</tt><tt><br>
</tt><tt> time_counter&time_counter = time_counter</tt></font><br>
<br>
Bye,<br>
Karin<br>
<br>
<div class="moz-cite-prefix">Am 31.08.17 um 12:13 schrieb Anne:<br>
</div>
<blockquote type="cite"
cite="mid:CAJLcRF+Go4sXF5sJT4tgTw=WsLW7j160C-LzdjDNyGGZs7uOvA@mail.gmail.com">
<div dir="ltr">Hello,
<div><br>
</div>
<div>in the attached script I am reading in a variable from a
file, and want to use it to define another variable with the
same dimensions, except for one that needs to have a different
size (time_counter; length 180 instead of 12). The output of
'ncdump' (see below) after reading to netcdf is nearly what I
want, except of the 'ncl3' line in dimensions, that is not
recognised as 'time_counter' as I wanted it to. In other
words, it would be perfect without the 'ncl3 = 180' line. I've
played around with this script in various ways but I just
don't arrive there. Maybe I'm overlooking something?</div>
<div><br>
</div>
<div>Any help appreciated!</div>
<div>Anne </div>
<div><br>
</div>
<div>
<div>ncdump -h <a href="http://masc_exag.nc"
moz-do-not-send="true">masc_exag.nc</a>:</div>
<div><br>
</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter
= UNLIMITED ; // (180 currently)</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>y
= 1021 ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>x
= 1442 ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>ncl3
= 180 ;</div>
<div>variables:</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>float
masc(time_counter, y, x) ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>masc:valid_max
= "33.78767f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>masc:valid_min
= "-2.139231f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>masc:long_name
= "votemper" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>masc:units
= "C" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>masc:_FillValue
= 9.96921e+36f ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>float
nav_lat(y, x) ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lat:units
= "degrees_north" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lat:valid_min
= "-77.01048f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lat:valid_max
= "89.94787f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lat:long_name
= "Latitude at t-point" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>float
nav_lon(y, x) ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lon:units
= "degrees_east" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lon:valid_min
= "-180.f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lon:valid_max
= "180.f" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>nav_lon:long_name
= "Longitude at t-point" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>float
time_counter(ncl3) ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:modulo
= " " ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:time_origin
= "01-JAN-2002:00:00:00" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:long_name
= "Time axis" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:title
= "Time" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:calendar
= "noleap" ;</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>time_counter:units
= "seconds since 2002-01-01 00:00" ;</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
</body>
</html>