[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help writing arrays as you go





Gabriella Turek wrote:
I keep getting a "Bad section rank" error.
What I am trying to do:
I have an array of dimension (t,x,y,z) where t is declared unlimited
My code:

loop over time
 instantiate an ArrayDouble of dimension (x,y,z)
 loop over x,y,x
  fill array
 end x,y,z loop
 set origin                   <---- here is the problem
 write array
end time loop

What is the origin supposed to be, and is even this possible at all?
Thanx
gaby


1. you should probably send the actual code, and the actual exception


2. you probably need to use a rank-4 array with the time dimension length 1.

Have a look at the tutorial:

http://www.unidata.ucar.edu/software/netcdf-java/tutorial/

in particular:

http://www.unidata.ucar.edu/software/netcdf-java/tutorial/NetcdfFile.html

"Reading data from a Variable"

===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================