cdm/src/main/java/ucar/nc2/iosp/nowrad/NOWRadheader.java
ProjectionImpl  nowrad(int hoff, float rlat1, float rlon1, float rlat2, float rlon2, float dlat, float dlon, Date dd) {
        List<Dimension> dims = new ArrayList<>();
        Dimension dimT = new Dimension("time", 1, true, false, false);

        ncfile.addDimension(null, dimT);

        String   timeCoordName = "time";
        Variable taxis         = new Variable(ncfile, null, null, timeCoordName);

        taxis.setDataType(DataType.DOUBLE);
        taxis.setDimensions("time");
        taxis.addAttribute(new Attribute(CDM.LONG_NAME, "time since base date"));
        taxis.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Time.toString()));

        double[] tdata = new double[1];

        tdata[0] = dd.getTime();

        Array dataT = Array.factory(DataType.DOUBLE, new int[] { 1 }, tdata);

        taxis.setCachedData(dataT, false);

        DateFormatter formatter = new DateFormatter();

        taxis.addAttribute(new Attribute(CDM.UNITS, "msecs since " + formatter.toDateTimeStringISO(new Date(0))));
        ncfile.addVariable(null, taxis);
        dims.add(dimT);

        Dimension jDim = new Dimension("lat", numY, true, false, false);
        Dimension iDim = new Dimension("lon", numX, true, false, false);

        dims.add(jDim);
        dims.add(iDim);
        ncfile.addDimension(null, iDim);
        ncfile.addDimension(null, jDim);
        ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.GRID.toString()));

        String   coordinates = "time lat lon";
        Variable v           = new Variable(ncfile, null, null, cname);

        v.setDataType(DataType.BYTE);
        v.setDimensions(dims);
        ncfile.addVariable(null, v);
        v.addAttribute(new Attribute(CDM.LONG_NAME, ctitle));
        v.addAttribute(new Attribute(CDM.SCALE_FACTOR, 5.0f));
        v.addAttribute(new Attribute(CDM.MISSING_VALUE, 0));
        v.addAttribute(new Attribute(CDM.UNITS, cunit));
        v.setSPobject(new Vinfo(numX, numY, hoff));
        v.addAttribute(new Attribute(_Coordinate.Axes, coordinates));

        // create coordinate variables
        Variable xaxis = new Variable(ncfile, null, null, "lon");
        xaxis.setDataType(DataType.DOUBLE);
        xaxis.setDimensions("lon");
        xaxis.addAttribute(new Attribute(CDM.LONG_NAME, "longitude"));
        xaxis.addAttribute(new Attribute(CDM.UNITS, "degree"));
        xaxis.addAttribute(new Attribute(_Coordinate.AxisType, "Lon"));

        double[] data1 = new double[numX];

        for (int i = 0; i < numX; i++) {
            data1[i] = (double) (rlon1 + i * dlon);
        }

        Array dataA = Array.factory(DataType.DOUBLE, new int[] { numX }, data1);

        xaxis.setCachedData(dataA, false);
        ncfile.addVariable(null, xaxis);

        Variable yaxis = new Variable(ncfile, null, null, "lat");
        yaxis.setDataType(DataType.DOUBLE);
        yaxis.setDimensions("lat");
        yaxis.addAttribute(new Attribute(CDM.LONG_NAME, "latitude"));
        yaxis.addAttribute(new Attribute(CDM.UNITS, "degree"));
        yaxis.addAttribute(new Attribute(_Coordinate.AxisType, "Lat"));
        data1 = new double[numY];

        for (int i = 0; i < numY; i++) {
            data1[i] = rlat1 + i * dlat;
        }

        dataA = Array.factory(DataType.DOUBLE, new int[] { numY }, data1);
        yaxis.setCachedData(dataA, false);
        ncfile.addVariable(null, yaxis);

        // projection
        // lower left and upper right corner lat/lons
        // modified cylind. equidistant or  CED with lat/lon ration != 1
    /*    LatLonProjection llproj = new LatLonProjection("LatitudeLongitudeProjection",
                                  new ProjectionRect(rlat1, rlon1, rlat2, rlon2));
        Variable ct = new Variable(ncfile, null, null, llproj.getClassName());

        ct.setDataType(DataType.CHAR);
        ct.setDimensions("");

        List params = llproj.getProjectionParameters();

        for (int i = 0; i < params.size(); i++) {
            Parameter p = (Parameter) params.get(i);

            ct.addAttribute(new Attribute(p));
        }

        ct.addAttribute(new Attribute(_Coordinate.TransformType, "Projection"));
        ct.addAttribute(new Attribute(_Coordinate.Axes, "lat lon"));

        // fake data
        dataA = Array.factory(DataType.CHAR, new int[] {});
        dataA.setChar(dataA.getIndex(), ' ');
        ct.setCachedData(dataA, false);
        ncfile.addVariable(null, ct);
      */
        return null;
    }
