import json


def load_sim_params(args, filename):
    """Load parameters from simulation input file.

    Args:
        args:
        filename:

    Returns:
        A dictionary that merges args with the loaded parameters.
    """
    with open(filename) as file:
        parms = json.load(file)

    parms["N"] = parms["Nfil"]
    parms["temp"] = parms["T"]

    return args | parms