@@ -68,5 +68,19 @@ To setup such a function, special arguments in the dictionnary can be used:
~preprocess_finder~ should be a callable that takes in the dataset to process, the corresponding filename, and the finder object, and it should return a dataset.
The ~preprocess_finder_args~ and ~preprocess_finder_kwargs~ members are passed as additionnal arguments to this callable.
* Metadata on creation
It is useful to know when and how the datafiles originated.
To this end, the function ~lib.setup_metadata~ can be used.
It adds to a dataset various global attributes:
- ~"created_with"~: The name of the script, and the machine hostname
- ~"created_with_args"~: The args dictionnary as a string
- ~"created_on"~: The date and time of file creation
- ~"created_on_commit"~: The hash of the current commit/HEAD
#+begin_src python
lib.setup_metadata(ds, args)
ds.to_netcdf(ofile, ds)
#+end_src
* Zones
We define some static 'zones', this dataset is quite special and have its own doc [[file:zones.org][here]].