def add_external(self):
        """ add external (existing) template files and instrution files to the
        Pst instance

        """
        if self.external_tpl_in_pairs is not None:
            if not isinstance(self.external_tpl_in_pairs,list):
                external_tpl_in_pairs = [self.external_tpl_in_pairs]
            for tpl_file,in_file in self.external_tpl_in_pairs:
                if not os.path.exists(tpl_file):
                    self.logger.lraise("couldn't find external tpl file:{0}".\
                                       format(tpl_file))
                self.logger.statement("external tpl:{0}".format(tpl_file))
                shutil.copy2(tpl_file,os.path.join(self.m.model_ws,
                                                   os.path.split(tpl_file)[-1]))
                if os.path.exists(in_file):
                    shutil.copy2(in_file,os.path.join(self.m.model_ws,
                                                   os.path.split(in_file)[-1]))

        if self.external_ins_out_pairs is not None:
            if not isinstance(self.external_ins_out_pairs,list):
                external_ins_out_pairs = [self.external_ins_out_pairs]
            for ins_file,out_file in self.external_ins_out_pairs:
                if not os.path.exists(ins_file):
                    self.logger.lraise("couldn't find external ins file:{0}".\
                                       format(ins_file))
                self.logger.statement("external ins:{0}".format(ins_file))
                shutil.copy2(ins_file,os.path.join(self.m.model_ws,
                                                   os.path.split(ins_file)[-1]))
                if os.path.exists(out_file):
                    shutil.copy2(out_file,os.path.join(self.m.model_ws,
                                                   os.path.split(out_file)[-1]))
                    self.logger.warn("obs listed in {0} will have values listed in {1}"
                                     .format(ins_file,out_file))
                else:
                    self.logger.warn("obs listed in {0} will have generic values")
def add_external ( self ) : if self . external_tpl_in_pairs is not None : if not isinstance ( self . external_tpl_in_pairs , list ) : external_tpl_in_pairs = [ self . external_tpl_in_pairs ] for tpl_file , in_file in self . external_tpl_in_pairs : if not os . path . exists ( tpl_file ) : self . logger . lraise ( "couldn't find external tpl file:{0}" . format ( tpl_file ) ) self . logger . statement ( "external tpl:{0}" . format ( tpl_file ) ) shutil . copy2 ( tpl_file , os . path . join ( self . m . model_ws , os . path . split ( tpl_file ) [ - 1 ] ) ) if os . path . exists ( in_file ) : shutil . copy2 ( in_file , os . path . join ( self . m . model_ws , os . path . split ( in_file ) [ - 1 ] ) ) if self . external_ins_out_pairs is not None : if not isinstance ( self . external_ins_out_pairs , list ) : external_ins_out_pairs = [ self . external_ins_out_pairs ] for ins_file , out_file in self . external_ins_out_pairs : if not os . path . exists ( ins_file ) : self . logger . lraise ( "couldn't find external ins file:{0}" . format ( ins_file ) ) self . logger . statement ( "external ins:{0}" . format ( ins_file ) ) shutil . copy2 ( ins_file , os . path . join ( self . m . model_ws , os . path . split ( ins_file ) [ - 1 ] ) ) if os . path . exists ( out_file ) : shutil . copy2 ( out_file , os . path . join ( self . m . model_ws , os . path . split ( out_file ) [ - 1 ] ) ) self . logger . warn ( "obs listed in {0} will have values listed in {1}" . format ( ins_file , out_file ) ) else : self . logger . warn ( "obs listed in {0} will have generic values" )
add external (existing) template files and instrution files to the
        Pst instance