24 name =
"Example-03-python.hdf5",
25 mode = ioda.Engines.BackendCreateModes.Truncate_If_Exists)
41 intvar1 = g.vars.create(name=
'var-1', dtype=ioda.Types.int32, dimsCur=[2,3])
43 intvar1.writeVector.int32([1,2,3,4,5,6])
47 var2 = g.vars.create(name=
'var-2', dtype=ioda.Types.float, dimsCur=[2,3,4])
48 var2.writeVector.float([1.1,2.2,3.14159,4,5,6,7,8,9,10,11.5,12.6,13,14,15,16,17,18,19,20,21,22,23,24])
72 p1.setFillValue.int32(-999)
74 g.vars.create(name=
'var-3', dtype=ioda.Types.int32, dimsCur=[200,3], dimsMax=[2000,3], params=p1)
81 if len(g.vars.list()) > 5:
82 raise Exception(
"Way too many variables were created.")
84 if g.vars.exists(
'var-2') ==
False:
85 raise Exception(
"Missing var-2")
88 g.vars.create(
'removable-int', ioda.Types.int32, [1])
89 g.vars.remove(
'removable-int')
92 reopened_v3 = g.vars.open(
'var-3')
98 if reopened_v3.isA2(dtype=ioda.Types.float) ==
True:
99 raise Exception(
"var-3 should be a set of int32s, not single-precision floats!")
104 vals2 = var2.readVector.float()
IODA_DL Group createFile(const std::string &filename, BackendCreateModes mode, HDF5_Version_Range compat=defaultVersionRange())
Create a ioda::Group backed by an HDF5 file.
Used to specify Variable creation-time properties.