92 lgStop_not_enough_info;
114 for(
long int i=0; i <
LIMSPC; i++ )
131 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
138 "\"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
139 "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
140 fprintf(
ioQQQ,
"<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
143 "content=\"text/html; charset=UTF-8\" />\n");
154 "\n This is a beta release of Cloudy, and is intended for testing only.\n" );
156 "Please help make Cloudy better by posing problems or suggestions on cloudyastrophysics.groups.io.\n\n" );
169 fprintf(
ioQQQ,
"**************************************");
171 fprintf(
ioQQQ,
"**************************************\n");
391 sprintf(chDUMMY,
"abundances \"default.abn\"" );
396 sprintf( chDUMMY,
"abundances isotopes \"default-iso.abn\"" );
418 fprintf(
ioQQQ,
" Too many VARY lines entered; the limit is%4ld\n",
439 for (i=0; commands[i].
name != NULL; ++i)
444 if (commands[i].name == NULL)
457 fprintf(
ioQQQ,
"%23c***********************************************************************************\n\n\n\n",
' ' );
461 fprintf(
ioQQQ,
"\n NOTE: one of these comment characters was found in the input: //, %%, *, or ;.\n" );
462 fprintf(
ioQQQ,
" Using these is deprecated and they will be removed in the next major release.\n" );
463 fprintf(
ioQQQ,
" Please convert your input deck using scripts/ccc.pl.\n\n" );
491 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
502 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
512 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
522 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
531 lgStop_not_enough_info =
false;
537 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density MUST be specified.\n" );
538 lgStop_not_enough_info =
true;
550 fprintf(
ioQQQ,
" PROBLEM DISASTER The SAVE XSPEC command cannot be combined with negative grid increments.\n" );
551 fprintf(
ioQQQ,
" PROBLEM DISASTER Please check your GRID commands.\n\n\n" );
575 fprintf(
ioQQQ,
" PROBLEM DISASTER No commands were entered - whats up?\n" );
584 fprintf(
ioQQQ,
" NOTE PROBLEM Due to the nature of the Sobolev approximation, it makes no sense to converge a windy model.\n" );
585 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off\n\n\n" );
597 fprintf(
ioQQQ,
" NOTE Case B is an artificial test, it makes no sense to converge this model.\n" );
598 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off.\n\n\n" );
609 fprintf(
ioQQQ,
" NOTE Specifying both a density power law and constant pressure is impossible.\n" );
618 fprintf(
ioQQQ,
" NOTE NO REEVALUATE IONIZATION can only be used with constant density.\n" );
619 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate ionization.\n\n" );
628 fprintf(
ioQQQ,
" NOTE NO REEVALUATE OPACITY can only be used with constant density.\n" );
629 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate opacity.\n\n" );
639 fprintf(
ioQQQ,
" NOTE Gravity from an external mass has been added, but no symmetry (spherical/mid-plane) was specified.\n" );
655 "NOTE The specified column density and hydrogen density correspond to a thickness of %.2e cm.\n",
658 "NOTE This seems large to me.\n");
659 fprintf(
ioQQQ,
"NOTE a very large radius may cause overflow.\n\n");
668 "NOTE The grain temperatures are set to a constant value with the "
669 "CONSTANT GRAIN TEMPERATURE command, but "
670 "energy exchange \n");
672 "NOTE is still included. The grain-gas heating-cooling will be incorrect. "
673 "Consider turning off gas-grain collisional energy\n");
675 "NOTE exchange with the NO GRAIN GAS COLLISIONAL ENERGY EXCHANGE command.\n\n\n");
682 fprintf(
ioQQQ,
" NOTE NO LINE TRANSER set but fine opacities still computed.\n" );
683 fprintf(
ioQQQ,
" NOTE Turning off fine opacities.\n\n" );
692 fprintf(
ioQQQ,
" NOTE Large H2 molecule turned on but line transfer and fine opacities are not.\n" );
693 fprintf(
ioQQQ,
" NOTE Turning on line transfer and fine opacities.\n\n" );
704 " NOTE One of the incident continuum is a form used when no H-ionizing radiation is produced.\n" );
705 fprintf(
ioQQQ,
" NOTE You must also include the EXTINGUISH command to make sure this is done.\n" );
706 fprintf(
ioQQQ,
" NOTE The EXTINGUISH command was not included.\n" );
707 fprintf(
ioQQQ,
" NOTE YOU MAY BE MAKING A BIG MISTAKE!!\n NOTE\n\n\n\n" );
721 " NOTE The simulation is going into neutral gas but cosmic rays are not included.\n" );
722 fprintf(
ioQQQ,
" NOTE Ion-molecule chemistry will not occur without a source of ionization.\n" );
723 fprintf(
ioQQQ,
" NOTE The chemistry network may collapse deep in molecular regions.\n" );
724 fprintf(
ioQQQ,
" NOTE Consider adding galactic background cosmic rays with the COSMIC RAYS BACKGROUND command.\n" );
725 fprintf(
ioQQQ,
" NOTE You may be making a BIG mistake.\n NOTE\n\n\n\n" );
733 fprintf(
ioQQQ,
" NOTE Is the entered value of the hydrogen density (%.2e) reasonable?\n",
735 fprintf(
ioQQQ,
" NOTE It seems pretty low to me.\n\n\n" );
739 fprintf(
ioQQQ,
" NOTE Is this value of the hydrogen density reasonable?\n" );
740 fprintf(
ioQQQ,
" NOTE It seems pretty high to me.\n\n\n" );
744 if(
called.
lgTalk && !lgStop && !lgStop_not_enough_info )
748 fprintf(
ioQQQ,
" NOTE Simulation may crash because of extreme "
749 "density. The value was %.2e\n\n" ,
760 fprintf(
ioQQQ,
" PROBLEM DISASTER No incident radiation field was specified - "
761 "at least put in the CMB.\n" );
763 lgStop_not_enough_info =
true;
769 fprintf(
ioQQQ,
" PROBLEM DISASTER No incident radiation field was specified - "
770 "at least put in the CMB.\n" );
772 lgStop_not_enough_info =
true;
774 else if( (p.
m_nqh) == 0 )
776 fprintf(
ioQQQ,
" PROBLEM DISASTER Luminosity of continuum MUST be specified.\n" );
778 lgStop_not_enough_info =
true;
793 fprintf(
ioQQQ,
" PROBLEM DISASTER A continuum source was specified as a luminosity,"
794 " but the inner radius of the cloud was not set.\n");
796 lgStop_not_enough_info =
true;
805 fprintf(
ioQQQ,
" WARNING: outer radius of TABLE READ sim is larger than inner radius of this sim.\n\n");
809 fprintf(
ioQQQ,
" CAUTION: no outer radius set in TABLE READ sim, but this sim uses inner radius.\n\n");
811 fprintf(
ioQQQ,
" CAUTION: outer radius set in TABLE READ sim, but inner radius not set in this sim.\n\n");
816 fprintf(
ioQQQ,
" PROBLEM DISASTER There were not the same number of continuum shapes and luminosities entered.\n" );
823 static bool lgFirstPass =
true;
838 fprintf(
ioQQQ,
" PROBLEM DISASTER The GRID command was entered "
839 "but there were %li GRID commands and %li commands with a VARY option.\n" ,
841 fprintf(
ioQQQ,
" There must be the same number of GRIDs and VARY.\n" );
846 if( lgStop_not_enough_info )
848 fprintf(
ioQQQ,
" PROBLEM DISASTER I do not have enough information to do the simulation, I cannot go on.\n" );
854 bool lgParserTest =
false;
893 else if( p.
nMatch(
"BEAM") )
899 else if( p.
nMatch(
"SIZE") )
906 p.
NoNumb(
"aperture size");
910 fprintf(
ioQQQ,
" The aperture size must be positive. Sorry.\n" );
915 else if( p.
nMatch(
"COVE") )
922 p.
NoNumb(
"aperture covering factor");
926 fprintf(
ioQQQ,
" The aperture covering factor must be > 0 and <= 1. Sorry.\n" );
932 fprintf(
ioQQQ,
" One of the keywords SLIT, BEAM, SIZE or COVEring factor must appear.\n" );
942 string chString_quotes_original;
943 bool lgQuotesFound =
true;
944 if (p.
GetQuote(chString_quotes_original))
945 lgQuotesFound =
false;
950 fprintf(
ioQQQ,
" Warning: The 'atom feii' command is obsolete. "
951 " Instead, please use 'species \"Fe+\" levels=all'.\n Sorry.\n\n" );
955 else if( p.
nMatch(
"H-LI") )
961 else if( p.
nMatch(
"HE-L") )
969 fprintf(
ioQQQ,
" The old CO models no longer exist, and this command is no longer supported.\n" );
974 else if( p.
nMatch(
" H2 ") )
980 else if (p.
nMatch(
"CHIANTI"))
984 if (lgQuotesFound ==
true)
1021 p.
NoNumb(
"two numbers, the maximum number of levels in Fe, and in other elements, or the keyword MAX,");
1026 " \nPROBLEM The maximum number of chianti levels should be two or greater.\n");
1027 fprintf(
ioQQQ,
" To turn off the Chianti data use \"atom Chianti off\" instead.\n");
1037 else if (p.
nMatch(
"STOUT"))
1042 if (lgQuotesFound ==
true)
1075 p.
NoNumb(
"two numbers, the maximum number of levels in Fe, and in other elements, or the keyword MAX,");
1080 " \nPROBLEM The maximum number of stout levels should be two or greater.\n");
1081 fprintf(
ioQQQ,
" To turn off the Stout data use \"atom Stout off\" instead.\n");
1091 else if (p.
nMatch(
"LAMDA"))
1095 if (lgQuotesFound ==
true)
1120 p.
NoNumb(
"the maximum number of levels,");
1125 " \nPROBLEM The maximum number of Lamda levels should be two or greater.\n");
1126 fprintf(
ioQQQ,
" To turn off the Lamda data use \"atom lamda off\" instead.\n");
1136 else if (p.
nMatch(
"PRINT"))
1146 fprintf(
ioQQQ,
" I could not recognize a keyword on this species command.\n");
1147 fprintf(
ioQQQ,
" The available keys are FeII, H-Like, He-like, H2, Chianti, Lamda, and Stout.\n");
1189 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1200 p.
NoNumb(
"extra cooling");
1231 "This command is now ambiguous -- please specify either COSMIC RAYS or COSMOLOGY.\nSorry.\n");
1244 p.
NoNumb(
"covering factor");
1255 fprintf(
ioQQQ,
" A covering factor greater than 1 makes no physical sense. Sorry.\n" );
1302 fprintf(
ioQQQ,
" Did not recognize a valid option for this DARK command.\nSorry.\n\n" );
1312 fprintf(
ioQQQ,
" The DIELectronic command has been replaced with the SET DIELectronic recombination command.\n" );
1313 fprintf(
ioQQQ,
" Please have a look at Hazy.\n Sorry.\n\n" );
1335 else if( p.
nMatch(
" OUT") )
1338 long int j = (
long int)p.
FFmtRead();
1346 if( j > 0 && j < 10 )
1360 fprintf(
ioQQQ,
" There should have been OUTward or OTS on this line. Sorry.\n" );
1405 p.
NoNumb(
"electron density");
1432 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1441 p.
NoNumb(
"energy density");
1445 if( !p.
nMatch(
" LOG") && (p.
nMatch(
"LINE") || teset > 10.) )
1448 teset = (
realnum)log10(teset);
1453 fprintf(
ioQQQ,
" This intensity may be too large. The code may crash due to overflow. Was log intended?\n" );
1506 fprintf(
ioQQQ,
" This command should not be necessary.\n" );
1507 fprintf(
ioQQQ,
" Please show this input stream to Gary Ferland if this command is really needed for this simulation.\n" );
1516 p.
NoNumb(
"filling factor");
1519 if( a <= 0. || p.
nMatch(
" LOG") )
1583 fprintf(
ioQQQ,
" TE reset to 3K: entered number too small.\n" );
1591 for(
long int j=0; j <
NFUDGC; j++ )
1599 p.
NoNumb(
"fudge factor");
1631 fprintf(
ioQQQ,
" Sorry, this command is obsolete, you can now use the normal GRAINS command.\n");
1667 else if( p.
nMatch(
"PLAN") )
1673 fprintf(
ioQQQ,
" The symmetry of the gravitational mass must be specified explicitly. Sorry.\n" );
1683 else if( p.
nMatch(
"LOG") )
1692 fprintf(
ioQQQ,
"Sorry, this command is replaced with SPECIES HE-LIKE\n");
1705 p.
NoNumb(
"extra heating first parameter" );
1711 const char *chHextraScale;
1719 chHextraScale =
"DEPTH";
1743 else if( p.
nMatch(
"DENS") )
1746 chHextraScale =
"DENSITY";
1758 else if( p.
nMatch(
"SS") )
1761 chHextraScale =
"SS";
1770 p.
NoNumb(
"hextraSS Mass");
1776 p.
NoNumb(
"hextraSS radius");
1798 fprintf(
ioQQQ,
"Sorry, HEXTRA SS command does not now support vary option.\n");
1833 fprintf(
ioQQQ,
" Sorry, this command has been replaced with the SPECIES H-LIKE command.\n");
1849 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1986 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1997 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2015 fprintf(
ioQQQ,
" Did you omit the keyword LINEAR?\n" );
2068 p.
NoNumb(
"neutron luminosity");
2109 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2119 p.
NoNumb(
"number of h-ionizing photons");
2124 fprintf(
ioQQQ,
" Is the flux for this continuum correct?\n" );
2159 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2174 p.
NoNumb(
"number of ionizing photons");
2218 p.
NoNumb(
"minimum optical depth");
2235 "Sorry, this command has been replaced with the SET TEMPERATURE TOLERANCE command.\n");
2254 if( p.
nMatch(
"EQUIPART") )
2275 p.
NoNumb(
"microturbulent velocity");
2281 fprintf(
ioQQQ,
"PROBLEM the log of the turbulence is "
2282 "%.2e - I cannot handle a number this big.\n",
2297 fprintf(
ioQQQ,
" PROBLEM: the turbulent velocity needs to be > 0, but this was entered: %e\n",
2304 fprintf(
ioQQQ,
" PROBLEM: A turbulent velocity greater than speed of light is not allowed, this was entered: %e\n",
2326 p.
NoNumb(
"turbulence dissipation scale");
2327 ExtraPars +=
" DISSIPATE %f";
2337 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)
bool lgSphericalDilution[LIMSPC]
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]
double TableRadius[LIMSPC]
void ParseFill(Parser &p)
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 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)
bool isComment(void) const
void ParseInterp(Parser &p)
void ParseEden(Parser &p)
void ParseDistance(Parser &p)
void ParseDarkMatter(Parser &p)
void ParseAbundances(Parser &p)
void ParseChemistry(Parser &p)