001    /**
002     * 
003     */
004    package org.wdssii.core;
005    
006    import org.apache.commons.logging.Log;
007    import org.apache.commons.logging.LogFactory;
008    
009    import ucar.ma2.ArrayFloat;
010    import ucar.ma2.ArrayInt;
011    import ucar.ma2.ArrayShort;
012    
013    /**
014     * @author lakshman
015     *
016     */
017    public class NetcdfRegularGrid {
018            private ArrayFloat values;
019            private static Log log = LogFactory.getLog(NetcdfRegularGrid.class);
020            public NetcdfRegularGrid(float[][] inValues){
021                    int xdim = inValues.length;
022                    int ydim = inValues[0].length;
023                    values = new ArrayFloat(new int[]{xdim,ydim});
024                    ucar.ma2.Index index = values.getIndex();
025    
026                    for (int i=0; i < xdim; ++i){
027                            for (int j=0; j < ydim; ++j){
028                                    index.set(i,j);
029                                    values.set(index,inValues[i][j]);
030                            }
031                    }       
032            }
033    
034            public ArrayFloat getValues() {
035                    return values;
036            }
037    }