cdm/src/main/java/ucar/nc2/iosp/misc/Nldn.java
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException {
    super.open(raf, ncfile, cancelTask);

    Structure seq = new Sequence(ncfile, null, null, RECORD);
    ncfile.addVariable(null, seq);

    /*
    makeLightningVariable(NetcdfFile ncfile, Group group,
                          Structure seq, String name,
                          DataType dataType, String dims,
                          String longName, String cfName,
                          String units, AxisType type) {
    */
    Variable v = makeLightningVariable(ncfile, null, seq, TSEC, DataType.INT,
            "", "time of stroke", null,
            secondsSince1970,
            AxisType.Time);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, "nsec", DataType.INT,
            "", "nanoseconds since tsec", null,
            "1.0e-9 s", null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, LAT, DataType.INT, "",
            "latitude", "latitude", CDM.LAT_UNITS,
            AxisType.Lat);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-3)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, LON, DataType.INT, "",
            "longitude", "longitude", CDM.LON_UNITS,
            AxisType.Lon);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-3)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(
            ncfile, null, seq, SIGNAL, DataType.SHORT, "",
            "signal strength/polarity [150 NLDN measures ~= 30 kAmps]", null, "",
            null);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-1)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, MULTIPLICITY,
            DataType.BYTE, "",
            "multiplicity [#strokes per flash]", null,
            "", null);
    seq.addMemberVariable(v);

    v = new Variable(ncfile, null, seq, FILL);
    v.setDataType(DataType.BYTE);
    v.setDimensions("");
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, MAJOR_AXIS,
            DataType.BYTE, "",
            "error ellipse semi-major axis", null, "",
            null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, ECCENTRICITY,
            DataType.BYTE, "",
            "error ellipse eccentricity ", null, "",
            null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, ELLIPSE_ANGLE,
            DataType.BYTE, "",
            "error ellipse axis angle of orientation ",
            null, "degrees", null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, CHISQR, DataType.BYTE,
            "", "chi-squared", null, "", null);
    seq.addMemberVariable(v);

    addLightningGlobalAttributes(ncfile);

    ncfile.finish();

    sm = seq.makeStructureMembers();
    sm.findMember(TSEC).setDataParam(0);
    sm.findMember(NSEC).setDataParam(4);
    sm.findMember(LAT).setDataParam(8);
    sm.findMember(LON).setDataParam(12);
    sm.findMember(SIGNAL).setDataParam(18);
    sm.findMember(MULTIPLICITY).setDataParam(22);
    sm.findMember(FILL).setDataParam(23);
    sm.findMember(MAJOR_AXIS).setDataParam(24);
    sm.findMember(ECCENTRICITY).setDataParam(25);
    sm.findMember(ELLIPSE_ANGLE).setDataParam(26);
    sm.findMember(CHISQR).setDataParam(27);
    sm.setStructureSize(recSize);
  }
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException {
    super.open(raf, ncfile, cancelTask);

    Structure seq = new Sequence(ncfile, null, null, RECORD);
    ncfile.addVariable(null, seq);

    /*
    makeLightningVariable(NetcdfFile ncfile, Group group,
                          Structure seq, String name,
                          DataType dataType, String dims,
                          String longName, String cfName,
                          String units, AxisType type) {
    */
    Variable v = makeLightningVariable(ncfile, null, seq, TSEC, DataType.INT,
            "", "time of stroke", null,
            secondsSince1970,
            AxisType.Time);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, "nsec", DataType.INT,
            "", "nanoseconds since tsec", null,
            "1.0e-9 s", null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, LAT, DataType.INT, "",
            "latitude", "latitude", CDM.LAT_UNITS,
            AxisType.Lat);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-3)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, LON, DataType.INT, "",
            "longitude", "longitude", CDM.LON_UNITS,
            AxisType.Lon);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-3)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(
            ncfile, null, seq, SIGNAL, DataType.SHORT, "",
            "signal strength/polarity [150 NLDN measures ~= 30 kAmps]", null, "",
            null);
    v.addAttribute(new Attribute(CDM.SCALE_FACTOR, new Float(1.0e-1)));
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, MULTIPLICITY,
            DataType.BYTE, "",
            "multiplicity [#strokes per flash]", null,
            "", null);
    seq.addMemberVariable(v);

    v = new Variable(ncfile, null, seq, FILL);
    v.setDataType(DataType.BYTE);
    v.setDimensions("");
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, MAJOR_AXIS,
            DataType.BYTE, "",
            "error ellipse semi-major axis", null, "",
            null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, ECCENTRICITY,
            DataType.BYTE, "",
            "error ellipse eccentricity ", null, "",
            null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, ELLIPSE_ANGLE,
            DataType.BYTE, "",
            "error ellipse axis angle of orientation ",
            null, "degrees", null);
    seq.addMemberVariable(v);

    v = makeLightningVariable(ncfile, null, seq, CHISQR, DataType.BYTE,
            "", "chi-squared", null, "", null);
    seq.addMemberVariable(v);

    addLightningGlobalAttributes(ncfile);

    ncfile.finish();

    sm = seq.makeStructureMembers();
    sm.findMember(TSEC).setDataParam(0);
    sm.findMember(NSEC).setDataParam(4);
    sm.findMember(LAT).setDataParam(8);
    sm.findMember(LON).setDataParam(12);
    sm.findMember(SIGNAL).setDataParam(18);
    sm.findMember(MULTIPLICITY).setDataParam(22);
    sm.findMember(FILL).setDataParam(23);
    sm.findMember(MAJOR_AXIS).setDataParam(24);
    sm.findMember(ECCENTRICITY).setDataParam(25);
    sm.findMember(ELLIPSE_ANGLE).setDataParam(26);
    sm.findMember(CHISQR).setDataParam(27);
    sm.setStructureSize(recSize);
  }
