Source code for pycif.plugins.models.iconart.io.outputs2native_adj

from .inputs.obs import make_obs


[docs] def outputs2native_adj( self, data2dump, input_type, di, df, runsubdir, mode="fwd", onlyinit=False, do_simu=True, check_transforms=False, **kwargs ): """Dumps and/or save information about outputs, so the model knows where to extract information. In the present template, observations are simply saved for later use by ``outputs2native``. If the model needs information to extract concentration on-the-fly, the information in ``data2dump`` should be used. In particular, the columns ``i`` and ``j`` are the row and columns of each observation in the domain. The column ``tstep`` indicates on which time stamp the observation spans, relative to what is indicated in the variable ``output_intervals`` in ``ini_mapper``. The function is called by ``loadfromoutputs.adjoint``. Args: self: the model itself data2dump (dict): a dictionary with concentration data for each component/tracer input_type (str): the type of model outputs to be processed; this information is redundant with the components of the data2dump dictionary di (datetime.datetime): starting date of the present sub-simulation df (datetime.datetime): ending date of the present sub-simulation runsubdir (str): path to the present sub-simulation work directory mode (str): running mode; one of "fwd", "tl" and "adj" onlyinit (bool): if ``True``, means that the function is called during the initialization process of the observation vector do_simu (bool): if ``False``, means that the observation vector is retrieving information from a previous existing run; in that case, it may not be necessary to dump files """ ddi = min(di, df) for trid in data2dump: mod_input = trid[0] trcr = trid[1] if mod_input != "endconcs": if onlyinit: make_obs(self, ddi, data2dump[trid][ddi], runsubdir, "fwd", trcr, input_type, do_simu)