cdm/src/main/java/ucar/nc2/iosp/grads/GradsDimension.java
protected double[] makeLevelValues() {
        if (levels == null) {
            return null;
        }
        if (levels.size() != size) {
            // do someting
        }
        double[] vals = new double[size];
        if (mapping.equalsIgnoreCase(LEVELS)) {
            for (int i = 0; i < vals.length; i++) {
                vals[i] = Double.parseDouble(levels.get(i));
            }
        } else if (mapping.equalsIgnoreCase(LINEAR)) {
            double start = 0;
            double inc   = 0;
            start = Double.parseDouble(levels.get(0));
            inc   = Double.parseDouble(levels.get(1));
            for (int i = 0; i < size; i++) {
                vals[i] = start + i * inc;
            }
            // TODO: figure out a better way to do this in case they don't start with gaus (e.g. MOM32)
        } else if (mapping.toLowerCase().startsWith("gaus")) {
            vals = GradsUtil.getGaussianLatitudes(mapping,
                    (int) Double.parseDouble(levels.get(0)), size);
        }
        // sanity check on z units
        if (name.equals(GradsDataDescriptorFile.ZDEF)) {
            for (int i = 0; i < vals.length; i++) {
                double val = vals[i];
                if (val > 1050) {
                    unitName = "Pa";

                    break;
                } else if (val < 10) {
                    // sometimes it's just a level number
                    // probably should be something else, but dimensionless
                    unitName = "";

                    break;
                }
            }
        }
        return vals;
    }
protected double[] makeLevelValues() {
        if (levels == null) {
            return null;
        }
        if (levels.size() != size) {
            // do someting
        }
        double[] vals = new double[size];
        if (mapping.equalsIgnoreCase(LEVELS)) {
            for (int i = 0; i < vals.length; i++) {
                vals[i] = Double.parseDouble(levels.get(i));
            }
        } else if (mapping.equalsIgnoreCase(LINEAR)) {
            double start = 0;
            double inc   = 0;
            start = Double.parseDouble(levels.get(0));
            inc   = Double.parseDouble(levels.get(1));
            for (int i = 0; i < size; i++) {
                vals[i] = start + i * inc;
            }
            // TODO: figure out a better way to do this in case they don't start with gaus (e.g. MOM32)
        } else if (mapping.toLowerCase().startsWith("gaus")) {
            vals = GradsUtil.getGaussianLatitudes(mapping,
                    (int) Double.parseDouble(levels.get(0)), size);
        }
        // sanity check on z units
        if (name.equals(GradsDataDescriptorFile.ZDEF)) {
            for (int i = 0; i < vals.length; i++) {
                double val = vals[i];
                if (val > 1050) {
                    unitName = "Pa";

                    break;
                } else if (val < 10) {
                    // sometimes it's just a level number
                    // probably should be something else, but dimensionless
                    unitName = "";

                    break;
                }
            }
        }
        return vals;
    }
protected double [ ] makeLevelValues ( ) { if ( levels == null ) { return null ; } if ( levels . size ( ) != size ) { // do someting
 } double [ ] vals = new double [ size ] ; if ( mapping . equalsIgnoreCase ( LEVELS ) ) { for ( int i = 0 ; i < vals . length ; i ++ ) { vals [ i ] = Double . parseDouble ( levels . get ( i ) ) ; } } else if ( mapping . equalsIgnoreCase ( LINEAR ) ) { double start = 0 ; double inc = 0 ; start = Double . parseDouble ( levels . get ( 0 ) ) ; inc = Double . parseDouble ( levels . get ( 1 ) ) ; for ( int i = 0 ; i < size ; i ++ ) { vals [ i ] = start + i * inc ; } // TODO: figure out a better way to do this in case they don't start with gaus (e.g. MOM32)
 } else if ( mapping . toLowerCase ( ) . startsWith ( "gaus" ) ) { vals = GradsUtil . getGaussianLatitudes ( mapping , ( int ) Double . parseDouble ( levels . get ( 0 ) ) , size ) ; } // sanity check on z units
 if ( name . equals ( GradsDataDescriptorFile . ZDEF ) ) { for ( int i = 0 ; i < vals . length ; i ++ ) { double val = vals [ i ] ; if ( val > 1050 ) { unitName = "Pa" ; break ; } else if ( val < 10 ) { // sometimes it's just a level number
 // probably should be something else, but dimensionless
 unitName = "" ; break ; } } } return vals ; }
Make the level values from the specifications

@return the level values
Make the level values from the specifications