public void open ( RandomAccessFile raf , NetcdfFile ncfile , CancelTask cancelTask ) throws IOException { super . open ( raf , ncfile , cancelTask ) ; Structure seq = new Sequence ( ncfile , null , null , RECORD ) ; ncfile . addVariable ( null , seq ) ; /*
    makeLightningVariable(NetcdfFile ncfile, Group group,
                          Structure seq, String name,
                          DataType dataType, String dims,
                          String longName, String cfName,
                          String units, AxisType type) {
    */ Variable v = makeLightningVariable ( ncfile , null , seq , TSEC , DataType . INT , "" , "time of stroke" , null , secondsSince1970 , AxisType . Time ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , "nsec" , DataType . INT , "" , "nanoseconds since tsec" , null , "1.0e-9 s" , null ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , LAT , DataType . INT , "" , "latitude" , "latitude" , CDM . LAT_UNITS , AxisType . Lat ) ; v . addAttribute ( new Attribute ( CDM . SCALE_FACTOR , new Float ( 1.0e-3 ) ) ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , LON , DataType . INT , "" , "longitude" , "longitude" , CDM . LON_UNITS , AxisType . Lon ) ; v . addAttribute ( new Attribute ( CDM . SCALE_FACTOR , new Float ( 1.0e-3 ) ) ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , SIGNAL , DataType . SHORT , "" , "signal strength/polarity [150 NLDN measures ~= 30 kAmps]" , null , "" , null ) ; v . addAttribute ( new Attribute ( CDM . SCALE_FACTOR , new Float ( 1.0e-1 ) ) ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , MULTIPLICITY , DataType . BYTE , "" , "multiplicity [#strokes per flash]" , null , "" , null ) ; seq . addMemberVariable ( v ) ; v = new Variable ( ncfile , null , seq , FILL ) ; v . setDataType ( DataType . BYTE ) ; v . setDimensions ( "" ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , MAJOR_AXIS , DataType . BYTE , "" , "error ellipse semi-major axis" , null , "" , null ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , ECCENTRICITY , DataType . BYTE , "" , "error ellipse eccentricity " , null , "" , null ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , ELLIPSE_ANGLE , DataType . BYTE , "" , "error ellipse axis angle of orientation " , null , "degrees" , null ) ; seq . addMemberVariable ( v ) ; v = makeLightningVariable ( ncfile , null , seq , CHISQR , DataType . BYTE , "" , "chi-squared" , null , "" , null ) ; seq . addMemberVariable ( v ) ; addLightningGlobalAttributes ( ncfile ) ; ncfile . finish ( ) ; sm = seq . makeStructureMembers ( ) ; sm . findMember ( TSEC ) . setDataParam ( 0 ) ; sm . findMember ( NSEC ) . setDataParam ( 4 ) ; sm . findMember ( LAT ) . setDataParam ( 8 ) ; sm . findMember ( LON ) . setDataParam ( 12 ) ; sm . findMember ( SIGNAL ) . setDataParam ( 18 ) ; sm . findMember ( MULTIPLICITY ) . setDataParam ( 22 ) ; sm . findMember ( FILL ) . setDataParam ( 23 ) ; sm . findMember ( MAJOR_AXIS ) . setDataParam ( 24 ) ; sm . findMember ( ECCENTRICITY ) . setDataParam ( 25 ) ; sm . findMember ( ELLIPSE_ANGLE ) . setDataParam ( 26 ) ; sm . findMember ( CHISQR ) . setDataParam ( 27 ) ; sm . setStructureSize ( recSize ) ; }
Open existing file, and populate ncfile with it. This method is only
called by the NetcdfFile constructor on itself. The provided NetcdfFile
object will be empty except for the location String and the
IOServiceProvider associated with this NetcdfFile object.

@param raf        the file to work on, it has already passed the
isValidFile() test.
@param ncfile     add objects to this empty NetcdfFile
@param cancelTask used to monitor user cancellation; may be null.
@throws IOException if read error
Open existing file and populate ncfile with it . This method is only called by the NetcdfFile constructor on itself . The provided NetcdfFile object will be empty except for the location String and the IOServiceProvider associated with this NetcdfFile object .