The script below puts arbitrary data into a CIF monitor file.

 1import pandas as pd
 2import numpy as np
 3from pycif.utils.datastores.dump import dump_datastore, read_datastore
 4from pycif.utils.datastores.empty import init_empty
 5
 6# Initializes an empty datastore
 7ds = init_empty()
 8
 9# Generate arbitrary data
10ds["date"] = pd.date_range("2019-01-01", "2019-02-01", freq="6H")
11ds.loc[:, "station"] = "JFJ"
12ds.loc[:, "network"] = "test"
13ds.loc[:, "parameter"] = "CH4"
14ds.loc[:, "lon"] = 7.99
15ds.loc[:, "lat"] = 46.55
16ds.loc[:, "alt"] = 3590
17ds.loc[:, "obs"] = np.random.normal(1900, 20, size=len(ds))
18ds.loc[:, "obserror"] = np.abs(np.random.normal(0, 20, size=len(ds)))
19ds.loc[:, "duration"] = 1
20
21# Dump the datastore
22dump_datastore(ds, "monitor.nc")
23
24# Checking the consistency of the datastore when reading
25ds2 = read_datastore("monitor.nc")
26