/*cdGett get input parameters from Cloudy header and predictions from body out output, * used when analyzing stored output * parameters are not converted from logs, results of this * routine are as they appear on the header */ /* NB this routine is seldom used anymore since it is so easy to compute * models on the fly and pull results directly with cdLine. This routine * may be removed someday. */ #include #include "cddefines.h" #include "mean.h" #include "linesave.h" struct t_getpar { float gethdn, getflx, getu, gthcol, getbbt, getaox, getpl[3], gettrb, gettab, getagn[2], getradius; float gttaue; } getpar; #include "cap4.h" #include "ffmtread.h" #include "lgmatch.h" #include "cddrive.h" int cdGett( /* ioIN is a previously opened file pointer*/ FILE * ioIN) /* return value will be set true if we hit eof, more models later if false*/ { char chCard[200], chKey[5]; int lgDone, lgEOL; long int i, n, ierr, n0; static int lgFirstTime=TRUE; # ifdef DEBUG_FUN fputs( "<+>cdGett()\n", debug_fp ); # endif /* this routine reads the output generated with the * punch results command * if parameter was not entered then zero set * * these are the parameters which may be read off the input stream * all must be initialized here */ if( lgFirstTime ) { /* this is the large main line array */ if( (LineSv=(LinSv *)malloc((unsigned)300000*sizeof( LinSv ) ) ) == NULL ) { fprintf( ioQQQ, "StartIter could not allocate space for LineSave.nsum array, needed %li\n", LineSave.nsum ); puts( "[Stop in StartIter]" ); exit(1); } lgFirstTime = FALSE; } /* zero out ionization array for safely */ for(n=0; n < LIMELM; n++) { for( i=0; icdGett()\n", debug_fp ); # endif return(FALSE); } else { # ifdef DEBUG_FUN fputs( " <->cdGett()\n", debug_fp ); # endif return(TRUE); } }