Tabnine Logo
VerticalTransform.getUnitString
Code IndexAdd Tabnine to your IDE (free)

How to use
getUnitString
method
in
ucar.unidata.geoloc.vertical.VerticalTransform

Best Java code snippets using ucar.unidata.geoloc.vertical.VerticalTransform.getUnitString (Showing top 6 results out of 315)

origin: edu.ucar/cdm

/**
 * Create a subset of an existing VerticalTransform
 * @param original make a subset of this
 * @param t_range subset the time dimension, or null if you want all of it
 * @param z_range subset the vertical dimension, or null if you want all of it
 * @param y_range subset the y dimension, or null if you want all of it
 * @param x_range subset the x dimension, or null if you want all of it
 */
public VerticalTransformSubset(VerticalTransform original, Range t_range,
                Range z_range, Range y_range, Range x_range) {
  super(null);  // timeDim not used in this class
  this.original = original;
  this.t_range  = t_range;
  subsetList.add(z_range);
  subsetList.add(y_range);
  subsetList.add(x_range);
  units = original.getUnitString();
}
origin: edu.ucar/netcdf

/**
 * Create a subset of an existing VerticalTransform
 * @param original make a subset of this
 * @param t_range subset the time dimension, or null if you want all of it
 * @param z_range subset the vertical dimension, or null if you want all of it
 * @param y_range subset the y dimension, or null if you want all of it
 * @param x_range subset the x dimension, or null if you want all of it
 */
public VerticalTransformSubset(VerticalTransform original, Range t_range,
                Range z_range, Range y_range, Range x_range) {
  super(null);  // timeDim not used in this class
  this.original = original;
  this.t_range  = t_range;
  subsetList.add(z_range);
  subsetList.add(y_range);
  subsetList.add(x_range);
  units = original.getUnitString();
}
origin: Unidata/thredds

/**
 * Create a subset of an existing VerticalTransform
 * @param original make a subset of this
 * @param t_range subset the time dimension, or null if you want all of it
 * @param z_range subset the vertical dimension, or null if you want all of it
 * @param y_range subset the y dimension, or null if you want all of it
 * @param x_range subset the x dimension, or null if you want all of it
 */
public VerticalTransformSubset(VerticalTransform original, Range t_range,
                Range z_range, Range y_range, Range x_range) {
  super(null);  // timeDim not used in this class
  this.original = original;
  this.t_range  = t_range;
  subsetList.add(z_range);
  subsetList.add(y_range);
  subsetList.add(x_range);
  units = original.getUnitString();
}
origin: Unidata/thredds

@Test
@Category(NeedsCdmUnitTest.class)
public void testWRF() throws Exception {
 try(GridDataset dataset = GridDataset.open(TestDir.cdmUnitTestDir + "conventions/wrf/wrfout_v2_Lambert.nc")) {
  GeoGrid grid = dataset.findGridByName("T");
  assert null != grid;
  GridCoordSystem gcs = grid.getCoordinateSystem();
  assert null != gcs;
  assert grid.getRank() == 4;
  CoordinateAxis zaxis = gcs.getVerticalAxis();
  assert zaxis.getSize() == 27;
  VerticalTransform vt = gcs.getVerticalTransform();
  assert vt != null;
  assert vt.getUnitString().equals("Pa");
  GeoGrid grid_section = grid.subset(null, null, null, 3, 3, 3);
  Array data = grid_section.readDataSlice(-1, -1, -1, -1);
  assert data.getShape()[0] == 13 : data.getShape()[0];
  assert data.getShape()[1] == 9 : data.getShape()[1];
  assert data.getShape()[2] == 20 : data.getShape()[2];
  assert data.getShape()[3] == 25 : data.getShape()[3];
  GridCoordSystem gcs_section = grid_section.getCoordinateSystem();
  CoordinateAxis zaxis2 = gcs_section.getVerticalAxis();
  assert zaxis2.getSize() == 9 : zaxis2.getSize();
  assert zaxis2.getUnitsString().equals(zaxis.getUnitsString());
  assert gcs_section.getTimeAxis().equals(gcs.getTimeAxis());
  VerticalTransform vt_section = gcs_section.getVerticalTransform();
  assert vt_section != null;
  assert vt_section.getUnitString().equals(vt.getUnitString());
 }
}
origin: Unidata/thredds

String vertCoordUnit = vt.getUnitString();
assert vunit.isCompatible(vertCoordUnit) : vertCoordUnit + " not udunits compatible with " + vunit.getUnitString();
origin: Unidata/thredds

private void testGrid( GeoGrid grid) throws IOException, InvalidRangeException {
 assert null != grid;
 GridCoordSystem gcs = grid.getCoordinateSystem();
 assert null != gcs;
 assert grid.getRank() == 4;
 Array data = grid.readDataSlice(0, -1, -1, -1);
 assert data.getRank() == 3;
 CoordinateAxis zaxis = gcs.getVerticalAxis();
 assert data.getShape()[0] == zaxis.getSize() : zaxis.getSize();
 CoordinateAxis yaxis = gcs.getYHorizAxis();
 assert data.getShape()[1] == yaxis.getSize() : yaxis.getSize();
 CoordinateAxis xaxis = gcs.getXHorizAxis();
 assert data.getShape()[2] == xaxis.getSize() : xaxis.getSize();
 VerticalTransform vt = gcs.getVerticalTransform();
 assert vt != null;
 assert vt.getUnitString() != null;
 ucar.ma2.ArrayDouble.D3 vcoord = vt.getCoordinateArray(0);
 assert vcoord.getShape()[0] ==  zaxis.getSize() : vcoord.getShape()[0];
 assert vcoord.getShape()[1] ==  yaxis.getSize() : vcoord.getShape()[1];
 assert vcoord.getShape()[2] ==  xaxis.getSize() : vcoord.getShape()[2];
}
ucar.unidata.geoloc.verticalVerticalTransformgetUnitString

Javadoc

Get the unit string for the vertical coordinate.

Popular methods of VerticalTransform

  • getCoordinateArray
    Get the 3D vertical coordinate array for this time step. Must be in "canonical order" : z, y, x.
  • isTimeDependent
    Get whether this coordinate is time dependent.
  • subset
    Create a VerticalTransform as a section of an existing VerticalTransform.
  • getCoordinateArray1D
    Get the 1D vertical coordinate array for this time step and the specified X,Y index for Lat-Lon poin

Popular in Java

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Kernel (java.awt.image)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now