/*************************************************************************
  Program:     display.c
  --------
  Description:	Write output data to an output file.
***************************************************************************
  CCRS (EMS/Applications Division)
  Written by:   J. Liu
  Modified for application to China  by:  Gang Mo
  Last update:	Spet. 2008
*****************************************************************************/
	
#include"beps.h"
   
void display(outf_name,out,rcode)
  float *out;
  char outf_name[255];
  int short *rcode;
  {
   FILE *outfile;   

  int size,nelems;
 
  
  if ((outfile=fopen(outf_name, "a+b"))== NULL)
    {
     printf("\n Unable to open file <%s>,  exitting program ...\n\n",
                                                outf_name);
     *rcode = ERROR;
    }
  
  fwrite(&out[0],size=4,nelems=npixels,outfile);
  fclose(outfile);
  }

