def load_config_file(params_file=None, verbose=False, dryrun=False):
    """
    Load the pysteps configuration file. The configuration parameters are available
    as a DotDictify instance in the `pysteps.rcparams` variable.

    Parameters
    ----------
    params_file: str
        Path to the parameters file to load. If `params_file=None`, it looks
        for a configuration file in the default locations.
    verbose: bool
        Print debugging information. False by default.
        This flag is overwritten by the silent_import=False in the
        pysteps configuration file.
    dryrun: bool
        If False, perform a dry run that does not update the `pysteps.rcparams`
        attribute.

    Returns
    -------
    rcparams: _DotDictify
        Configuration parameters loaded from file.
    """

    global rcparams

    if params_file is None:
        # Load default configuration
        params_file = config_fname()

        if params_file is None:
            warnings.warn(
                "pystepsrc file not found." + "The defaults parameters are left empty",
                category=ImportWarning,
            )

            _rcparams = dict()
            return

    with open(params_file, "r") as f:
        _rcparams = json.loads(jsmin(f.read()))

    if (not _rcparams.get("silent_import", False)) or verbose:
        print("Pysteps configuration file found at: " + params_file + "\n")

    with open(_get_config_file_schema(), "r") as f:
        schema = json.loads(jsmin(f.read()))
        validator = Draft4Validator(schema)

        error_msg = "Error reading pystepsrc file."
        error_count = 0
        for error in validator.iter_errors(_rcparams):
            error_msg += "\nError in " + "/".join(list(error.path))
            error_msg += ": " + error.message
            error_count += 1
        if error_count > 0:
            raise RuntimeError(error_msg)

    _rcparams = _DotDictify(_rcparams)

    if not dryrun:
        rcparams = _rcparams

    return _rcparams
Load the pysteps configuration file. The configuration parameters are available
as a DotDictify instance in the `pysteps.rcparams` variable.

Parameters
----------
params_file: str
Path to the parameters file to load. If `params_file=None`, it looks
for a configuration file in the default locations.
verbose: bool
Print debugging information. False by default.
This flag is overwritten by the silent_import=False in the
pysteps configuration file.
dryrun: bool
If False, perform a dry run that does not update the `pysteps.rcparams`
attribute.

Returns
-------
rcparams: _DotDictify
Configuration parameters loaded from file.
pysteps/__init__.py