@Immutable public class CoordinateTime2D extends CoordinateTimeAbstract implements Coordinate
| Modifier and Type | Class and Description |
|---|---|
static class |
CoordinateTime2D.Builder1 |
static class |
CoordinateTime2D.Builder2 |
static class |
CoordinateTime2D.Time2D |
Coordinate.Typecdf, code, MIXED_INTERVALS, name, periodName, refDate, time2runtime, timeUnit| Constructor and Description |
|---|
CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
CoordinateTimeAbstract otime,
java.util.List<Coordinate> times,
int[] time2runtime)
Ctor.
|
CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
java.util.List<Coordinate> times,
int[] time2runtime)
Ctor.
|
CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
java.util.List<Coordinate> regList,
java.util.List<Coordinate> times,
int[] time2runtime)
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
ucar.nc2.util.Counters |
calcDistributions() |
boolean |
equals(java.lang.Object o) |
int |
estMemorySize() |
int |
findTimeIndexFromVal(int runIdx,
java.lang.Object val)
Find index in time coordinate from the time value
|
boolean |
getIndex(CoordinateTime2D.Time2D want,
int[] wholeIndex)
find the run and time indexes of want
the inverse of getOrgValue
|
int |
getIndex(java.lang.Object val) |
int |
getNCoords() |
int |
getNruns() |
int |
getNtimes() |
int |
getOffset(int runIndex) |
java.util.List<? extends java.lang.Object> |
getOffsetsSorted()
Get a sorted list of the unique time coordinates
|
CoordinateTime2D.Time2D |
getOrgValue(int runIdx,
int timeIdx)
Get the time coordinate at the given indices, into the 2D time coordinate array
|
ucar.nc2.time.CalendarDate |
getRefDate(int runIdx) |
long |
getRuntime(int runIdx) |
CoordinateRuntime |
getRuntimeCoordinate() |
int |
getSize() |
CoordinateTimeAbstract |
getTimeCoordinate(int runIdx) |
int[] |
getTimeIndicesFromMrutp(int timeIdx) |
java.lang.String |
getTimeIntervalName()
Check if all time intervals have the same length.
|
java.util.List<? extends Coordinate> |
getTimesForSerialization()
public by accident - do not use
|
Coordinate.Type |
getType() |
java.lang.Object |
getValue(int idx) |
java.util.List<? extends java.lang.Object> |
getValues() |
int |
hashCode() |
boolean |
hasUniqueTimes() |
boolean |
isOrthogonal() |
boolean |
isRegular() |
boolean |
isTimeInterval() |
protected CoordinateTimeAbstract |
makeBestFromComplete(int[] best,
int n) |
CoordinateTimeAbstract |
makeBestTimeCoordinate(CoordinateRuntime master) |
ucar.nc2.time.CalendarDateRange |
makeCalendarDateRange(ucar.nc2.time.Calendar cal) |
CoordinateTimeAbstract |
makeTime2Runtime(CoordinateRuntime master) |
int |
matchTimeCoordinate(int runIdx,
CoordinateTime2D.Time2D value)
Find the index matching a runtime and time coordinate
|
void |
setName(java.lang.String name) |
void |
showCoords(java.util.Formatter info) |
void |
showInfo(java.util.Formatter info,
ucar.nc2.util.Indent indent) |
getCode, getMasterRuntimeIndex, getName, getOffsetInTimeUnits, getRefDate, getTime2runtime, getTimeUdUnit, getTimeUnit, getUnit, makeBestFromCompleteclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetCode, getName, getUnitpublic CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
java.util.List<Coordinate> times,
int[] time2runtime)
code - pdsFirst.getTimeUnit()timeUnit - time duration, based on codevals - complete set of Time2D values, may be null (used only during creation)runtime - list of runtimestimes - list of times, one for each runtime, offsets reletive to its runtime, may not be nullpublic CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
CoordinateTimeAbstract otime,
java.util.List<Coordinate> times,
int[] time2runtime)
code - pdsFirst.getTimeUnit()timeUnit - time duration, based on codevals - complete set of Time2D values, may be null (used only during creation)runtime - list of runtimesotime - list of offsets, all the same for each runtimetimes - list of times, one for each runtime, offsets reletive to its runtime, may be null (Only available during creation, not stored in index)public CoordinateTime2D(int code,
ucar.nc2.time.CalendarPeriod timeUnit,
java.util.List<CoordinateTime2D.Time2D> vals,
CoordinateRuntime runtime,
java.util.List<Coordinate> regList,
java.util.List<Coordinate> times,
int[] time2runtime)
code - pdsFirst.getTimeUnit()timeUnit - time duration, based on codevals - complete set of Time2D values, may be null (used only during creation)runtime - list of runtimesregList - list of offsets, one each for each possible runtime hour of day.times - list of times, one for each runtime, offsets reletive to its runtime, may be null (Only available during creation, not stored in index)public void setName(java.lang.String name)
setName in class CoordinateTimeAbstractpublic CoordinateRuntime getRuntimeCoordinate()
public boolean isTimeInterval()
public boolean isOrthogonal()
public boolean isRegular()
public int getNtimes()
public int getNruns()
public int getOffset(int runIndex)
public void showInfo(java.util.Formatter info,
ucar.nc2.util.Indent indent)
showInfo in interface Coordinatepublic void showCoords(java.util.Formatter info)
showCoords in interface Coordinatepublic ucar.nc2.util.Counters calcDistributions()
calcDistributions in interface Coordinatepublic java.util.List<? extends java.lang.Object> getValues()
getValues in interface Coordinatepublic java.lang.Object getValue(int idx)
getValue in interface Coordinatepublic int getIndex(java.lang.Object val)
getIndex in interface Coordinatepublic int getSize()
getSize in interface Coordinatepublic int getNCoords()
getNCoords in interface CoordinategetNCoords in class CoordinateTimeAbstractpublic int estMemorySize()
estMemorySize in interface Coordinatepublic Coordinate.Type getType()
getType in interface Coordinatepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getTimeIntervalName()
public ucar.nc2.time.CalendarDateRange makeCalendarDateRange(ucar.nc2.time.Calendar cal)
makeCalendarDateRange in class CoordinateTimeAbstractpublic CoordinateTimeAbstract getTimeCoordinate(int runIdx)
public ucar.nc2.time.CalendarDate getRefDate(int runIdx)
public long getRuntime(int runIdx)
public CoordinateTime2D.Time2D getOrgValue(int runIdx, int timeIdx)
runIdx - run indextimeIdx - time indexpublic boolean getIndex(CoordinateTime2D.Time2D want, int[] wholeIndex)
want - find time coordinate that matcheswholeIndex - return index herepublic int matchTimeCoordinate(int runIdx,
CoordinateTime2D.Time2D value)
runIdx - which runvalue - time coordinateprotected CoordinateTimeAbstract makeBestFromComplete(int[] best, int n)
makeBestFromComplete in class CoordinateTimeAbstractpublic CoordinateTimeAbstract makeTime2Runtime(CoordinateRuntime master)
public CoordinateTimeAbstract makeBestTimeCoordinate(CoordinateRuntime master)
public boolean hasUniqueTimes()
public int[] getTimeIndicesFromMrutp(int timeIdx)
public java.util.List<? extends Coordinate> getTimesForSerialization()
public int findTimeIndexFromVal(int runIdx,
java.lang.Object val)
val - TimeCoord.Tinv or Integerpublic java.util.List<? extends java.lang.Object> getOffsetsSorted()