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 GridEnsembleCoord
ecs
ensemble coord systemprotected GridRecord
firstRecord
first grid recordprotected GridTableLookup
lookup
lookup tableprotected int
nlevels
number of levelsprotected int
ntimes
number of timesprotected GridRecord[]
recordTracker
record trackerprotected GridTimeCoord
tcs
time coord systemprotected GridVertCoord
vc
vertical coordinateString
vname
variable name
-
Constructor Summary
Constructors Modifier Constructor Description protected
GridVariable(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 void
addExtraAttributes(GridParameter param, Variable v)
String
dump()
Dump this variableboolean
equals(Object oo)
Check for equalityGridRecord
findRecord(int ens, int time, int level)
Find the grid record for the time and level indices Canonical ordering is ens, time, levelString
getName()
Get the nameint
getNEnsembles()
Get the number of Ensembleprotected int
getVertIndex(GridRecord p)
Get the index in the vertical for the particular gridint
hashCode()
Override Object.hashCode() to implement equals.protected boolean
isEnsemble()
String
makeIntervalName()
String
makeLevelName(GridRecord gr, GridTableLookup lookup)
Make the level nameprotected String
makeLongName()
Make a long name for the variablevoid
showMissing(Formatter f)
Dump out the missing dataint
showMissingSummary(Formatter f)
Dump out the missing data as a summaryvoid
showRecord(int recnum, Formatter f)
String
toString()
protected boolean
trackRecords(int time, int level, GridRecord p, 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, Variable v)
-
trackRecords
protected boolean trackRecords(int time, int level, GridRecord p, 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()
-
-