ProjectionImpl  nowrad(int hoff, float rlat1, float rlon1, float rlat2, float rlon2, float dlat, float dlon, Date dd) {
        List<Dimension> dims = new ArrayList<>();
        Dimension dimT = new Dimension("time", 1, true, false, false);

        ncfile.addDimension(null, dimT);

        String   timeCoordName = "time";
        Variable taxis         = new Variable(ncfile, null, null, timeCoordName);

        taxis.setDataType(DataType.DOUBLE);
        taxis.setDimensions("time");
        taxis.addAttribute(new Attribute(CDM.LONG_NAME, "time since base date"));
        taxis.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Time.toString()));

        double[] tdata = new double[1];

        tdata[0] = dd.getTime();

        Array dataT = Array.factory(DataType.DOUBLE, new int[] { 1 }, tdata);

        taxis.setCachedData(dataT, false);

        DateFormatter formatter = new DateFormatter();

        taxis.addAttribute(new Attribute(CDM.UNITS, "msecs since " + formatter.toDateTimeStringISO(new Date(0))));
        ncfile.addVariable(null, taxis);
        dims.add(dimT);

        Dimension jDim = new Dimension("lat", numY, true, false, false);
        Dimension iDim = new Dimension("lon", numX, true, false, false);

        dims.add(jDim);
        dims.add(iDim);
        ncfile.addDimension(null, iDim);
        ncfile.addDimension(null, jDim);
        ncfile.addAttribute(null, new Attribute("cdm_data_type", FeatureType.GRID.toString()));

        String   coordinates = "time lat lon";
        Variable v           = new Variable(ncfile, null, null, cname);

        v.setDataType(DataType.BYTE);
        v.setDimensions(dims);
        ncfile.addVariable(null, v);
        v.addAttribute(new Attribute(CDM.LONG_NAME, ctitle));
        v.addAttribute(new Attribute(CDM.SCALE_FACTOR, 5.0f));
        v.addAttribute(new Attribute(CDM.MISSING_VALUE, 0));
        v.addAttribute(new Attribute(CDM.UNITS, cunit));
        v.setSPobject(new Vinfo(numX, numY, hoff));
        v.addAttribute(new Attribute(_Coordinate.Axes, coordinates));

        // create coordinate variables
        Variable xaxis = new Variable(ncfile, null, null, "lon");
        xaxis.setDataType(DataType.DOUBLE);
        xaxis.setDimensions("lon");
        xaxis.addAttribute(new Attribute(CDM.LONG_NAME, "longitude"));
        xaxis.addAttribute(new Attribute(CDM.UNITS, "degree"));
        xaxis.addAttribute(new Attribute(_Coordinate.AxisType, "Lon"));

        double[] data1 = new double[numX];

        for (int i = 0; i < numX; i++) {
            data1[i] = (double) (rlon1 + i * dlon);
        }

        Array dataA = Array.factory(DataType.DOUBLE, new int[] { numX }, data1);

        xaxis.setCachedData(dataA, false);
        ncfile.addVariable(null, xaxis);

        Variable yaxis = new Variable(ncfile, null, null, "lat");
        yaxis.setDataType(DataType.DOUBLE);
        yaxis.setDimensions("lat");
        yaxis.addAttribute(new Attribute(CDM.LONG_NAME, "latitude"));
        yaxis.addAttribute(new Attribute(CDM.UNITS, "degree"));
        yaxis.addAttribute(new Attribute(_Coordinate.AxisType, "Lat"));
        data1 = new double[numY];

        for (int i = 0; i < numY; i++) {
            data1[i] = rlat1 + i * dlat;
        }

        dataA = Array.factory(DataType.DOUBLE, new int[] { numY }, data1);
        yaxis.setCachedData(dataA, false);
        ncfile.addVariable(null, yaxis);

        // projection
        // lower left and upper right corner lat/lons
        // modified cylind. equidistant or  CED with lat/lon ration != 1
    /*    LatLonProjection llproj = new LatLonProjection("LatitudeLongitudeProjection",
                                  new ProjectionRect(rlat1, rlon1, rlat2, rlon2));
        Variable ct = new Variable(ncfile, null, null, llproj.getClassName());

        ct.setDataType(DataType.CHAR);
        ct.setDimensions("");

        List params = llproj.getProjectionParameters();

        for (int i = 0; i < params.size(); i++) {
            Parameter p = (Parameter) params.get(i);

            ct.addAttribute(new Attribute(p));
        }

        ct.addAttribute(new Attribute(_Coordinate.TransformType, "Projection"));
        ct.addAttribute(new Attribute(_Coordinate.Axes, "lat lon"));

        // fake data
        dataA = Array.factory(DataType.CHAR, new int[] {});
        dataA.setChar(dataA.getIndex(), ' ');
        ct.setCachedData(dataA, false);
        ncfile.addVariable(null, ct);
      */
        return null;
    }
