This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
I am having problems with the following code: .... private static ArrayInt.D4 smin; .... for (int east = 0; east < nnzmge; east++) // loop over nzmge { smin = new ArrayInt.D4(tend-tstart+1,1, nnzmgn, nens); for (int north = 0; north < nnzmgn; north++) // loop over nzmgn { int tcntr = 0; for (int t = tstart; t <= tend; t++) // loop over time { for (int ens = 0; ens < nens; ens++) // loop over ensambles { smn = ..... smin.set(tcntr,0,north,ens,(int)smn); } tcntr++; } } outFile.write("smin", new int[] {0,east,0,0}, smin); } //To disk outFile.flush(); I have no problem with this code if nens=1, but if nens > 1 then I get an IOException: Unable to write to output file: Negative seek offset I have tried different things, but nothing seems to work. The order of the loops is such as to minimize calculations. Any ideas would be most welcome. Cheers gaby -- *************************************************************** ** Gabriella Turek address@hidden ** ** National Institute of Water & Atmospheric Research (NIWA) ** ** PO Box 8602 Christchurch New Zealand +64-3-348-8987x3724 ** *************************************************************** =============================================================================== To unsubscribe netcdf-java, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ===============================================================================