A container for handling physical dimensions such as time, latitude. It can be indexed/sliced the same way as indexing a numpy array
Get cartesian axis (T/Z/Y/X) for a dimension instance
if the dimension has a cartesian_axis attribute, the value of the attribute is returned. Otherwise, the unit is used as a clue
Example
dim.setattr(“cartesian_axis”,”X”) dim.getCAxis() –> “X”
Example
dim.units = “months” dim.getCAxis() –> “T”
Example
dim.units = “degreeN” dim.getCAxis() –> “Y”
Return the time axis date in an array format of “Year,Month,Day,Hour,Minute,Second” Toggle one or many among Y/m/d/H/M/S to select a particular time format
Parameters: |
|
---|
no_continuous_duplicate_month will check if there are adjacent months that are identical. If so, check if the data is a monthly series and correct for the duplicates
Examples
>>> # return an array of the month of the time axis
>>> var.getDate("m")
array([ 1, 2, 3, 4, 5, 6 ])
>>> # return an array with the first column showing the years,
>>> # second column showing the months, third column
>>> # for days
>>> getDate("Ymd")
array([[ 1990, 1, 15 ], [ 1990, 2, 15 ], [ 1990, 3, 15 ]])