WRITEBINARY

Copyright (c) 2024 MPI-M, Clara Bayley

—– CLEO —– File: writebinary.py Project: pySD Created Date: Tuesday 7th May 2024 Author: Clara Bayley (CB) Additional Contributors: —– Last Modified: Tuesday 7th May 2024 Modified By: CB —– License: BSD 3-Clause “New” or “Revised” License https://opensource.org/licenses/BSD-3-Clause —– File Description:

pySD.writebinary.check_validinputs(data, ndata, datatypes, units, scale_factors)[source]

‘ check that each variable’s scale_factor is a double, unit is a binary encoded single character and that the dataype given matches the type of the data

pySD.writebinary.writebinary(filename, data, ndata, datatypes, units, scale_factors, metastr)[source]

‘data’ is 1D array containing continuous list of variables. The number of data points of each variable is give by it’s index in ‘ndata’, likewise it’s datatype, unit and scale_factor are in those lists. ‘data’ is written to binary file with this metadata beforehand and a global metadata string explaingnig how to interpret the file