32 if(
nMatch(
"OPAC",chCard) )
34 fprintf(
ioQQQ,
"The COMPILE OPACITIES command is currently not supported\n" );
58 "Success!! Created file opacity.opc\nMake sure this is on the path.\n" );
95 if(
nMatch(
"GRAI",chCard) )
110 if( strchr( chCard,
'\"' ) != NULL )
113 if( strstr(chRead,
".rfi") != NULL || strstr(chRead,
".mix") != NULL )
115 strcpy(chRFI,chRead);
117 else if( strstr(chRead,
".szd") != NULL )
119 strcpy(chSZD,chRead);
123 fprintf(
ioQQQ,
" filename %s has unknown extension, sorry\n" , chRead );
129 if( strchr( chCard,
'\"' ) != NULL )
132 if( strstr(chRead,
".rfi") != NULL || strstr(chRead,
".mix") != NULL )
134 strcpy(chRFI,chRead);
136 else if( strstr(chRead,
".szd") != NULL )
138 strcpy(chSZD,chRead);
142 fprintf(
ioQQQ,
" filename %s has unknown extension, sorry\n" , chRead );
148 if( chRFI[0] ==
'\0' )
151 if( (ptr = strstr(chCard,
"AC1-")) != NULL )
154 strcpy(chRFI ,
"ac1-amcarb.rfi" );
158 else if( (ptr = strstr(chCard,
"BE1-")) != NULL )
161 strcpy(chRFI ,
"be1-amcarb.rfi" );
165 else if(
nMatch(
"GRAP" , chCard ) )
168 strcpy(chRFI ,
"graphite.rfi" );
170 else if(
nMatch(
"SILI" , chCard ) )
173 strcpy(chRFI ,
"silicate.rfi" );
175 else if(
nMatch(
" PAH" , chCard ) )
178 strcpy(chRFI ,
"pah1.rfi" );
180 else if(
nMatch(
"GREY" , chCard ) ||
nMatch(
"GRAY" , chCard ))
182 strcpy(chRFI ,
"grey.rfi" );
187 if( chSZD[0] ==
'\0' )
190 if( (ptr = strstr(chCard,
"0M010")) != NULL )
192 strcpy(chSZD ,
"0m010.szd" );
196 else if( (ptr = strstr(chCard,
"0M100")) != NULL )
198 strcpy(chSZD ,
"0m100.szd" );
202 else if( (ptr = strstr(chCard,
"1M000")) != NULL )
204 strcpy(chSZD ,
"1m000.szd" );
208 else if(
nMatch(
"ORIO" , chCard ) )
210 strcpy(chSZD ,
"orion.szd" );
212 else if(
nMatch(
" ISM" , chCard ) )
214 strcpy(chSZD ,
"ism.szd" );
216 else if( (ptr = strstr(chCard,
"AB08")) != NULL )
219 strcpy(chSZD ,
"ab08.szd" );
222 else if( (ptr = strstr(chCard,
"0N341")) != NULL )
225 strcpy(chSZD ,
"0n341.szd" );
228 else if( (ptr = strstr(chCard,
"0N682")) != NULL )
231 strcpy(chSZD ,
"0n682.szd" );
238 if( chRFI[0] ==
'\0' && chSZD[0] !=
'\0' )
240 fprintf(
ioQQQ,
"Sorry, but I did not recognize a refractive index file.\n");
241 fprintf(
ioQQQ,
"Supply a file name between quotes or one of the following ");
242 fprintf(
ioQQQ,
"keywords: ac1-amcarb, be1-amcarb, graphite, silicate, grey, pah\n");
246 if( chSZD[0] ==
'\0' && chRFI[0] !=
'\0' )
248 fprintf(
ioQQQ,
"Sorry, but I did not recognize a size distribution file.\n");
249 fprintf(
ioQQQ,
"Supply a file name between quotes or one of the following ");
250 fprintf(
ioQQQ,
"keywords: 0m010, 0m100, 1m000, ism, orion, on341, 0n682, ab08\n");
255 if( chRFI[0] ==
'\0' && chSZD[0] ==
'\0' )
329 fprintf(
ioQQQ,
"Number of bins must be positive. Sorry.\n");
337 "Success!! Created grain opacity file(s).\nMake sure this directory is on the path.\n" );
342 else if(
nMatch(
"RECO",chCard) &&
nMatch(
"COEF",chCard) )
347 if(
nMatch(
"H-LI",chCard) )
349 else if(
nMatch(
"HE-L",chCard) )
353 fprintf(
ioQQQ,
"Sorry, but I did not recognize an iso sequence.\n");
354 fprintf(
ioQQQ,
"The available options are H-like and He-like.\nSorry.\n");
363 for( nelem = ipISO; nelem <
LIMELM; nelem++)
380 else if(
nMatch(
"GAUN",chCard) )
386 else if(
nMatch(
"STAR",chCard) )
388 bool lgProblems =
false;
407 if( ( ptr = strstr( chRead,
"." ) ) != NULL )
409 if( strncmp( ptr,
".asc", 4 ) == 0 )
413 else if( strncmp( ptr,
".stb", 4 ) == 0 )
422 fprintf(
ioQQQ,
" I did not recognize this file extension: %s\n", ptr );
428 fprintf(
ioQQQ,
" I did not find any file extension: %s\n", chRead );
466 fprintf(
ioQQQ,
"\n PROBLEM - No ascii files were found!\n" );
467 fprintf(
ioQQQ,
" Did you change directory to where the stellar atmosphere files are?\n" );
468 fprintf(
ioQQQ,
" This command will only work on files in the local directory. Sorry.\n" );
473 fprintf(
ioQQQ,
"\n %d ascii file(s) found", pc.
nFound );
477 fprintf(
ioQQQ,
", %d update(s) OK", pc.
nOK );
479 fprintf(
ioQQQ,
", %d update(s) failed", pc.
nFail );
482 fprintf(
ioQQQ,
", %d file(s) skipped after failure", nSkip );
483 fprintf(
ioQQQ,
".\n" );
489 fprintf(
ioQQQ,
"\n Problems occurred during the compilation - check output.\n" );
493 fprintf(
ioQQQ,
"\n The compilation was successful!\n" );
495 " The portable ascii files are no longer needed and may be deleted to save space.\n" );
496 fprintf(
ioQQQ,
"\n Good Luck!!\n\n\n" );
503 fprintf(
ioQQQ,
" One of the keywords, GRAINS, HE-LIKE, GAUNT, or STARS, must appear.\n" );
504 fprintf(
ioQQQ,
" Sorry.\n" );