/*ParseCoronal parse parameters off coronal equilibrium command */ #include #include "cddefines.h" #include "incidspec.h" #include "forcte.h" #include "tseton.h" #include "radius.h" #include "ffmtread.h" #include "lgmatch.h" #include "parse.h" void ParseCoronal(char *chCard, long int *nqh, float *ar1) { int lgEOL; long int i; double a; # ifdef DEBUG_FUN fputs( "<+>ParseCoronal()\n", debug_fp ); # endif /* coronal equilibrium; set constant temperature to number on line */ tseton.lgTSetOn = TRUE; i = 5; a = FFmtRead(chCard,&i,76,&lgEOL); if( lgEOL ) { fprintf( ioQQQ, " There should be a temperature on this line.\n" ); puts( "[Stop in ParseCoronal]" ); exit(1); } /* numbers less than or equal to 10 are the log of the temperature */ if( a <= 10. && !lgMatch("LINE",chCard) ) { forcte.ForceTemp = (float)pow(10.,a); } else { forcte.ForceTemp = (float)a; } if( forcte.ForceTemp < 3. ) { fprintf( ioQQQ, " TE<3K, reset to 3K.\n" ); forcte.ForceTemp = 3.; } /* now simulate a BREMS line */ IncidSpec.nspec += 1; if( IncidSpec.nspec > LIMSPC ) { /* too many continua were entered */ fprintf( ioQQQ, " Too many continua entered; increase LIMSPC\n" ); puts( "[Stop in ParseCoronal]" ); exit(1); } strcpy( spnorm.chSpType[IncidSpec.nspec-1], "BREMS" ); IncidSpec.slope[IncidSpec.nspec-1] = 1e8; IncidSpec.cutoff[0][IncidSpec.nspec-1] = 0.; IncidSpec.cutoff[1][IncidSpec.nspec-1] = 0.; /* simulate an ionization parameter line */ *nqh += 1; if( *nqh > LIMSPC ) { /* too many continua were entered */ fprintf( ioQQQ, " Too many continua entered; increase LIMSPC\n" ); puts( "[Stop in ParseCoronal]" ); exit(1); } strcpy( spnorm.chRSpec[*nqh-1], "SQCM" ); strcpy( spnorm.chSpNorm[*nqh-1], "IONI" ); /* >>chng 96 June 17, to stop mole network from crashing */ IncidSpec.totpow[*nqh-1] = -10.f; /* set R to large value if U specified but R is not */ if( radius.Radius == 0. ) { *ar1 = (float)radius.rdfalt; radius.Radius = pow(10.,*ar1); } # ifdef DEBUG_FUN fputs( " <->ParseCoronal()\n", debug_fp ); # endif return; }