docs: def generate_inflows_from_runoff(args):
      """
      prepare runoff inflow file for rapid
      """
      runoff_file_list = args[0]
      file_index_list = args[1]
      weight_table_file = args[2]
      grid_type = args[3]
      rapid_inflow_file = args[4]
      rapid_inflow_tool = args[5]
      mp_lock = args[6]
  
      time_start_all = datetime.utcnow()
  
      if not isinstance(runoff_file_list, list):
          runoff_file_list = [runoff_file_list]
      else:
          runoff_file_list = runoff_file_list
  
      if not isinstance(file_index_list, list):
          file_index_list = [file_index_list]
      else:
          file_index_list = file_index_list
      if runoff_file_list and file_index_list:
          # prepare ECMWF file for RAPID
          index_string = "Index: {0}".format(file_index_list[0])
          if len(file_index_list) > 1:
              index_string += " to {0}".format(file_index_list[-1])
          print(index_string)
          runoff_string = "File(s): {0}".format(runoff_file_list[0])
          if len(runoff_file_list) > 1:
              runoff_string += " to {0}".format(runoff_file_list[-1])
          print(runoff_string)
          print("Converting inflow ...")
          try:
              rapid_inflow_tool.execute(nc_file_list=runoff_file_list,
                                        index_list=file_index_list,
                                        in_weight_table=weight_table_file,
                                        out_nc=rapid_inflow_file,
                                        grid_type=grid_type,
                                        mp_lock=mp_lock)
          except Exception:
              # This prints the type, value, and stack trace of the
              # current exception being handled.
              traceback.print_exc()
              raise
  
          time_finish_ecmwf = datetime.utcnow()
          print("Time to convert inflows: {0}"
                .format(time_finish_ecmwf-time_start_all))