<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
I'm trying to develop some code that will write new data to a file
once a day. The "time" dimension is unlimited.<br>
<br>
Here are some snippets of code that I thought should work<br>
<blockquote><tt>outfile = nio.open_file(ofile, "w")</tt><tt><br>
</tt><tt>fvar = outfile.create_variable('test', 'f',
('time','lat','lon'))</tt><tt><br>
</tt><tt><br>
</tt><tt>fvar[0,:,:] = np.ones( (nlat,nlon) , dtype=float )</tt></blockquote>
The last line throws this error:<br>
<blockquote><tt>NIOError: type or dimensional mismatch writing to
variable (test)</tt><br>
</blockquote>
if I use a constant value<br>
<blockquote><tt>fvar[0,:,:] = 1.</tt></blockquote>
or I don't specify the indices of "fvar":<br>
<blockquote><tt>fvar = np.ones( (nlat,nlon) , dtype=float )</tt></blockquote>
I don't have any problems. But I really need to specify the time
index. How do I write different numpy arrays to <tt>fvar[0,:,:]</tt>
and <tt>fvar[1,:,:]</tt>?<br>
<br>
<br>
thanks,<br>
Walter<br>
</body>
</html>