MCPcopy Create free account
hub / github.com/Kitware/VTK / vtkXArrayCFReader

Class vtkXArrayCFReader

Wrapping/Python/vtkmodules/util/xarray_support.py:41–397  ·  view source on GitHub ↗

Reads data from a file using the XArray readers and then connects the XArray data to the vtkNetCDFCFREader (using zero-copy when possible). At the moment, data is copied for coordinates (because they are converted to double in the reader) and for certain data that is subset either in

Source from the content-addressed store, hash-verified

39
40
41class vtkXArrayCFReader(VTKPythonAlgorithmBase):
42 '''Reads data from a file using the XArray readers and then connects
43 the XArray data to the vtkNetCDFCFREader (using zero-copy when
44 possible). At the moment, data is copied for coordinates (because
45 they are converted to double in the reader) and for certain data
46 that is subset either in XArray or in VTK. Lazy loading in XArray
47 is respected, that is data is accessed only when it is needed.
48 Time is passed to VTK either as an int64 for datetime64 or
49 timedelta64, or as a double (using cftime.toordinal) for cftime.
50 '''
51
52 _FORWARD_GET = {
53 "GetAccessor",
54 "GetAllDimensions",
55
56 "GetNumberOfVariableArrays",
57 "GetAllVariableArrayNames",
58 "GetVariableArrayName",
59 "GetVariableArrayStatus",
60
61 "GetTimeDimensionName",
62 "GetLatitudeDimensionName",
63 "GetLongitudeDimensionName",
64 "GetVerticalDimensionName",
65
66 "GetOutput",
67 "GetOutputType",
68 "GetSphericalCoordinates",
69
70 "GetReplaceFillValueWithNan",
71
72 "GetVariableDimensions",
73 "GetVerticalBias",
74 "GetVerticalScale",
75 "PrintSelf",
76 }
77 _FORWARD_SET = {
78 "SetDimensions",
79
80 "SetTimeDimensionName",
81 "SetLatitudeDimensionName",
82 "SetLongitudeDimensionName",
83 "SetVerticalDimensionName",
84
85
86 "SetSphericalCoordinates",
87 "SphericalCoordinatesOn",
88 "SphericalCoordinatesOff",
89
90 "SetReplaceFillValueWithNan",
91 "ReplaceFillValueWithNanOn",
92 "ReplaceFillValueWithNanOff",
93
94 "SetOutputType",
95 "SetOutputTypeToAutomatic",
96 "SetOutputTypeToImage",
97 "SetOutputTypeToRectilinear",
98 "SetOutputTypeToStructured",

Callers 1

create_readerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected