Source code for pycif.plugins.models.template.io.native2inputs

from logging import debug


[docs] def native2inputs( self, datastore, input_type, datei, datef, runsubdir, mode="fwd", onlyinit=False, do_simu=True, check_transforms=False, **kwargs ): """Converts data at the model data resolution stored in ``datastore`` to model compatible input files. Native2inputs will be called for every couple ``component/tracer`` as defined in the ``mapper`` Args: self: the model Plugin input_type (str): the ``component`` name to be treated; please note that this information is redundant with the keys in ``datastore`` datastore: data to convert datei, datef: date interval of the sub-simulation mode (str): running mode: one of 'fwd', 'adj' and 'tl' runsubdir (str): sub-directory for the current simulation workdir (str): the directory of the whole pyCIF simulation Note: The format of ``datastore`` is a mixture of the model ``mapper`` and of the data format as defined :doc:`here </documentation/plugins/transforms/index>` For each component/tracer, the data itself is stored in the key ``data``, and all the other keys come from the ``mapper``, in case they are useful to dump inputs at the correct format Note: If the input data was fully consistent with what the model expects, the data itself is not read by pyCIF. Instead, it is possible to directly link files defined by the key ``input_files`` (and defined in the ``fetch`` function of the corresponding ``flux`` plugin). """ debug("Native2inputs will dump the following data to runsubdir ({}):\n" "{}".format(runsubdir, datastore)) return