Examples of findAttribute()


Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null) return null;
    list = var.getDimensions();
    if ( list.size() != 1) return null;
    d = (Dimension) list.get(0);
    if ( ! d.getName().equals( dimName)) return null;
    units = var.findAttribute( "units").getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "km")) return null;

    trajConfig.setElevVar( var);

    trajConfig.setTrajectoryId( trajId);
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    NetcdfFile nc = NetcdfFile.open(filename);
    Variable v = ncfile.findVariable(helloGreek);
    assert v != null;
    assert v.getShortName().equals(helloGreek);

    Attribute att = v.findAttribute("units");
    assert att != null;
    assert att.isString();
    assert(helloGreek.equals(att.getStringValue()));
    nc.close();   
  }
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null) return null;
    list = var.getDimensions();
    if ( list.size() != 1) return null;
    d = (Dimension) list.get(0);
    if ( ! d.getName().equals( timeDimName )) return null;
    String units = var.findAttribute( "units").getStringValue();
    Date date = DateUnit.getStandardDate( "0 " + units);
    if ( date == null) return null;

    trajConfig.setTimeVar( var);
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null) return null;
    list = var.getDimensions();
    if ( list.size() != 1) return null;
    d = (Dimension) list.get(0);
    if ( ! d.getName().equals( timeDimName)) return null;
    units = var.findAttribute( "units").getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "degrees_north")) return null;

    trajConfig.setLatVar( var);

    // Check for longitude variable with time dimension and units convertable to "degrees_east".
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null) return null;
    list = var.getDimensions();
    if ( list.size() != 1) return null;
    d = (Dimension) list.get(0);
    if ( ! d.getName().equals( timeDimName )) return null;
    units = var.findAttribute( "units").getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "degrees_east")) return null;

    trajConfig.setLonVar( var);

    // Check for altitude variable with time dimension and units convertable to "m".
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null) return null;
    list = var.getDimensions();
    if ( list.size() != 1) return null;
    d = (Dimension) list.get(0);
    if ( ! d.getName().equals( timeDimName )) return null;
    units = var.findAttribute( "units").getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "meters")) return null;

    trajConfig.setElevVar( var);

    trajConfig.setTrajectoryId( trajId);
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null ) return null;
    list = var.getDimensions();
    if ( list.size() != 1 ) return null;
    d = (Dimension) list.get( 0 );
    if ( ! d.getName().equals( timeDimName ) ) return null;
    String units = var.findAttribute( "units" ).getStringValue();
    Date date = DateUnit.getStandardDate( "0 " + units );
    if ( date == null ) return null;

    trajConfig.setTimeVar( var);
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null ) return null;
    list = var.getDimensions();
    if ( list.size() != 1 ) return null;
    d = (Dimension) list.get( 0 );
    if ( ! d.getName().equals( timeDimName ) ) return null;
    units = var.findAttribute( "units" ).getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "degrees_north" ) ) return null;

    trajConfig.setLatVar( var );

    // Check for longitude variable with time dimension and units convertable to "degrees_east".
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null ) return null;
    list = var.getDimensions();
    if ( list.size() != 1 ) return null;
    d = (Dimension) list.get( 0 );
    if ( ! d.getName().equals( timeDimName ) ) return null;
    units = var.findAttribute( "units" ).getStringValue();
    if ( ! SimpleUnit.isCompatible( units, "degrees_east" ) ) return null;

    trajConfig.setLonVar( var );

    // Check for altitude variable with time dimension and units convertable to "m".
View Full Code Here

Examples of ucar.nc2.Variable.findAttribute()

    if ( var == null ) return null;
    list = var.getDimensions();
    if ( list.size() != 1 ) return null;
    d = (Dimension) list.get( 0 );
    if ( ! d.getName().equals( timeDimName ) ) return null;
    units = var.findAttribute( "units" ).getStringValue();
    if ( units.indexOf( "meters" ) == -1 ) return null; // "meters above Mean Sea Level" not udunits convertible
    // if ( ! SimpleUnit.isCompatible( units, "m")) return( false);

    ((VariableEnhanced)var).setUnitsString("meters" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.