60 " Hit EOF while reading line list; use END to end list.\n" );
66 while( p.
strcmp(
"END") != 0 )
71 " Too many lines have been entered; the limit is %ld. Increase variable NPUNLM in routine save_line.\n",
85 fprintf(
ioQQQ,
" Hit EOF while reading line list; use END to end list.\n" );
91 sprintf( chHeader,
"depth");
94 sprintf( chTemp,
"\t%s ",
chPLab[i] );
95 strcat( chHeader, chTemp );
97 strcat( chHeader, chTemp );
99 strcat( chHeader,
"\n" );
108 long int nCdLineReturn;
118 if( strcmp(chDo,
"PUNS") == 0 )
121 static bool lgMustGetLines=
true,
124 static bool lgBadH2Line;
136 if(
nzone <= 1 && lgMustGetLines )
139 &emiss,lgEmergent)) <= 0 )
142 if( !
h2.lgEnabled && strncmp(
chPLab[i] ,
"H2 " , 4 )==0 )
144 static bool lgMustPrintFirstTime =
true;
145 if( lgMustPrintFirstTime )
148 fprintf(
ioQQQ,
"\nPROBLEM Did not find an H2 line, the large model is not "
149 "included, so I will ignore it. Log intensity set to -30.\n" );
150 fprintf(
ioQQQ,
"I will totally ignore any future missed H2 lines\n\n");
151 lgMustPrintFirstTime =
false;
159 fprintf(
ioQQQ,
" save_line could not find line: %s %f\n",
171 (
ipLine[i]<0&&!lgMustGetLines) );
188 lgMustGetLines =
false;
191 fprintf( ioPUN,
"%.5e",
radius.depth_mid_zone );
197 fprintf( ioPUN,
"\t%.4f", log10(
MAX2(
SMALLFLOAT , dlum[i] ) ) );
200 fprintf( ioPUN,
"\n" );
203 else if( strcmp(chDo,
"PUNC") == 0 )
206 fprintf( ioPUN,
"%.5e",
radius.depth_mid_zone );
217 &relint,&absint,lgEmergent);
225 if( nCdLineReturn<=0 )
228 if( !
h2.lgEnabled && strncmp(
chPLab[i] ,
"H2 " , 4 )==0 )
230 static bool lgMustPrintFirstTime =
true;
231 if( lgMustPrintFirstTime )
234 fprintf(
ioQQQ,
"Did not find an H2 line, the large model is not "
235 "included, so I will ignore it. Log intensity set to -30.\n" );
236 fprintf(
ioQQQ,
"I will totally ignore any future missed H2 lines\n");
237 lgMustPrintFirstTime =
false;
246 fprintf(
ioQQQ,
" save_line could not fine line: %s %f\n",
255 fprintf( ioPUN,
"\t%.4e", a[i] );
258 fprintf( ioPUN,
"\n" );
264 " unrecognized key for save_line=%4.4s\n",
273 {LONG_MIN , LONG_MIN ,LONG_MIN , LONG_MIN ,LONG_MIN ,
274 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
276 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
277 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
279 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
280 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
282 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
283 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN },
285 {LONG_MIN , LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,
286 LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN ,LONG_MIN };
309 " Hit EOF while reading line list; use END to end list.\n" );
317 fprintf(
ioQQQ,
" PUNCH RT has too many lines - increase LIMLINE in save_line.cpp\n");
331 " there must be five numbers on this line\n");
345 " Save_Line_RT hit end of file looking for END of RT lines\n");
359 static char chLabel[
LIMLINE][30];
363 fprintf( ioPUN ,
"Line\tP(con,inc)\tAul\tgl\tgu\n");
364 for( n=0; n<
nLine; ++n )
368 sprintf( chLabel[n] ,
"%s ",
370 fprintf( ioPUN ,
"%s ", chLabel[n] );
371 fprintf( ioPUN ,
"%.4e ",
373 fprintf( ioPUN ,
"%.4e ",
375 fprintf( ioPUN ,
"%.0f ",
377 fprintf( ioPUN ,
"%.0f ",
379 fprintf( ioPUN ,
"\n");
385 " PunchLine_RT only H, He like allowed for now\n");
389 fprintf( ioPUN ,
"Line\tTauIn\tPopLo\tPopHi\tCul\tk(line)\tk(con,abs)\tk(con,scat)\n");
393 fprintf(ioPUN,
"RADIUS\t%e\tDEPTH\t%e\tTe\t%e\tNe\t%e\n",
398 for( n=0; n<
nLine; ++n )
403 long int ipCont = tr.
ipCont();
404 fprintf( ioPUN ,
"%s ", chLabel[n] );
405 fprintf( ioPUN ,
"\t%e\t%e\t%e",
410 fprintf( ioPUN ,
"\t%e",
414 fprintf( ioPUN ,
"\t%e\t%e\t%e\n",
416 opac.opacity_abs[ipCont-1] ,
417 opac.opacity_sct[ipCont-1]
const int INPUT_LINE_LENGTH
#define DEBUG_ENTRY(funcname)
long int cdEmis(char *chLabel, realnum wavelength, double *emiss)
void cdEmis_ip(long int ipLine, double *emiss, bool lgEmergent)
long int cdLine(const char *chLabel, realnum wavelength, double *relint, double *absint)
realnum ColUL(const ColliderList &colls) const
bool nMatch(const char *chKey) const
int strcmp(const char *s2)
void getLineID(char *LabelBuf, realnum *wave)
int PrintLine(FILE *fp) const
CollisionProxy Coll() const
qList::iterator Lo() const
qList::iterator Hi() const
EmissionList::reference Emis() const
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
t_iso_sp iso_sp[NISO][LIMELM]
static realnum * wavelength
void sprt_wl(char *chString, realnum wl)
void Parse_Save_Line_RT(Parser &p)
static long int line_RT_ipHi[LIMLINE]
static long int line_RT_ipLo[LIMLINE]
void parse_save_line(Parser &p, bool lgLog3, char *chHeader)
static long int nLinesEntered
static bool lgMustPrintHeader
static char chPLab[NPUNLM][5]
void Save_Line_RT(FILE *ioPUN)
static long int line_RT_nelem[LIMLINE]
static long int line_RT_ipISO[LIMLINE]
static long int line_RT_type[LIMLINE]
void save_line(FILE *ioPUN, const char *chDo, bool lgEmergent)
static bool lgRelativeIntensity
char * chLineLbl(const TransitionProxy &t)