public Array readData1 ( ucar . nc2 . Variable v2 , Section section ) throws IOException , InvalidRangeException { //doData(raf, ncfile, varList); int [ ] sh = section . getShape ( ) ; Array temp = Array . factory ( v2 . getDataType ( ) , sh ) ; long pos0 = 0 ; // Suppose that the data has LayoutRegular LayoutRegular index = new LayoutRegular ( pos0 , v2 . getElementSize ( ) , v2 . getShape ( ) , section ) ; if ( v2 . getShortName ( ) . startsWith ( "time" ) | v2 . getShortName ( ) . startsWith ( "numGates" ) ) { temp = readIntData ( index , v2 ) ; } else { temp = readFloatData ( index , v2 ) ; } return temp ; }
Read data from a top level Variable and return a memory resident Array .