void findCoordinateTransform ( Group g , String nameStartsWith , int levelType ) { // look for variable that uses this coordinate List < Variable > vars = g . getVariables ( ) ; for ( Variable v : vars ) { if ( v . getShortName ( ) . equals ( nameStartsWith ) ) { Attribute att = v . findAttribute ( "grid_level_type" ) ; if ( ( att == null ) || ( att . getNumericValue ( ) . intValue ( ) != levelType ) ) { continue ; } v . addAttribute ( new Attribute ( _Coordinate . TransformType , "Vertical" ) ) ; v . addAttribute ( new Attribute ( "transform_name" , "Existing3DField" ) ) ; } } }
Find the coordinate transform