Skip to content

Commit

Permalink
Merge pull request #3 from gantian127/hotfix
Browse files Browse the repository at this point in the history
fix bug for variable dtype when there is scale factor(float)
  • Loading branch information
gantian127 committed Oct 20, 2021
2 parents fa63241 + f7c2503 commit ec8c1d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bmi_era5/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_var_info(self):

var_info[var.long_name] = {
'var_name': var_name,
'dtype': str(var.dtype),
'dtype': type(var.scale_factor).__name__ if 'scale_factor' in var.attrs.keys() else str(var.dtype),
'itemsize': var.values.itemsize,
'nbytes': var.values[0].nbytes, # current time step nbytes
'units': var.units,
Expand Down

0 comments on commit ec8c1d4

Please sign in to comment.