Package ucar.nc2.iosp.grid
Class GridVariable
- java.lang.Object
-
- ucar.nc2.iosp.grid.GridVariable
-
public class GridVariable extends Object
A Variable for a Grid dataset.
-
-
Field Summary
Fields Modifier and Type Field Description protected GridEnsembleCoordecsensemble coord systemprotected GridRecordfirstRecordfirst grid recordprotected GridTableLookuplookuplookup tableprotected intnlevelsnumber of levelsprotected intntimesnumber of timesprotected GridRecord[]recordTrackerrecord trackerprotected GridTimeCoordtcstime coord systemprotected GridVertCoordvcvertical coordinateStringvnamevariable name
-
Constructor Summary
Constructors Modifier Constructor Description protectedGridVariable(String filename, String name, GridHorizCoordSys hcs, GridTableLookup lookup)Create a new GridVariable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddExtraAttributes(GridParameter param, ucar.nc2.Variable v)Stringdump()Dump this variablebooleanequals(Object oo)Check for equalityGridRecordfindRecord(int ens, int time, int level)Find the grid record for the time and level indices Canonical ordering is ens, time, levelStringgetName()Get the nameintgetNEnsembles()Get the number of Ensembleprotected intgetVertIndex(GridRecord p)Get the index in the vertical for the particular gridinthashCode()Override Object.hashCode() to implement equals.protected booleanisEnsemble()StringmakeIntervalName()StringmakeLevelName(GridRecord gr, GridTableLookup lookup)Make the level nameprotected StringmakeLongName()Make a long name for the variablevoidshowMissing(Formatter f)Dump out the missing dataintshowMissingSummary(Formatter f)Dump out the missing data as a summaryvoidshowRecord(int recnum, Formatter f)StringtoString()protected booleantrackRecords(int time, int level, GridRecord p, ucar.unidata.io.RandomAccessFile raf, boolean messSent)
-
-
-
Field Detail
-
vname
public String vname
variable name
-
firstRecord
protected GridRecord firstRecord
first grid record
-
lookup
protected GridTableLookup lookup
lookup table
-
tcs
protected GridTimeCoord tcs
time coord system
-
ecs
protected GridEnsembleCoord ecs
ensemble coord system
-
vc
protected GridVertCoord vc
vertical coordinate
-
nlevels
protected int nlevels
number of levels
-
ntimes
protected int ntimes
number of times
-
recordTracker
protected GridRecord[] recordTracker
record tracker
-
-
Constructor Detail
-
GridVariable
protected GridVariable(String filename, String name, GridHorizCoordSys hcs, GridTableLookup lookup)
Create a new GridVariable- Parameters:
name- name with levelhcs- horizontal coordinate systemlookup- lookup table
-
-
Method Detail
-
getNEnsembles
public int getNEnsembles()
Get the number of Ensemble- Returns:
- the number of Ensemble
-
isEnsemble
protected boolean isEnsemble()
-
getVertIndex
protected int getVertIndex(GridRecord p)
Get the index in the vertical for the particular grid- Parameters:
p- grid to check- Returns:
- the index
-
addExtraAttributes
protected void addExtraAttributes(GridParameter param, ucar.nc2.Variable v)
-
trackRecords
protected boolean trackRecords(int time, int level, GridRecord p, ucar.unidata.io.RandomAccessFile raf, boolean messSent)
-
showRecord
public void showRecord(int recnum, Formatter f)
-
showMissing
public void showMissing(Formatter f)
Dump out the missing data- Parameters:
f- write to this
-
showMissingSummary
public int showMissingSummary(Formatter f)
Dump out the missing data as a summary- Parameters:
f- write to this- Returns:
- number of missing levels
-
findRecord
public GridRecord findRecord(int ens, int time, int level)
Find the grid record for the time and level indices Canonical ordering is ens, time, level- Parameters:
ens- ensemble indextime- time indexlevel- level index- Returns:
- the record or null
-
equals
public boolean equals(Object oo)
Check for equality
-
getName
public String getName()
Get the name- Returns:
- the name
-
hashCode
public int hashCode()
Override Object.hashCode() to implement equals.
-
dump
public String dump()
Dump this variable- Returns:
- the variable
-
makeLongName
protected String makeLongName()
Make a long name for the variable- Returns:
- long variable name
-
makeLevelName
public String makeLevelName(GridRecord gr, GridTableLookup lookup)
Make the level name- Parameters:
gr- grid recordlookup- lookup table- Returns:
- name for the level
-
makeIntervalName
public String makeIntervalName()
-
-