/*pnegopc punch negative opacities on io unit, iff 'set negopc' command was given */ #include "cddefines.h" #include "opac.h" #include "rfield.h" #include "pnegopc.h" void pnegopc(void) { long int i; FILE *ioFile; # ifdef DEBUG_FUN fputs( "<+>pnegopc()\n", debug_fp ); # endif if( opac.lgNegOpacIO ) { /* option to punch negative opacities */ if( NULL==(ioFile=fopen("negopc.txt","w")) ) { fprintf( ioQQQ,"pnegopc could not open negopc.txt for writing\n"); puts( "[Stop in opac0]" ); exit(10); } for( i=0; i < rfield.nflux; i++ ) { fprintf( ioFile, "%10.2e %10.2e \n", rfield.anu[i], opac.opac[i] ); } fclose( ioFile); } # ifdef DEBUG_FUN fputs( " <->pnegopc()\n", debug_fp ); # endif return; }