Package ucar.nc2.grid
Class GridTimeCoordinateSystem
- java.lang.Object
-
- ucar.nc2.grid.GridTimeCoordinateSystem
-
public abstract class GridTimeCoordinateSystem extends Object
Manages the time coordinates of a GridCoordinateSystem. The complexity is due to Forecast Model Run Collections (FMRC), in which the time coordinate depends on the forecast run. This is handled in the subclasses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GridTimeCoordinateSystem.Type
Types of GridTimeCoordinateSystem.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description CalendarDate
getBaseDate()
The earliest runtime or observation date.List<Integer>
getMaterializedShape()
The materialized shape (use only from MaterializedCoordinateSystem).List<Integer>
getNominalShape()
The nominal shape.CalendarPeriod
getOffsetPeriod()
The units of the TimeOffsetAxis.GridAxisPoint
getRunTimeAxis()
Get the Runtime axis.CalendarDate
getRuntimeDate(int runIdx)
Get the ith runtime CalendarDate.CalendarDateUnit
getRuntimeDateUnit()
The runtime CalendarDateUnit.List<Range>
getSubsetRanges()
For subsets, the ranges of the original axes that constitutes the subset.GridAxis<?>
getTimeOffsetAxis(int runIdx)
Get the ith timeOffset axis.List<CalendarDate>
getTimesForRuntime(int runIdx)
Get the forecast/valid dates for a given run.GridTimeCoordinateSystem.Type
getType()
The GridTimeCoordinateSystem.Type.CalendarDateUnit
makeOffsetDateUnit(int runIdx)
The CalendarDateUnit for the offset time axis for runIdx.abstract Optional<? extends GridTimeCoordinateSystem>
subset(GridSubset params, Formatter errlog)
Create a subsetted GridTimeCoordinateSystem.String
toString()
-
-
-
Method Detail
-
getRuntimeDate
public CalendarDate getRuntimeDate(int runIdx)
Get the ith runtime CalendarDate. If type=Observation, equals getBaseDate().
-
getTimeOffsetAxis
public GridAxis<?> getTimeOffsetAxis(int runIdx)
Get the ith timeOffset axis. The offsets are reletive to getRuntimeDate(int runIdx), in units of getOffsetPeriod(). if type=Observation, SingleRuntime, runIdx is ignored, since the offsets are always the same, by convention, pass in 0.
-
getOffsetPeriod
public CalendarPeriod getOffsetPeriod()
The units of the TimeOffsetAxis.
-
getRuntimeDateUnit
public CalendarDateUnit getRuntimeDateUnit()
The runtime CalendarDateUnit. Note this may have different CalendarPeriod from the offset.
-
getBaseDate
public CalendarDate getBaseDate()
The earliest runtime or observation date.
-
getRunTimeAxis
@Nullable public GridAxisPoint getRunTimeAxis()
Get the Runtime axis. Null if type=Observation
-
getTimesForRuntime
public List<CalendarDate> getTimesForRuntime(int runIdx)
Get the forecast/valid dates for a given run. If type=Observation or SingleRuntime, runIdx is ignored. For intervals this is the midpoint.
-
makeOffsetDateUnit
public CalendarDateUnit makeOffsetDateUnit(int runIdx)
The CalendarDateUnit for the offset time axis for runIdx.
-
subset
public abstract Optional<? extends GridTimeCoordinateSystem> subset(GridSubset params, Formatter errlog)
Create a subsetted GridTimeCoordinateSystem.
-
getType
public GridTimeCoordinateSystem.Type getType()
The GridTimeCoordinateSystem.Type.
-
getMaterializedShape
public List<Integer> getMaterializedShape()
The materialized shape (use only from MaterializedCoordinateSystem).
-
getSubsetRanges
public List<Range> getSubsetRanges()
For subsets, the ranges of the original axes that constitutes the subset.
-
-