docs: def run(self, rapid_namelist_file=""):
          """
          Run RAPID program and generate file based on inputs
          This will generate your rapid_namelist file and run RAPID from wherever
          you call this script (your working directory).
  
          Parameters
          ----------
          rapid_namelist_file: str, optional
              Path of namelist file to use in the simulation.
              It will be updated with any parameters added to the RAPID manager.
  
  
          Linux Example:
  
          .. code:: python
  
              from RAPIDpy import RAPID
  
              rapid_manager = RAPID(
                  rapid_executable_location='~/work/rapid/src/rapid'
                  use_all_processors=True,
              )
  
              rapid_manager.update_parameters(
                  rapid_connect_file='../rapid-io/input/rapid_connect.csv',
                  Vlat_file='../rapid-io/input/m3_riv.nc',
                  riv_bas_id_file='../rapid-io/input/riv_bas_id.csv',
                  k_file='../rapid-io/input/k.csv',
                  x_file='../rapid-io/input/x.csv',
                  Qout_file='../rapid-io/output/Qout.nc',
              )
  
              rapid_manager.update_reach_number_data()
              rapid_manager.update_simulation_runtime()
              rapid_manager.run(
                  rapid_namelist_file='../rapid-io/input/rapid_namelist')
  
  
          Linux Reservoir Forcing Flows Example:
  
          .. code:: python
  
              from RAPIDpy import RAPID
  
              rapid_manager = RAPID(
                  rapid_executable_location='~/work/rapid/src/rapid',
                  num_processors=4,
                  IS_for_tot=4,
                  IS_for_use=4,
                  for_tot_id_file='../rapid-io/input/dam_id.csv',
                  for_use_id_file='../rapid-io/input/dam_id.csv',
                  Qfor_file='../rapid-io/input/qout_dams.csv',
                  ZS_dtF=86400,
                  BS_opt_for=True,
              )
  
              rapid_manager.run(
                  rapid_namelist_file='../rapid-io/input/rapid_namelist_regular')
  
          Windows with Cygwin Example:
  
          .. code:: python
  
              from RAPIDpy import RAPID
              from os import path
  
              rapid_exe_path = 'C:/cygwin64/home/username/rapid/run/rapid',
              rapid_manager = RAPID(
                  rapid_executable_location=rapid_exe_path,
                  cygwin_bin_location='C:/cygwin64/bin',
                  use_all_processors=True,
                  ZS_TauR=24*3600,
                  ZS_dtR=15*60,
                  ZS_TauM=365*24*3600,
                  ZS_dtM=24*3600
              )
  
              rapid_input = 'C:/cygwin64/home/username/rapid-io/input'
              rapid_output = 'C:/cygwin64/home/username/rapid-io/output'
              rapid_manager.update_parameters(
                  rapid_connect_file=path.join(rapid_input, 'rapid_connect.csv'),
                  Vlat_file=path.join(rapid_input, 'm3_riv.nc'),
                  riv_bas_id_file=path.join(rapid_input, 'riv_bas_id.csv'),
                  k_file=path.join(rapid_input, 'k.csv'),
                  x_file=path.join(rapid_input, 'x.csv'),
                  Qout_file=path.join(rapid_output, 'Qout.nc'),
              )
  
              rapid_manager.update_reach_number_data()
              rapid_manager.update_simulation_runtime()
              rapid_manager.run()
          """
          if not self._rapid_executable_location:
              log("Missing rapid_executable_location. "
                  "Please set before running this function ...",
                  "ERROR")
  
          time_start = datetime.datetime.utcnow()
          temp_rapid_namelist_file = os.path.join(os.getcwd(), "rapid_namelist")
  
          if not rapid_namelist_file or not os.path.exists(rapid_namelist_file):
              # generate input file if it does not exist
              self.generate_namelist_file(temp_rapid_namelist_file)
          else:
              # update existing file
              self.update_namelist_file(rapid_namelist_file,
                                        temp_rapid_namelist_file)
  
          local_rapid_executable_location = \
              os.path.join(os.path.dirname(temp_rapid_namelist_file),
                           "rapid_exe_symlink")
  
          def rapid_cleanup(*args):
              """
              Cleans up the rapid files generated by the process
              """
              for arg in args:
                  # remove files
                  try:
                      os.remove(arg)
                  except OSError:
                      pass
  
          # create link to RAPID if needed
          temp_link_to_rapid = ""
          # pylint: disable=no-member
          if self._rapid_executable_location != \
                  local_rapid_executable_location:
              rapid_cleanup(local_rapid_executable_location)
              if os.name == "nt":
                  self._create_symlink_cygwin(self._rapid_executable_location,
                                              local_rapid_executable_location)
              else:
                  os.symlink(self._rapid_executable_location,
                             local_rapid_executable_location)
              temp_link_to_rapid = local_rapid_executable_location
  
          # run RAPID
          log("Running RAPID ...",
              "INFO")
          if os.name == "nt":
              local_rapid_executable_location = \
                  self._get_cygwin_path(local_rapid_executable_location)
  
          # htcondor will not allow mpiexec for single processor jobs
          # this was added for that purpose
          run_rapid_command = [local_rapid_executable_location,
                               "-ksp_type", self._ksp_type]
  
          if self._num_processors > 1:
              run_rapid_command = [self._mpiexec_command,
                                   "-n", str(self._num_processors)] \
                                  + run_rapid_command
  
          process = Popen(run_rapid_command,
                          stdout=PIPE, stderr=PIPE, shell=False)
          out, err = process.communicate()
          if err:
              rapid_cleanup(temp_link_to_rapid, temp_rapid_namelist_file)
              raise Exception(err)
          else:
              log('RAPID output:',
                  "INFO")
              for line in out.split(b'\n'):
                  print(line)
          rapid_cleanup(temp_link_to_rapid, temp_rapid_namelist_file)
          log("Time to run RAPID: %s" % (datetime.datetime.utcnow()-time_start),
              "INFO")