93 lgStop_not_enough_info;
120 for(
long int i=0; i <
LIMSPC; i++ )
137 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
145 "\n This is a beta release of Cloudy, and is intended for testing only.\n" );
147 "Please help make Cloudy better by posing problems or suggestions on http://tech.groups.yahoo.com/group/cloudy_simulations/.\n\n" );
156 fprintf(
ioQQQ,
"%57cwww.nublado.org\n\n",
' ' );
159 fprintf(
ioQQQ,
"%23c",
' ' );
160 fprintf(
ioQQQ,
"**************************************");
162 fprintf(
ioQQQ,
"**************************************\n");
164 fprintf(
ioQQQ,
"%23c*%81c*\n",
' ',
' ' );
401 fprintf(
ioQQQ,
" Too many VARY lines entered; the limit is%4ld\n",
422 for (i=0; commands[i].
name != NULL; ++i)
427 if (commands[i].name == NULL)
439 fprintf(
ioQQQ,
"%23c*%81c*\n",
' ',
' ' );
440 fprintf(
ioQQQ,
"%23c***********************************************************************************\n\n\n\n",
' ' );
461 fprintf(
ioQQQ,
" READR turns on trace from optimize option.\n" );
472 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
482 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
492 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density set by DLAW must be > 0.\n" );
501 lgStop_not_enough_info =
false;
507 fprintf(
ioQQQ,
" PROBLEM DISASTER Hydrogen density MUST be specified.\n" );
508 lgStop_not_enough_info =
true;
520 fprintf(
ioQQQ,
" PROBLEM DISASTER The SAVE XSPEC command cannot be combined with negative grid increments.\n" );
521 fprintf(
ioQQQ,
" PROBLEM DISASTER Please check your GRID commands.\n\n\n" );
547 fprintf(
ioQQQ,
" PROBLEM DISASTER No commands were entered - whats up?\n" );
556 fprintf(
ioQQQ,
" NOTE PROBLEM Due to the nature of the Sobolev approximation, it makes no sense to converge a windy model.\n" );
557 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off\n\n\n" );
569 fprintf(
ioQQQ,
" NOTE Case B is an artificial test, it makes no sense to converge this model.\n" );
570 fprintf(
ioQQQ,
" NOTE Iterate to convergence is turned off.\n\n\n" );
581 fprintf(
ioQQQ,
" NOTE Specifying both a density power law and constant pressure is impossible.\n" );
590 fprintf(
ioQQQ,
" NOTE NO REEVALUATE IONIZATION can only be used with constant density.\n" );
591 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate ionization.\n\n" );
600 fprintf(
ioQQQ,
" NOTE NO REEVALUATE OPACITY can only be used with constant density.\n" );
601 fprintf(
ioQQQ,
" NOTE Resetting to reevaluate opacity.\n\n" );
611 fprintf(
ioQQQ,
" NOTE Gravity from an external mass has been added, but no symmetry (spherical/mid-plane) was specified.\n" );
612 fprintf(
ioQQQ,
" NOTE It will be ignored.\n\n\n" );
627 "NOTE The specified column density and hydrogen density correspond to a thickness of %.2e cm.\n",
630 "NOTE This seems large to me.\n");
631 fprintf(
ioQQQ,
"NOTE a very large radius may cause overflow.\n\n");
640 "NOTE The grain temperatures are set to a constant value with the "
641 "CONSTANT GRAIN TEMPERATURE command, but "
642 "energy exchange \n");
644 "NOTE is still included. The grain-gas heating-cooling will be incorrect. "
645 "Consider turning off gas-grain collisional energy\n");
647 "NOTE exchange with the NO GRAIN GAS COLLISIONAL ENERGY EXCHANGE command.\n\n\n");
654 fprintf(
ioQQQ,
" NOTE NO LINE TRANSER set but fine opacities still computed.\n" );
655 fprintf(
ioQQQ,
" NOTE Turning off fine opacities.\n\n" );
664 fprintf(
ioQQQ,
" NOTE Large H2 molecule turned on but line transfer and fine opacities are not.\n" );
665 fprintf(
ioQQQ,
" NOTE Turning on line transfer and fine opacities.\n\n" );
675 fprintf(
ioQQQ,
"\n NOTE\n"
676 " NOTE One of the incident continuum is a form used when no H-ionizing radiation is produced.\n" );
677 fprintf(
ioQQQ,
" NOTE You must also include the EXTINGUISH command to make sure this is done.\n" );
678 fprintf(
ioQQQ,
" NOTE The EXTINGUISH command was not included.\n" );
679 fprintf(
ioQQQ,
" NOTE YOU MAY BE MAKING A BIG MISTAKE!!\n NOTE\n\n\n\n" );
692 fprintf(
ioQQQ,
"\n NOTE\n"
693 " NOTE The simulation is going into neutral gas but cosmic rays are not included.\n" );
694 fprintf(
ioQQQ,
" NOTE Ion-molecule chemistry will not occur without a source of ionization.\n" );
695 fprintf(
ioQQQ,
" NOTE The chemistry network may collapse deep in molecular regions.\n" );
696 fprintf(
ioQQQ,
" NOTE Consider adding galactic background cosmic rays with the COSMIC RAYS BACKGROUND command.\n" );
697 fprintf(
ioQQQ,
" NOTE You may be making a BIG mistake.\n NOTE\n\n\n\n" );
705 fprintf(
ioQQQ,
" NOTE Is the entered value of the hydrogen density (%.2e) reasonable?\n",
707 fprintf(
ioQQQ,
" NOTE It seems pretty low to me.\n\n\n" );
711 fprintf(
ioQQQ,
" NOTE Is this value of the hydrogen density reasonable?\n" );
712 fprintf(
ioQQQ,
" NOTE It seems pretty high to me.\n\n\n" );
716 if(
called.
lgTalk && !lgStop && !lgStop_not_enough_info )
720 fprintf(
ioQQQ,
" NOTE Simulation may crash because of extreme "
721 "density. The value was %.2e\n\n" ,
728 fprintf(
ioQQQ,
" PROBLEM DISASTER No incident radiation field was specified - "
729 "at least put in the CMB.\n" );
731 lgStop_not_enough_info =
true;
736 fprintf(
ioQQQ,
" PROBLEM DISASTER Luminosity of continuum MUST be specified.\n" );
738 lgStop_not_enough_info =
true;
746 fprintf(
ioQQQ,
" PROBLEM DISASTER Starting radius MUST be specified.\n" );
748 lgStop_not_enough_info =
true;
753 fprintf(
ioQQQ,
" PROBLEM DISASTER There were not the same number of continuum shapes and luminosities entered.\n" );
760 static bool lgFirstPass =
true;
775 fprintf(
ioQQQ,
" PROBLEM DISASTER The GRID command was entered "
776 "but there were %li GRID commands and %li commands with a VARY option.\n" ,
778 fprintf(
ioQQQ,
" There must be the same number of GRIDs and VARY.\n" );
783 if( lgStop_not_enough_info )
785 fprintf(
ioQQQ,
" PROBLEM DISASTER I do not have enough information to do the simulation, I cannot go on.\n" );
786 fprintf(
ioQQQ,
"\n\n Sorry.\n\n\n" );
791 bool lgParserTest =
false;
796 fprintf(
ioQQQ,
"Parser phase PASSED\n");
839 else if( p.
nMatch(
"BEAM") )
845 else if( p.
nMatch(
"SIZE") )
852 p.
NoNumb(
"aperture size");
856 fprintf(
ioQQQ,
" The aperture size must be positive. Sorry.\n" );
861 else if( p.
nMatch(
"COVE") )
868 p.
NoNumb(
"aperture covering factor");
872 fprintf(
ioQQQ,
" The aperture covering factor must be > 0 and <= 1. Sorry.\n" );
878 fprintf(
ioQQQ,
" One of the keywords SLIT, BEAM, SIZE or COVEring factor must appear.\n" );
879 fprintf(
ioQQQ,
" Sorry.\n" );
893 else if( p.
nMatch(
"H-LI") )
899 else if( p.
nMatch(
"HE-L") )
908 fprintf(
ioQQQ,
" The old CO models no longer exist, and this command is no longer supported.\n" );
909 fprintf(
ioQQQ,
" Sorry.\n" );
913 else if( p.
nMatch(
" H2 ") )
919 else if (p.
nMatch(
"CHIA"))
922 bool lgQuotesFound =
true;
923 if (p.
GetQuote(chString_quotes_lowercase,
false))
924 lgQuotesFound =
false;
928 if (lgQuotesFound ==
true)
965 p.
NoNumb(
"two numbers, the maximum number of levels in Fe, and in other elements,");
970 " \nPROBLEM The maximum number of chianti levels should be two or greater.\n");
971 fprintf(
ioQQQ,
" To turn off the Chianti data use \"Set Chianti off\" instead.\n");
972 fprintf(
ioQQQ,
" See Hazy 1 for details.\n");
981 else if (p.
nMatch(
"STOUT"))
984 bool lgQuotesFound =
true;
985 if (p.
GetQuote(chString_quotes_lowercase,
false))
986 lgQuotesFound =
false;
990 if (lgQuotesFound ==
true)
1006 if (p.
nMatch(
" NO HYBR"))
1021 p.
NoNumb(
"the maximum number of Stout levels,");
1026 " \nPROBLEM The maximum number of Stout levels should be two or greater.\n");
1027 fprintf(
ioQQQ,
" To turn off the Stout data use \"Set Stout off\" instead.\n");
1028 fprintf(
ioQQQ,
" See Hazy 1 for details.\n");
1037 else if (p.
nMatch(
"LAMD"))
1041 else if (p.
nMatch(
" ON "))
1046 fprintf(
ioQQQ,
" There should have been an option on this SET LAMDA command.\n");
1047 fprintf(
ioQQQ,
" consult Hazy to find valid options.\n Sorry.\n");
1053 fprintf(
ioQQQ,
" I could not recognize a keyword on this atom command.\n");
1054 fprintf(
ioQQQ,
" The available keys are FeII, H-Like, He-like, rotor and H2.\n");
1055 fprintf(
ioQQQ,
" Sorry.\n" );
1096 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1107 p.
NoNumb(
"extra cooling");
1138 "This command is now ambiguous -- please specify either COSMIC RAYS or COSMOLOGY.\nSorry.\n");
1151 p.
NoNumb(
"covering factor");
1162 fprintf(
ioQQQ,
" A covering factor greater than 1 makes no physical sense. Sorry.\n" );
1209 fprintf(
ioQQQ,
" Did not recognize a valid option for this DARK command.\nSorry.\n\n" );
1219 fprintf(
ioQQQ,
" The DIELectronic command has been replaced with the SET DIELectronic recombination command.\n" );
1220 fprintf(
ioQQQ,
" Please have a look at Hazy.\n Sorry.\n\n" );
1242 else if( p.
nMatch(
" OUT") )
1245 long int j = (
long int)p.
FFmtRead();
1253 if( j > 0 && j < 10 )
1259 fprintf(
ioQQQ,
" must be between 1 and 9 \n" );
1267 fprintf(
ioQQQ,
" There should have been OUTward or OTS on this line. Sorry.\n" );
1312 p.
NoNumb(
"electron density");
1324 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1333 p.
NoNumb(
"energy density");
1344 if( !p.
nMatch(
" LOG") && (p.
nMatch(
"LINE") || teset > 10.) )
1347 teset = (
realnum)log10(teset);
1352 fprintf(
ioQQQ,
" This intensity may be too large. The code may crash due to overflow. Was log intended?\n" );
1405 fprintf(
ioQQQ,
" This command should not be necessary.\n" );
1406 fprintf(
ioQQQ,
" Please show this input stream to Gary Ferland if this command is really needed for this simulation.\n" );
1415 p.
NoNumb(
"filling factor");
1418 if( a <= 0. || p.
nMatch(
" LOG") )
1431 fprintf(
ioQQQ,
" Filling factor > 1, reset to 1\n" );
1482 fprintf(
ioQQQ,
" TE reset to 3K: entered number too small.\n" );
1490 for(
long int j=0; j <
NFUDGC; j++ )
1498 p.
NoNumb(
"fudge factor");
1530 fprintf(
ioQQQ,
" Sorry, this command is obsolete, you can now use the normal GRAINS command.\n");
1545 M_i = pow( 10., M_i );
1553 x_i = pow( 10., x_i );
1566 else if( p.
nMatch(
"PLAN") )
1572 fprintf(
ioQQQ,
" The symmetry of the gravitational mass must be specified explicitly. Sorry.\n" );
1582 else if( p.
nMatch(
"LOG") )
1591 fprintf(
ioQQQ,
"Sorry, this command is replaced with ATOM HE-LIKE\n");
1604 p.
NoNumb(
"extra heating first parameter" );
1610 const char *chHextraScale;
1618 chHextraScale =
"DEPTH";
1642 else if( p.
nMatch(
"DENS") )
1645 chHextraScale =
"DENSITY";
1657 else if( p.
nMatch(
"SS") )
1660 chHextraScale =
"SS";
1669 p.
NoNumb(
"hextraSS Mass");
1675 p.
NoNumb(
"hextraSS radius");
1697 fprintf(
ioQQQ,
"Sorry, HEXTRA SS command does not now support vary option.\n");
1732 fprintf(
ioQQQ,
" Sorry, this command has been replaced with the ATOM H-LIKE command.\n");
1749 " This is the second init file, I can only handle one.\nSorry.\n" );
1768 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1909 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1920 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
1985 p.
NoNumb(
"neutron luminosity");
2026 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2036 p.
NoNumb(
"number of h-ionizing photons");
2048 fprintf(
ioQQQ,
" Is the flux for this continuum correct?\n" );
2049 fprintf(
ioQQQ,
" It appears too bright to me.\n" );
2083 fprintf(
ioQQQ,
" Too many continua entered; increase LIMSPC\n" );
2094 fprintf(
ioQQQ,
" Is this reasonable?\n" );
2098 p.
NoNumb(
"number of ionizing photons");
2142 p.
NoNumb(
"minimum optical depth");
2156 "Sorry, this command has been replaced with the SET TEMPERATURE TOLERANCE command.\n");
2175 if( p.
nMatch(
"EQUIPART") )
2196 p.
NoNumb(
"microturbulent velocity");
2202 fprintf(
ioQQQ,
"PROBLEM the log of the turbulence is "
2203 "%.2e - I cannot handle a number this big.\n",
2205 fprintf(
ioQQQ,
" The line image was\n" );
2207 fprintf(
ioQQQ,
" Sorry.\n" );
2217 fprintf(
ioQQQ,
" PROBLEM: the turbulent velocity needs to be > 0, but this was entered: %e\n",
2219 fprintf(
ioQQQ,
" Bailing out. Sorry.\n" );
2224 fprintf(
ioQQQ,
" PROBLEM: A turbulent velocity greater than speed of light is not allowed, this was entered: %e\n",
2226 fprintf(
ioQQQ,
" Bailing out. Sorry.\n" );
2246 p.
NoNumb(
"turbulence dissipation scale");
2247 ExtraPars +=
" DISSIPATE %f";
2257 ExtraPars +=
" NO PRESSURE";
void ParseAtomFeII(Parser &p)
const int INPUT_LINE_LENGTH
#define DEBUG_ENTRY(funcname)
bool nMatch(const char *chKey) const
void setline(const char *const card)
bool Command(const char *name, OptionParser doOpts)
void set_point(long int ipnt)
double getNumberCheckAlwaysLog(const char *chDesc)
bool isCommandComment(void) const
NORETURN void NoNumb(const char *chDesc) const
int GetQuote(char *chLabel, bool lgABORT)
double getNumberDefaultAlwaysLog(const char *chDesc, double fdef)
NORETURN void CommandError(void) const
int PrintLine(FILE *fp) const
void help(FILE *fp) const
static t_version & Inst()
realnum GetDensity(realnum z)
double dense_tabden(double r0, double depth)
double dense_fabden(double radius, double depth)
double dense_parametric_wind(double rad)
void ParseDynaWind(Parser &p)
void ParseDynaTime(Parser &p)
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
void ParseMagnet(Parser &p)
t_mole_global mole_global
void InitMonitorResults(void)
void ParseMonitorResults(Parser &p)
void ParseCMB(double z, long int *nqh)
void ParseAbsMag(Parser &p)
void ParseAbundances(Parser &p)
void ParseAtomH2(Parser &p)
void ParseAtomISO(long ipISO, Parser &p)
void ParseBackgrd(Parser &p)
void ParseBlackbody(Parser &p)
void ParseCaseB(Parser &p)
void ParseDarkMatter(Parser &p)
void ParseIntensity(Parser &p)
void ParseHydrogen(Parser &)
void ParseSpecial(Parser &)
void ParseNuL_nu(Parser &p)
void ParseLaser(Parser &p)
void ParseConvHighT(Parser &)
void ParseTurbulence(Parser &p)
void ParseFail(Parser &p)
void ParseVLaw(Parser &p)
void ParseLuminosity(Parser &p)
void ParseDielectronic(Parser &)
void ParseBremsstrahlung(Parser &p)
void ParseRoberto(Parser &)
void ParseCMBOuter(Parser &p)
void ParseHExtra(Parser &p)
void ParseInitCount(Parser &p)
void ParseEnergy(Parser &p)
void ParseNuF_nu(Parser &p)
void ParseDoubleTau(Parser &)
void ParseHeLike(Parser &)
void ParseCosm(Parser &p)
void ParseFudge(Parser &p)
void ParseL_nu(Parser &p)
void ParseGravity(Parser &p)
void ParseAbundancesNonSolar(Parser &p)
void ParseDistance(Parser &p)
void ParseForceTemperature(Parser &p)
void ParseAtom(Parser &p)
void ParseF_nuSpecific(Parser &p)
void ParseCovering(Parser &p)
void ParseCylinder(Parser &p)
void ParseCExtra(Parser &p)
void ParseTauMin(Parser &p)
void ParseNeutrons(Parser &p)
void ParseTitle(Parser &)
void ParseAperture(Parser &p)
void ParseDiffuse(Parser &p)
void ParsePGrains(Parser &)
void ParseFill(Parser &p)
void ParseTolerance(Parser &)
void ParseIterations(Parser &p)
void ParseEden(Parser &p)
void ParseCompile(Parser &p)
void ParseConstant(Parser &p)
void ParseCoronal(Parser &p)
void ParseCosmicRays(Parser &p)
void ParseCosmology(Parser &p)
void ParseCrashDo(Parser &p)
void ParseDLaw(Parser &p)
void ParseDont(Parser &p)
void ParseDrive(Parser &p)
void ParseElement(Parser &p)
void ParseExtinguish(Parser &p)
void ParseF_nu(Parser &p, const char *chType, bool lgNU2)
void ParseFluc(Parser &p)
void ParseGlobule(Parser &p)
void ParseGrain(Parser &p)
void ParseGrid(Parser &p)
void ParseHDEN(Parser &p)
void ParseIlluminate(Parser &p)
void ParseInit(Parser &p)
void ParseInterp(Parser &p)
void ParseIonParI(Parser &p)
void ParseIonParX(Parser &p)
void ParseNorm(Parser &p)
void ParseOptimize(Parser &p)
void ParsePlot(Parser &p)
void ParsePowerlawContinuum(Parser &p)
void ParsePrint(Parser &p)
void ParseRadius(Parser &p)
void ParseRangeOption(Parser &p)
void ParseRatio(Parser &p)
void ParseSave(Parser &p)
void ParseSphere(Parser &p)
void ParseState(Parser &p)
void ParseStop(Parser &p)
void ParseTable(Parser &p)
void ParseTest(Parser &p)
void ParseTLaw(Parser &p)
void ParseTrace(Parser &p)
UNUSED const double SOLAR_MASS
UNUSED const double SPEEDLIGHT
UNUSED const double PARSEC
const realnum COLUMN_INIT
bool lgStatic(void) const
bool lgBallistic(void) const
char chStoutFile[FILENAME_PATH_LENGTH]
char chCloudyChiantiFile[FILENAME_PATH_LENGTH]
realnum gas_phase[LIMELM]
void SetGasPhaseDensity(const long nelem, const realnum density)
bool lgNegativeIncrements
realnum vparm[LIMEXT][LIMPAR]
bool lgOptimizeAsLinear[LIMPAR]
char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2]
realnum varang[LIMPAR][2]
const double TEMP_STOP_DEFAULT
vector< double > external_mass[3]