opendap/src/main/java/ucar/nc2/dods/DODSNetcdfFile.java
Dimension getNetcdfStrlenDim(DODSVariable v) {
    AttributeTable table = das.getAttributeTableN(v.getFullName()); // LOOK this probably doesnt work for nested variables
    if (table == null) return null;

    opendap.dap.Attribute dodsAtt = table.getAttribute("DODS");
    if (dodsAtt == null) return null;

    AttributeTable dodsTable = dodsAtt.getContainerN();
    if (dodsTable == null) return null;

    opendap.dap.Attribute att = dodsTable.getAttribute("strlen");
    if (att == null) return null;
    String strlen = att.getValueAtN(0);

    opendap.dap.Attribute att2 = dodsTable.getAttribute("dimName");
    String dimName = (att2 == null) ? null : att2.getValueAtN(0);
    if (debugCharArray) System.out.println(v.getFullName() + " has strlen= " + strlen + " dimName= " + dimName);

    int dimLength;
    try {
      dimLength = Integer.parseInt(strlen);
    } catch (NumberFormatException e) {
      logger.warn("DODSNetcdfFile " + location + " var = " + v.getFullName() + " error on strlen attribute = " + strlen);
      return null;
    }

    if (dimLength <= 0) return null; // LOOK what about unlimited ??
    return new Dimension(dimName, dimLength, dimName != null);
  }
Dimension getNetcdfStrlenDim(DODSVariable v) {
    AttributeTable table = das.getAttributeTableN(v.getFullName()); // LOOK this probably doesnt work for nested variables
    if (table == null) return null;

    opendap.dap.Attribute dodsAtt = table.getAttribute("DODS");
    if (dodsAtt == null) return null;

    AttributeTable dodsTable = dodsAtt.getContainerN();
    if (dodsTable == null) return null;

    opendap.dap.Attribute att = dodsTable.getAttribute("strlen");
    if (att == null) return null;
    String strlen = att.getValueAtN(0);

    opendap.dap.Attribute att2 = dodsTable.getAttribute("dimName");
    String dimName = (att2 == null) ? null : att2.getValueAtN(0);
    if (debugCharArray) System.out.println(v.getFullName() + " has strlen= " + strlen + " dimName= " + dimName);

    int dimLength;
    try {
      dimLength = Integer.parseInt(strlen);
    } catch (NumberFormatException e) {
      logger.warn("DODSNetcdfFile " + location + " var = " + v.getFullName() + " error on strlen attribute = " + strlen);
      return null;
    }

    if (dimLength <= 0) return null; // LOOK what about unlimited ??
    return new Dimension(dimName, dimLength, dimName != null);
  }
Dimension getNetcdfStrlenDim ( DODSVariable v ) { AttributeTable table = das . getAttributeTableN ( v . getFullName ( ) ) ; // LOOK this probably doesnt work for nested variables if ( table == null ) return null ; opendap . dap . Attribute dodsAtt = table . getAttribute ( "DODS" ) ; if ( dodsAtt == null ) return null ; AttributeTable dodsTable = dodsAtt . getContainerN ( ) ; if ( dodsTable == null ) return null ; opendap . dap . Attribute att = dodsTable . getAttribute ( "strlen" ) ; if ( att == null ) return null ; String strlen = att . getValueAtN ( 0 ) ; opendap . dap . Attribute att2 = dodsTable . getAttribute ( "dimName" ) ; String dimName = ( att2 == null ) ? null : att2 . getValueAtN ( 0 ) ; if ( debugCharArray ) System . out . println ( v . getFullName ( ) + " has strlen= " + strlen + " dimName= " + dimName ) ; int dimLength ; try { dimLength = Integer . parseInt ( strlen ) ; } catch ( NumberFormatException e ) { logger . warn ( "DODSNetcdfFile " + location + " var = " + v . getFullName ( ) + " error on strlen attribute = " + strlen ) ; return null ; } if ( dimLength <= 0 ) return null ; // LOOK what about unlimited ?? return new Dimension ( dimName , dimLength , dimName != null ) ; }
Checks to see if this is netcdf char array.

@param v must be type STRING
@return string length dimension, else null
Checks to see if this is netcdf char array .