ProjectionImpl nowrad ( int hoff , float rlat1 , float rlon1 , float rlat2 , float rlon2 , float dlat , float dlon , Date dd ) { List < Dimension > dims = new ArrayList <> ( ) ; Dimension dimT = new Dimension ( "time" , 1 , true , false , false ) ; ncfile . addDimension ( null , dimT ) ; String timeCoordName = "time" ; Variable taxis = new Variable ( ncfile , null , null , timeCoordName ) ; taxis . setDataType ( DataType . DOUBLE ) ; taxis . setDimensions ( "time" ) ; taxis . addAttribute ( new Attribute ( CDM . LONG_NAME , "time since base date" ) ) ; taxis . addAttribute ( new Attribute ( _Coordinate . AxisType , AxisType . Time . toString ( ) ) ) ; double [ ] tdata = new double [ 1 ] ; tdata [ 0 ] = dd . getTime ( ) ; Array dataT = Array . factory ( DataType . DOUBLE , new int [ ] { 1 } , tdata ) ; taxis . setCachedData ( dataT , false ) ; DateFormatter formatter = new DateFormatter ( ) ; taxis . addAttribute ( new Attribute ( CDM . UNITS , "msecs since " + formatter . toDateTimeStringISO ( new Date ( 0 ) ) ) ) ; ncfile . addVariable ( null , taxis ) ; dims . add ( dimT ) ; Dimension jDim = new Dimension ( "lat" , numY , true , false , false ) ; Dimension iDim = new Dimension ( "lon" , numX , true , false , false ) ; dims . add ( jDim ) ; dims . add ( iDim ) ; ncfile . addDimension ( null , iDim ) ; ncfile . addDimension ( null , jDim ) ; ncfile . addAttribute ( null , new Attribute ( "cdm_data_type" , FeatureType . GRID . toString ( ) ) ) ; String coordinates = "time lat lon" ; Variable v = new Variable ( ncfile , null , null , cname ) ; v . setDataType ( DataType . BYTE ) ; v . setDimensions ( dims ) ; ncfile . addVariable ( null , v ) ; v . addAttribute ( new Attribute ( CDM . LONG_NAME , ctitle ) ) ; v . addAttribute ( new Attribute ( CDM . SCALE_FACTOR , 5.0f ) ) ; v . addAttribute ( new Attribute ( CDM . MISSING_VALUE , 0 ) ) ; v . addAttribute ( new Attribute ( CDM . UNITS , cunit ) ) ; v . setSPobject ( new Vinfo ( numX , numY , hoff ) ) ; v . addAttribute ( new Attribute ( _Coordinate . Axes , coordinates ) ) ; // create coordinate variables
 Variable xaxis = new Variable ( ncfile , null , null , "lon" ) ; xaxis . setDataType ( DataType . DOUBLE ) ; xaxis . setDimensions ( "lon" ) ; xaxis . addAttribute ( new Attribute ( CDM . LONG_NAME , "longitude" ) ) ; xaxis . addAttribute ( new Attribute ( CDM . UNITS , "degree" ) ) ; xaxis . addAttribute ( new Attribute ( _Coordinate . AxisType , "Lon" ) ) ; double [ ] data1 = new double [ numX ] ; for ( int i = 0 ; i < numX ; i ++ ) { data1 [ i ] = ( double ) ( rlon1 + i * dlon ) ; } Array dataA = Array . factory ( DataType . DOUBLE , new int [ ] { numX } , data1 ) ; xaxis . setCachedData ( dataA , false ) ; ncfile . addVariable ( null , xaxis ) ; Variable yaxis = new Variable ( ncfile , null , null , "lat" ) ; yaxis . setDataType ( DataType . DOUBLE ) ; yaxis . setDimensions ( "lat" ) ; yaxis . addAttribute ( new Attribute ( CDM . LONG_NAME , "latitude" ) ) ; yaxis . addAttribute ( new Attribute ( CDM . UNITS , "degree" ) ) ; yaxis . addAttribute ( new Attribute ( _Coordinate . AxisType , "Lat" ) ) ; data1 = new double [ numY ] ; for ( int i = 0 ; i < numY ; i ++ ) { data1 [ i ] = rlat1 + i * dlat ; } dataA = Array . factory ( DataType . DOUBLE , new int [ ] { numY } , data1 ) ; yaxis . setCachedData ( dataA , false ) ; ncfile . addVariable ( null , yaxis ) ; // projection
 // lower left and upper right corner lat/lons
 // modified cylind. equidistant or  CED with lat/lon ration != 1
 /*    LatLonProjection llproj = new LatLonProjection("LatitudeLongitudeProjection",
                                  new ProjectionRect(rlat1, rlon1, rlat2, rlon2));
        Variable ct = new Variable(ncfile, null, null, llproj.getClassName());

        ct.setDataType(DataType.CHAR);
        ct.setDimensions("");

        List params = llproj.getProjectionParameters();

        for (int i = 0; i < params.size(); i++) {
            Parameter p = (Parameter) params.get(i);

            ct.addAttribute(new Attribute(p));
        }

        ct.addAttribute(new Attribute(_Coordinate.TransformType, "Projection"));
        ct.addAttribute(new Attribute(_Coordinate.Axes, "lat lon"));

        // fake data
        dataA = Array.factory(DataType.CHAR, new int[] {});
        dataA.setChar(dataA.getIndex(), ' ');
        ct.setCachedData(dataA, false);
        ncfile.addVariable(null, ct);
      */ return null ; }
construct a raster dataset for NIDS raster products;

@return  soff -- not used
construct a raster dataset for NIDS raster products ;