How to implement a new model¶
In the CIF, a given numerical model has two main components:
- a black-box:
it includes physical, chemical, transport processes, etc.; in most cases it is an executable compiled from Fortran or C sources; it computes outputs (concentration fields, footprints, etc.) from prescribed inputs (fluxes, meteorological fields, boundary conditions, etc.)
- a Python interface to the model:
it produces the model inputs, reads the outputs and runs the executable properly.
The Python interface to a model is implemented as a pyCIF
Prior to starting to implement your model, please make sure you have the following elements:
a working version of your model (compilable sources), in forward mode, and if applicable in adjoint and tangent-linear modes
a test directory with compatible inputs and outputs for your model
(optional) an observation file you use to compare with your model; it is also possible to generate random observations with pyCIF
In the following, you will learn how to implement a model to pyCIF step-by-step.
- Include the model sources to the CIF
- Create and register the plugin module
- Create a domain for your model
- Define the “mapper” of your model