visad.jmet
Class NetcdfGrids
- java.lang.Object
-
- visad.jmet.NetcdfGrids
-
public class NetcdfGrids extends java.lang.ObjectReads data from netCDF NCEP model grids one parameter at a time instead of the whole file (see Plain). This is pretty focused on delivering grids that are renderable in 3D.
-
-
Constructor Summary
Constructors Constructor and Description NetcdfGrids(java.io.File filename)NetcdfGrids(java.lang.String filename)set up to read grids from a netCDF file
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.Vectorget3dVariables()fetch a list of 3D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)java.util.Vectorget4dVariables()fetch a list of 4D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)doublegetAspect()java.awt.DimensiongetDimension()Integer2DSetgetDomainSet()Tuple[]getGrids(java.lang.String name, RealType values, double[][] range)fetch the grids for one parameterTuple[][]getGridsWithTime(java.lang.String name, RealType values, double[][] range)fetches grids are returns a Tuple [level][record] of FlatFields this was implemented to test the offset between mapping to animator or just doing one at a time...intgetNumberOfLevels()intgetNumberOfTimes()double[]getPressureLevels()java.lang.String[][]getVariableNames()fetch a list of Variable names, long_names, and unitsstatic voidmain(java.lang.String[] args)Test routine: java NetcdfGridsvoidsetRealTypes(RealType x, RealType y, RealType level, RealType time_type, RealType pres)set the RealTypes to use for coordinates (x,y,z,t) and pressure values
-
-
-
Constructor Detail
-
NetcdfGrids
public NetcdfGrids(java.lang.String filename)
set up to read grids from a netCDF file- Parameters:
filename- is the name of the netCDF file to read from
-
NetcdfGrids
public NetcdfGrids(java.io.File filename)
-
-
Method Detail
-
setRealTypes
public void setRealTypes(RealType x, RealType y, RealType level, RealType time_type, RealType pres)
set the RealTypes to use for coordinates (x,y,z,t) and pressure values- Parameters:
x- X-coordinatey- Y-coordinatelevel- level dimensiontime_type- forecast valid timepres- MathType of vertical coordinate in display
-
get4dVariables
public java.util.Vector get4dVariables()
fetch a list of 4D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)- Returns:
- names[0][k] is name; [1][k] is long_name, [2][k] is unit
-
get3dVariables
public java.util.Vector get3dVariables()
fetch a list of 3D Variable names, long_names, and units for those parameters that have dimensions (x,y,level,record)- Returns:
- names[0][k] is name; [1][k] is long_name, [2][k] is unit
-
getVariableNames
public java.lang.String[][] getVariableNames()
fetch a list of Variable names, long_names, and units- Returns:
- names[0][k] is name; [1][k] is long_name, [2][k] is unit
-
getAspect
public double getAspect()
-
getNumberOfLevels
public int getNumberOfLevels()
-
getPressureLevels
public double[] getPressureLevels()
-
getNumberOfTimes
public int getNumberOfTimes()
-
getDimension
public java.awt.Dimension getDimension()
-
getDomainSet
public Integer2DSet getDomainSet()
-
getGrids
public Tuple[] getGrids(java.lang.String name, RealType values, double[][] range)
fetch the grids for one parameter- Parameters:
name- the name of the parametervalues- the RealType associated with name- Returns:
- Tuple[2] where Tuple[0] is the vertical coordinate value and Tuple[1] is the FlatField(s) of data
-
main
public static void main(java.lang.String[] args)
Test routine: java NetcdfGrids
-
-
DMelt 3.0 © DataMelt by jWork.ORG