@@ -39,11 +39,13 @@ def _get_axis(master_cdf: Driver, cdf: Driver, axis_var: str, data_var: str):
3939 if 'sig_digits' in master_cdf .variable_attributes (axis_var ): # cluster CSA trick :/
4040 return SupportDataVariable (name = axis_var , values = np .asarray (cdf .values (axis_var ), dtype = float ),
4141 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 )
4344 )
4445 return SupportDataVariable (name = axis_var , values = cdf .values (axis_var ),
4546 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 )
4749 )
4850 else :
4951 log .warning (
@@ -78,13 +80,14 @@ def _load_data_var(master_cdf: Driver, cdf: Driver, var: str) -> DataVariable or
7880 shape = cdf .shape (var )
7981 axes = _get_axes (master_cdf , cdf , var , shape )
8082 attributes = _get_attributes (master_cdf , cdf , var )
83+ cdf_type = cdf .cdf_type (var )
8184 labels = _get_labels (attributes )
8285 if len (axes ) == 0 :
8386 log .warning (f"{ ISTP_NOT_COMPLIANT_W } : { var } was marked as data variable but it has 0 support variable" )
8487 return None
8588 if None in axes or axes [0 ].values .shape [0 ] != shape [0 ]:
8689 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 )
8891
8992
9093class ISTPLoaderImpl :
0 commit comments