run_functions_old ================= .. py:module:: run_functions_old Functions --------- .. autoapisummary:: run_functions_old.prepare_input Module Contents --------------- .. py:function:: prepare_input(uarr, input_config, output_metadata, split_year=2019, stage=1) Prepare the input data for the model. Get the training data from the input NetCDF dataset as numpy arrays and concatenate them along the time dimension. :param uarr: The dataset of the input NetCDF file. :type uarr: `unox.uarray` :param input_config: Path to the input configuration JSON file or a dictionary containing the configuration. :type input_config: `str` or `dict` :param output_metadata: The dictionary of metadata describing the output of a model run. :type output_metadata: `dict` :param split_year: The year at which to split the training and validation data. Defaults to 2019. :type split_year: `int`, optional :param stage: The stage of the data to plot (1 or 2). :type stage: `int`, optional :returns: * **xtrain** (`np.ndarray`) -- Concatenated training input features. * **ytrain** (`np.ndarray`) -- Concatenated training target variables. * **output_metadata** (`dict`) -- The dictionary of metadata describing the output of a model run with values added for `train_years` and `unet_build_shape`.