clouddrift.adapters.gdp.cast_float64_variables_to_float32

clouddrift.adapters.gdp.cast_float64_variables_to_float32#

clouddrift.adapters.gdp.cast_float64_variables_to_float32(ds: Dataset, variables_to_skip: list[str] = ['time', 'lat', 'lon']) Dataset[source]#

Cast all float64 variables except variables_to_skip to float32. Extra precision from float64 is not needed and takes up memory and disk space.

Parameters#

dsxr.Dataset

Dataset to modify

variables_to_skiplist[str]

List of variables to skip; default is [“time”, “lat”, “lon”].

Returns#

dsxr.Dataset

Modified dataset