92 lgStop_not_enough_info;
116 for(
long int i=0; i <
LIMSPC; i++ )
133 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
140 "\"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
141 "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
142 fprintf(
ioQQQ,
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
145 "content=\"text/html; charset=UTF-8\" />\n");
156 "\n This is a beta release of Cloudy, and is intended for testing only.\n" );
158 "Please help make Cloudy better by posing problems or suggestions on http://tech.groups.yahoo.com/group/cloudy_simulations/.\n\n" );
171 fprintf(
ioQQQ,
"**************************************");
173 fprintf(
ioQQQ,
"**************************************\n");
399 sprintf(chDUMMY,
"abundances \"default.abn\"" );
404 sprintf( chDUMMY,
"abundances isotopes \"default-iso.abn\"" );
424 fprintf(
ioQQQ,
" Too many VARY lines entered; the limit is%4ld\n",
445 for (i=0; commands[i].
name != NULL; ++i)
450 if (commands[i].name == NULL)
463 fprintf(
ioQQQ,
"%23c***********************************************************************************\n\n\n\n",
' ' );
492 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
503 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
513 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
523 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
532 lgStop_not_enough_info =
false;
538 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density MUST be specified.\n" );
539 lgStop_not_enough_info =
true;
551 fprintf(
ioQQQ,
" PROBLEM DISASTER The SAVE XSPEC command cannot be combined with negative grid increments.\n" );
552 fprintf(
ioQQQ,
" PROBLEM DISASTER Please check your GRID commands.\n\n\n" );
578 fprintf(
ioQQQ,
" PROBLEM DISASTER No commands were entered - whats up?\n" );
587 fprintf(
ioQQQ,
" NOTE PROBLEM Due to the nature of the Sobolev approximation, it makes no sense to converge a windy model.\n" );
588 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off\n\n\n" );
600 fprintf(
ioQQQ,
" NOTE Case B is an artificial test, it makes no sense to converge this model.\n" );
601 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off.\n\n\n" );
612 fprintf(
ioQQQ,
" NOTE Specifying both a density power law and constant pressure is impossible.\n" );
621 fprintf(
ioQQQ,
" NOTE NO REEVALUATE IONIZATION can only be used with constant density.\n" );
622 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate ionization.\n\n" );
631 fprintf(
ioQQQ,
" NOTE NO REEVALUATE OPACITY can only be used with constant density.\n" );
632 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate opacity.\n\n" );
642 fprintf(
ioQQQ,
" NOTE Gravity from an external mass has been added, but no symmetry (spherical/mid-plane) was specified.\n" );
658 "NOTE The specified column density and hydrogen density correspond to a thickness of %.2e cm.\n",
661 "NOTE This seems large to me.\n");
662 fprintf(
ioQQQ,
"NOTE a very large radius may cause overflow.\n\n");
671 "NOTE The grain temperatures are set to a constant value with the "
672 "CONSTANT GRAIN TEMPERATURE command, but "
673 "energy exchange \n");
675 "NOTE is still included. The grain-gas heating-cooling will be incorrect. "
676 "Consider turning off gas-grain collisional energy\n");
678 "NOTE exchange with the NO GRAIN GAS COLLISIONAL ENERGY EXCHANGE command.\n\n\n");
685 fprintf(
ioQQQ,
" NOTE NO LINE TRANSER set but fine opacities still computed.\n" );
686 fprintf(
ioQQQ,
" NOTE Turning off fine opacities.\n\n" );
695 fprintf(
ioQQQ,
" NOTE Large H2 molecule turned on but line transfer and fine opacities are not.\n" );
696 fprintf(
ioQQQ,
" NOTE Turning on line transfer and fine opacities.\n\n" );
707 " NOTE One of the incident continuum is a form used when no H-ionizing radiation is produced.\n" );
708 fprintf(
ioQQQ,
" NOTE You must also include the EXTINGUISH command to make sure this is done.\n" );
709 fprintf(
ioQQQ,
" NOTE The EXTINGUISH command was not included.\n" );
710 fprintf(
ioQQQ,
" NOTE YOU MAY BE MAKING A BIG MISTAKE!!\n NOTE\n\n\n\n" );
724 " NOTE The simulation is going into neutral gas but cosmic rays are not included.\n" );
725 fprintf(
ioQQQ,
" NOTE Ion-molecule chemistry will not occur without a source of ionization.\n" );
726 fprintf(
ioQQQ,
" NOTE The chemistry network may collapse deep in molecular regions.\n" );
727 fprintf(
ioQQQ,
" NOTE Consider adding galactic background cosmic rays with the COSMIC RAYS BACKGROUND command.\n" );
728 fprintf(
ioQQQ,
" NOTE You may be making a BIG mistake.\n NOTE\n\n\n\n" );
736 fprintf(
ioQQQ,
" NOTE Is the entered value of the hydrogen density (%.2e) reasonable?\n",
738 fprintf(
ioQQQ,
" NOTE It seems pretty low to me.\n\n\n" );
742 fprintf(
ioQQQ,
" NOTE Is this value of the hydrogen density reasonable?\n" );
743 fprintf(
ioQQQ,
" NOTE It seems pretty high to me.\n\n\n" );
747 if(
called.
lgTalk && !lgStop && !lgStop_not_enough_info )
751 fprintf(
ioQQQ,
" NOTE Simulation may crash because of extreme "
752 "density. The value was %.2e\n\n" ,
763 fprintf(
ioQQQ,
" PROBLEM DISASTER No incident radiation field was specified - "
764 "at least put in the CMB.\n" );
766 lgStop_not_enough_info =
true;
772 fprintf(
ioQQQ,
" PROBLEM DISASTER No incident radiation field was specified - "
773 "at least put in the CMB.\n" );
775 lgStop_not_enough_info =
true;
777 else if( (p.
m_nqh) == 0 )
779 fprintf(
ioQQQ,
" PROBLEM DISASTER Luminosity of continuum MUST be specified.\n" );
781 lgStop_not_enough_info =
true;
789 fprintf(
ioQQQ,
" PROBLEM DISASTER Starting radius MUST be specified.\n" );
791 lgStop_not_enough_info =
true;
796 fprintf(
ioQQQ,
" PROBLEM DISASTER There were not the same number of continuum shapes and luminosities entered.\n" );
803 static bool lgFirstPass =
true;
818 fprintf(
ioQQQ,
" PROBLEM DISASTER The GRID command was entered "
819 "but there were %li GRID commands and %li commands with a VARY option.\n" ,
821 fprintf(
ioQQQ,
" There must be the same number of GRIDs and VARY.\n" );
826 if( lgStop_not_enough_info )
828 fprintf(
ioQQQ,
" PROBLEM DISASTER I do not have enough information to do the simulation, I cannot go on.\n" );
834 bool lgParserTest =
false;
873 else if( p.
nMatch(
"BEAM") )
879 else if( p.
nMatch(
"SIZE") )
886 p.
NoNumb(
"aperture size");
890 fprintf(
ioQQQ,
" The aperture size must be positive. Sorry.\n" );
895 else if( p.
nMatch(
"COVE") )
902 p.
NoNumb(
"aperture covering factor");
906 fprintf(
ioQQQ,
" The aperture covering factor must be > 0 and <= 1. Sorry.\n" );
912 fprintf(
ioQQQ,
" One of the keywords SLIT, BEAM, SIZE or COVEring factor must appear.\n" );
922 string chString_quotes_original;
923 bool lgQuotesFound =
true;
924 if (p.
GetQuote(chString_quotes_original))
925 lgQuotesFound =
false;
930 fprintf(
ioQQQ,
" Warning: The 'atom feii' command is obsolete. "
931 " Instead, please use 'species \"Fe+\" levels=all'.\n Sorry.\n\n" );
935 else if( p.
nMatch(
"H-LI") )
941 else if( p.
nMatch(
"HE-L") )
949 fprintf(
ioQQQ,
" The old CO models no longer exist, and this command is no longer supported.\n" );
954 else if( p.
nMatch(
" H2 ") )
960 else if (p.
nMatch(
"CHIANTI"))
964 if (lgQuotesFound ==
true)
1001 p.
NoNumb(
"two numbers, the maximum number of levels in Fe, and in other elements, or the keyword MAX,");
1006 " \nPROBLEM The maximum number of chianti levels should be two or greater.\n");
1007 fprintf(
ioQQQ,
" To turn off the Chianti data use \"atom Chianti off\" instead.\n");
1017 else if (p.
nMatch(
"STOUT"))
1022 if (lgQuotesFound ==
true)
1055 p.
NoNumb(
"two numbers, the maximum number of levels in Fe, and in other elements, or the keyword MAX,");
1060 " \nPROBLEM The maximum number of stout levels should be two or greater.\n");
1061 fprintf(
ioQQQ,
" To turn off the Stout data use \"atom Stout off\" instead.\n");
1071 else if (p.
nMatch(
"LAMDA"))
1075 if (lgQuotesFound ==
true)
1100 p.
NoNumb(
"the maximum number of levels,");
1105 " \nPROBLEM The maximum number of Lamda levels should be two or greater.\n");
1106 fprintf(
ioQQQ,
" To turn off the Lamda data use \"atom lamda off\" instead.\n");
1116 else if (p.
nMatch(
"PRINT"))
1126 fprintf(
ioQQQ,
" I could not recognize a keyword on this species command.\n");
1127 fprintf(
ioQQQ,
" The available keys are FeII, H-Like, He-like, H2, Chianti, Lamda, and Stout.\n");
1169 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1180 p.
NoNumb(
"extra cooling");
1211 "This command is now ambiguous -- please specify either COSMIC RAYS or COSMOLOGY.\nSorry.\n");
1224 p.
NoNumb(
"covering factor");
1235 fprintf(
ioQQQ,
" A covering factor greater than 1 makes no physical sense. Sorry.\n" );
1282 fprintf(
ioQQQ,
" Did not recognize a valid option for this DARK command.\nSorry.\n\n" );
1292 fprintf(
ioQQQ,
" The DIELectronic command has been replaced with the SET DIELectronic recombination command.\n" );
1293 fprintf(
ioQQQ,
" Please have a look at Hazy.\n Sorry.\n\n" );
1315 else if( p.
nMatch(
" OUT") )
1318 long int j = (
long int)p.
FFmtRead();
1326 if( j > 0 && j < 10 )
1340 fprintf(
ioQQQ,
" There should have been OUTward or OTS on this line. Sorry.\n" );
1385 p.
NoNumb(
"electron density");
1397 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1406 p.
NoNumb(
"energy density");
1417 if( !p.
nMatch(
" LOG") && (p.
nMatch(
"LINE") || teset > 10.) )
1420 teset = (
realnum)log10(teset);
1425 fprintf(
ioQQQ,
" This intensity may be too large. The code may crash due to overflow. Was log intended?\n" );
1478 fprintf(
ioQQQ,
" This command should not be necessary.\n" );
1479 fprintf(
ioQQQ,
" Please show this input stream to Gary Ferland if this command is really needed for this simulation.\n" );
1488 p.
NoNumb(
"filling factor");
1491 if( a <= 0. || p.
nMatch(
" LOG") )
1555 fprintf(
ioQQQ,
" TE reset to 3K: entered number too small.\n" );
1563 for(
long int j=0; j <
NFUDGC; j++ )
1571 p.
NoNumb(
"fudge factor");
1603 fprintf(
ioQQQ,
" Sorry, this command is obsolete, you can now use the normal GRAINS command.\n");
1639 else if( p.
nMatch(
"PLAN") )
1645 fprintf(
ioQQQ,
" The symmetry of the gravitational mass must be specified explicitly. Sorry.\n" );
1655 else if( p.
nMatch(
"LOG") )
1664 fprintf(
ioQQQ,
"Sorry, this command is replaced with SPECIES HE-LIKE\n");
1677 p.
NoNumb(
"extra heating first parameter" );
1683 const char *chHextraScale;
1691 chHextraScale =
"DEPTH";
1715 else if( p.
nMatch(
"DENS") )
1718 chHextraScale =
"DENSITY";
1730 else if( p.
nMatch(
"SS") )
1733 chHextraScale =
"SS";
1742 p.
NoNumb(
"hextraSS Mass");
1748 p.
NoNumb(
"hextraSS radius");
1770 fprintf(
ioQQQ,
"Sorry, HEXTRA SS command does not now support vary option.\n");
1805 fprintf(
ioQQQ,
" Sorry, this command has been replaced with the SPECIES H-LIKE command.\n");
1822 " This is the second init file, I can only handle one.\nSorry.\n" );
1841 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1985 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1996 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2014 fprintf(
ioQQQ,
" Did you omit the keyword LINEAR?\n" );
2067 p.
NoNumb(
"neutron luminosity");
2108 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2118 p.
NoNumb(
"number of h-ionizing photons");
2130 fprintf(
ioQQQ,
" Is the flux for this continuum correct?\n" );
2165 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2180 p.
NoNumb(
"number of ionizing photons");
2224 p.
NoNumb(
"minimum optical depth");
2241 "Sorry, this command has been replaced with the SET TEMPERATURE TOLERANCE command.\n");
2260 if( p.
nMatch(
"EQUIPART") )
2281 p.
NoNumb(
"microturbulent velocity");
2287 fprintf(
ioQQQ,
"PROBLEM the log of the turbulence is "
2288 "%.2e - I cannot handle a number this big.\n",
2302 fprintf(
ioQQQ,
" PROBLEM: the turbulent velocity needs to be > 0, but this was entered: %e\n",
2309 fprintf(
ioQQQ,
" PROBLEM: A turbulent velocity greater than speed of light is not allowed, this was entered: %e\n",
2331 p.
NoNumb(
"turbulence dissipation scale");
2332 ExtraPars +=
" DISSIPATE %f";
2342 ExtraPars +=
" NO PRESSURE";
void ParseState(Parser &p)
void ParseF_nuSpecific(Parser &p)
void ParseL_nu(Parser &p)
bool nMatch(const char *chKey) const
void ParseHDEN(Parser &p)
void ParseAperture(Parser &p)
t_mole_global mole_global
char chLamdaFile[FILENAME_PATH_LENGTH]
void ParseHydrogen(Parser &)
realnum GetDensity(realnum z)
void InitMonitorResults(void)
void SetGasPhaseDensity(const long nelem, const realnum density)
void ParseDont(Parser &p)
void ParseInitCount(Parser &p)
void ParseDynaWind(Parser &p)
char chStoutFile[FILENAME_PATH_LENGTH]
void ParsePlot(Parser &p)
void ParseDatabaseISO(long ipISO, Parser &p)
void ParseCylinder(Parser &p)
void ParseBlackbody(Parser &p)
void setline(const char *const card)
void ParseBackgrd(Parser &p)
bool Command(const char *name, OptionParser doOpts)
void ParseFail(Parser &p)
void ParseEnergy(Parser &p)
void ParseDatabaseH2(Parser &p)
void ParseMonitorResults(Parser &p)
void ParseNeutrons(Parser &p)
void ParseExtinguish(Parser &p)
void ParseLuminosity(Parser &p)
void ParseTable(Parser &p)
int GetQuote(string &chLabel)
realnum varang[LIMPAR][2]
void ParseFill(Parser &p)
bool isCommandComment(void) const
void ParseRatio(Parser &p)
void ParseHExtra(Parser &p)
void ParseConstant(Parser &p)
void ParseTitle(Parser &)
double getNumberDefaultAlwaysLog(const char *chDesc, double fdef)
void ParseFudge(Parser &p)
void ParseCrashDo(Parser &p)
char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2]
vector< double > StopThickness
void ParseStop(Parser &p)
realnum vparm[LIMEXT][LIMPAR]
void ParseCosm(Parser &p)
void ParseSave(Parser &p)
void ParseGrid(Parser &p)
void ParseDoubleTau(Parser &)
void ParseDLaw(Parser &p)
void ParseRangeOption(Parser &p)
void ParseVLaw(Parser &p)
void ParsePrint(Parser &p)
void ParseSphere(Parser &p)
void ParseTurbulence(Parser &p)
static t_version & Inst()
void ParseIlluminate(Parser &p)
void ParseGravity(Parser &p)
vector< long int > IterPrnt
void ParseCosmology(Parser &p)
bool lgBallistic(void) const
void ParseCompile(Parser &p)
void ParseTest(Parser &p)
const double TEMP_STOP_DEFAULT
void ParseSpecies(Parser &p)
void ParseNuL_nu(Parser &p)
void ParseHeLike(Parser &)
void ParseGlobule(Parser &p)
void ParseCaseB(Parser &p)
void ParseTolerance(Parser &)
void ParseMagnet(Parser &p)
void ParsePGrains(Parser &)
void set_point(long int ipnt)
void ParseDiffuse(Parser &p)
void ParseF_nu(Parser &p, const char *chType, bool lgNU2)
void ParseIonParX(Parser &p)
char chCloudyChiantiFile[FILENAME_PATH_LENGTH]
void ParseAbsMag(Parser &p)
bool lgPrintNumberOfLevels
const realnum COLUMN_INIT
const int INPUT_LINE_LENGTH
void ParseFluc(Parser &p)
void ParseNorm(Parser &p)
void ParseCMB(double z, long int *nqh)
double tabval(double r0, double depth) const
NORETURN void NoNumb(const char *chDesc) const
diatomics h2("h2", 4100.,&hmi.H2_total, Yan_H2_CS)
void ParseLaser(Parser &p)
void ParseDynaTime(Parser &p)
void ParseConvHighT(Parser &)
void ParseIntensity(Parser &p)
void ParseDrive(Parser &p)
void ParseTrace(Parser &p)
void ParseTauMin(Parser &p)
void ParseInit(Parser &p)
void ParseGrain(Parser &p)
realnum gas_phase[LIMELM]
void ParsePowerlawContinuum(Parser &p)
bool lgOptimizeAsLinear[LIMPAR]
void help(FILE *fp) const
bool lgNegativeIncrements
void ParseIonParI(Parser &p)
#define DEBUG_ENTRY(funcname)
void ParseCovering(Parser &p)
void ParseSpecial(Parser &)
void ParseNuF_nu(Parser &p)
double getNumberCheckAlwaysLog(const char *chDesc)
void ParseRadius(Parser &p)
void ParseTLaw(Parser &p)
void ParseRoberto(Parser &)
void ParseIterations(Parser &p)
void ParseCosmicRays(Parser &p)
int fprintf(const Output &stream, const char *format,...)
NORETURN void CommandError(void) const
double dense_fabden(double radius, double depth)
void ParseBremsstrahlung(Parser &p)
vector< double > external_mass[3]
void ParseCMBOuter(Parser &p)
double dense_parametric_wind(double rad)
void ParseOptimize(Parser &p)
int PrintLine(FILE *fp) const
bool lgStatic(void) const
vector< double > StopRadius
void ParseCExtra(Parser &p)
void ParseDielectronic(Parser &)
void ParseDatabase(Parser &p)
void ParseCoronal(Parser &p)
void ParseElement(Parser &p)
void ParseForceTemperature(Parser &p)
void ParseInterp(Parser &p)
void ParseEden(Parser &p)
void ParseDistance(Parser &p)
void ParseDarkMatter(Parser &p)
void ParseAbundances(Parser &p)
void ParseChemistry(Parser &p)