@@ -39,11 +39,13 @@ def _get_axis(master_cdf: Driver, cdf: Driver, axis_var: str, data_var: str):
39
39
if 'sig_digits' in master_cdf .variable_attributes (axis_var ): # cluster CSA trick :/
40
40
return SupportDataVariable (name = axis_var , values = np .asarray (cdf .values (axis_var ), dtype = float ),
41
41
attributes = _get_attributes (master_cdf , cdf , axis_var ),
42
- is_nrv = cdf .is_nrv (axis_var )
42
+ is_nrv = cdf .is_nrv (axis_var ),
43
+ cdf_type = cdf .cdf_type (axis_var )
43
44
)
44
45
return SupportDataVariable (name = axis_var , values = cdf .values (axis_var ),
45
46
attributes = _get_attributes (master_cdf , cdf , axis_var ),
46
- is_nrv = cdf .is_nrv (axis_var )
47
+ is_nrv = cdf .is_nrv (axis_var ),
48
+ cdf_type = cdf .cdf_type (axis_var )
47
49
)
48
50
else :
49
51
log .warning (
@@ -78,13 +80,14 @@ def _load_data_var(master_cdf: Driver, cdf: Driver, var: str) -> DataVariable or
78
80
shape = cdf .shape (var )
79
81
axes = _get_axes (master_cdf , cdf , var , shape )
80
82
attributes = _get_attributes (master_cdf , cdf , var )
83
+ cdf_type = cdf .cdf_type (var )
81
84
labels = _get_labels (attributes )
82
85
if len (axes ) == 0 :
83
86
log .warning (f"{ ISTP_NOT_COMPLIANT_W } : { var } was marked as data variable but it has 0 support variable" )
84
87
return None
85
88
if None in axes or axes [0 ].values .shape [0 ] != shape [0 ]:
86
89
return None
87
- return DataVariable (name = var , values = values , attributes = attributes , axes = axes , labels = labels )
90
+ return DataVariable (name = var , values = values , attributes = attributes , axes = axes , cdf_type = cdf_type , labels = labels )
88
91
89
92
90
93
class ISTPLoaderImpl :
0 commit comments