public Variable addStringVariable ( Group g , String shortName , String dims , int strlen ) { if ( immutable ) throw new IllegalStateException ( "Cant modify" ) ; if ( g == null ) g = rootGroup ; String dimName = shortName + "_strlen" ; addDimension ( g , new Dimension ( dimName , strlen ) ) ; Variable v = new Variable ( this , g , null , shortName ) ; v . setDataType ( DataType . CHAR ) ; v . setDimensions ( dims + " " + dimName ) ; g . addVariable ( v ) ; return v ; }
Create a new Variable of type Datatype . CHAR and add to the given group .