53 bool lgQuotesFound =
true;
54 if (p.
GetQuote(chString_quotes_lowercase,
false))
55 lgQuotesFound =
false;
94 " One of the keywords AS DR or CS must appear to change"
95 " the transition probabilities, dielectronic recombination rate,"
96 " or collision strength.\n Sorry.\n");
109 fprintf(
ioQQQ,
" No molecule was on this SET ATOMIC DATA command.\n Sorry.\n");
110 fprintf(
ioQQQ,
" Use SET ATOMIC DATA ION to change an ion.\n Sorry.\n");
114 if (strcmp(chMole,
"H2") == 0)
116 if (p.
nMatch(
" H ") && lgCS)
122 long int nYear = (long) p.
FFmtRead();
124 p.
NoNumb(
"collison data set (year)");
133 else if (nYear == 2007)
144 fprintf(
ioQQQ,
" the SET ATOMIC DATA MOLECULE H2"
145 " H CS command must have year 1999 or 2007.\n");
149 else if (p.
nMatch(
" HE ") && lgCS)
159 else if( p.
nMatch(
"BOUR") )
170 fprintf(
ioQQQ,
" the SET ATOMIC DATA MOLECULE H2"
171 "He CS command must have ORNL or Le BOURlot.\n");
177 fprintf(
ioQQQ,
" the SET ATOMIC DATA H2 CS command requires a collider keyword.\n" );
205 else if (p.
nMatch(
" DIMA"))
212 " \nPROBLEM Unrecognized set collisional ionization data option.\n");
213 fprintf(
ioQQQ,
" Valid options are Dima or Hybrid.\n");
214 fprintf(
ioQQQ,
" See Hazy 1 for details.\n");
228 else if( p.
nMatch(
"AD69" ) )
239 fprintf(
ioQQQ,
" There should have been an option on this SET H2 CONTinuum DISSociation command.\n" );
240 fprintf(
ioQQQ,
" consult Hazy to find valid options.\n Sorry.\n" );
253 p.
NoNumb(
"minimum charge transfer rate");
271 else if( p.
nMatch(
" OFF" ) )
307 else if( p.
nMatch(
" OFF" ) )
341 else if( p.
nMatch(
" OFF" ) )
356 " There should have been an option on this SET CHEMISTRY command.\n");
357 fprintf(
ioQQQ,
" consult Hazy to find valid options.\n Sorry.\n");
376 else if (p.
nMatch(
"COVE"))
392 else if (p.
nMatch(
"CSUP"))
399 p.
NoNumb(
"secondary ionization rate");
405 else if (p.
nMatch(
" D/H"))
425 p.
NoNumb(
"density tolerance");
435 fprintf(
ioQQQ,
" The SET HO CHAR command is no longer supported.\n" );
441 fprintf(
ioQQQ,
" The SET HHE CHAR command is no longer supported.\n" );
445 else if( p.
nMatch(
"12C1") )
455 p.
NoNumb(
"12C to 13C abundance ratio");
463 else if (p.
nMatch(
"DYNA"))
471 p.
NoNumb(
"advection length");
499 else if (p.
nMatch(
"SUPE"))
504 else if (p.
nMatch(
"STRO"))
509 else if (p.
nMatch(
"ORIG"))
523 p.
NoNumb(
"antishock depth");
534 p.
NoNumb(
"antishock-by-mach");
536 else if (p.
nMatch(
"RELA"))
542 p.
NoNumb(
"relaxation cycles before start of dynamics");
546 " First iteration to relax dynamics must be > 1."
572 " There should have been an option on this SET DYNAMICS command.\n");
573 fprintf(
ioQQQ,
" consult Hazy to find valid options.\n Sorry.\n");
578 else if (p.
nMatch(
"DIDZ"))
590 p.
NoNumb(
"largest optical depth allowed in zone");
595 else if (p.
nMatch(
"EDEN"))
606 p.
NoNumb(
"electron density error allowed");
614 else if(p.
nMatch(
"FRACTION"))
620 p.
NoNumb(
"electron density fraction");
637 p.
NoNumb(
"electron density");
646 else if( p.
nMatch(
"GBAR"))
661 p.
NoNumb(
"ionization error allowed");
693 " An element name must appear on this line\n Sorry.\n");
702 " The number of resolution elements within FWHM of line must appear\n Sorry.\n");
712 lower_limit = pow((
realnum) 10.f, lower_limit);
714 if (lower_limit > 0.2f)
717 " The fine continuum lower limit is quite high (%f Ryd). Please check.\n",
727 upper_limit = pow((
realnum) 10.f, upper_limit);
729 if (upper_limit < 10.f)
732 " The fine continuum upper limit is quite low (%f Ryd). Please check.\n",
752 p.
NoNumb(
"grain heating");
758 " A keyword must appear on the SET GRAIN line - options are HEAT \n Sorry.\n");
788 else if (p.
nMatch(
" H2 "))
794 " The first number on this line must be the 2 in H2\n Sorry.\n");
805 "PROBLEM - *set H2 Solomon* has been changed to *set H2 small model*."
806 " This is OK for now but it may not work in a future version.\n");
813 else if (p.
nMatch(
" BHT"))
820 else if (p.
nMatch(
"BD96"))
827 else if (p.
nMatch(
"ELWE"))
837 " One of the keywords TH85, _BHT, BD96 or ELWErt must appear.\n Sorry.\n");
851 else if (p.
nMatch(
"TAKA"))
857 else if (p.
nMatch(
"THER"))
866 " The grain form pump option is wrong.\n Sorry.\n");
872 else if (p.
nMatch(
"JURA"))
879 else if (p.
nMatch(
"CT02"))
884 else if (p.
nMatch(
"SN99"))
889 else if (p.
nMatch(
"RATE"))
904 else if (p.
nMatch(
"SCAL"))
914 p.
NoNumb(
"scale for Jura rate");
921 "SET H2 JURA SCALE %f LOG");
936 fprintf(
ioQQQ,
" The Jura rate option is wrong.\n Sorry.\n");
942 else if (p.
nMatch(
" TAD"))
946 p.
NoNumb(
"temperature for binding energy");
952 else if (p.
nMatch(
"FRAC"))
960 p.
NoNumb(
"H2 fractional abundance");
979 p.
NoNumb(
"H2 formation scale");
982 if (
hmi.H2_formation_scale <= 0.)
991 else if (p.
nMatch(
"HCOR"))
995 p.
NoNumb(
"scale for H0 correction to e- collision rate");
998 else if (p.
nMatch(
" PAH"))
1006 else if (p.
nMatch(
"CONS"))
1011 else if (p.
nMatch(
"BAKE"))
1022 " a string, or one of the keywords BAKES, or CONStant must appear.\n Sorry.");
1028 else if (p.
nMatch(
"PRES"))
1037 p.
NoNumb(
"pressure convergence tolerance");
1043 else if( p.
nMatch(
"IONI") )
1050 p.
NoNumb(
"number of calls from pressure to ion solver");
1054 fprintf(
ioQQQ,
" The limit must be greater than zero.\n Sorry.");
1064 " I didn\'t recognize a key on this SET PRESSURE line.\n");
1065 fprintf(
ioQQQ,
" The ones I know about are: CONVergence and IONIze.\n");
1069 else if (p.
nMatch(
"RECOMBIN"))
1072 if (p.
nMatch(
"DIELECTR"))
1079 for (
int ion = 0; ion <
LIMELM; ++ion)
1083 else if (p.
nMatch(
"SCALE"))
1091 " There must be at least one scale factor on the SET RECOMBIANTION MEAN command.\n");
1095 for (
int ion = 1; ion <
LIMELM; ++ion)
1102 for (
int ion = 0; ion <
LIMELM; ++ion)
1107 " All scale factors on the SET RECOMBIANTION MEAN command must be >=0.\n");
1113 else if (p.
nMatch(
"NOISE"))
1124 fprintf(
ioQQQ,
" key OFF or NOISE must appear.\n");
1130 fprintf(
ioQQQ,
" key MEAN must appear.\n");
1137 " key DIELECTRonic must appear on set recombination command.\n");
1142 else if (p.
nMatch(
" DR "))
1154 p.
NoNumb(
"zone thickness");
1167 "\n Thicknesses less than about %.0e will NOT give accurate results. If tricking the code\n",
1171 " into computing emissivities instead of intensities, try to instead use a thickness of unity,\n");
1174 " and then multiply (divide) the results by the necessary thickness (product of densities).\n\n");
1181 " When using a relative dr, a fraction between 0 and 1 must be entered. Found: %g\n",
1187 else if (p.
nMatch(
"DRMA"))
1192 p.
NoNumb(
"maximum zone thickness");
1203 " When using a relative drmax, a fraction between 0 and 1 must be entered. Found: %g\n",
1214 p.
NoNumb(
"minimum zone thickness rel to depth");
1221 fprintf(
ioQQQ,
" When using a relative drmin, a fraction between 0 and 1 must be entered. Found: %g\n",
1227 else if (p.
nMatch(
"DRMI"))
1232 p.
NoNumb(
"minimum zone thickness");
1242 fprintf(
ioQQQ,
" When using a relative drmin, a fraction between 0 and 1 must be entered. Found: %g\n",
1248 else if (p.
nMatch(
"FLXF"))
1254 p.
NoNumb(
"faintest continuum flux to consider");
1269 p.
NoNumb(
"line precision");
1274 " set line precision currently only works for up to 6 significant figures.\n");
1282 else if (p.
nMatch(
"NFNU"))
1305 || p.
nMatch(
"DIFFUSE I");
1315 " set nFnu expects one or more of the following keywords:\n");
1316 fprintf(
ioQQQ,
" INCIDENT_REFLECTED, INCIDENT_TRANSMITTED, "
1317 "DIFFUSE_INWARD, DIFFUSE_OUTWARD\n");
1323 else if (p.
nMatch(
"IND2"))
1330 else if( p.
nMatch(
" OFF") )
1336 fprintf(
ioQQQ,
" set ind2 needs either ON or OFF.\n" );
1343 else if (p.
nMatch(
"SPECIES"))
1350 p.
NoNumb(
"the default collision strengths when no collision or radiative data are available");
1355 fprintf(
ioQQQ,
" SET SPECIES takes option GBAR.\n");
1360 else if (p.
nMatch(
"TEMP"))
1367 p.
NoNumb(
"temperature floor");
1376 fprintf(
ioQQQ,
" TE < %gK, reset to %gK.\n",
1384 " TE > %gK. Cloudy cannot handle this. Bailing out.\n",
1394 "SET TEMPERATURE FLOOR %f LOG");
1418 p.
NoNumb(
"heating cooling tolerance");
1430 "\nI did not recognize a keyword on this SET TEMPERATURE command.\n");
1432 fprintf(
ioQQQ,
"The keywords are FLOOr and CONVergence.\n");
1437 else if (p.
nMatch(
"TEST"))
1443 else if (p.
nMatch(
"TRIM"))
1463 else if (p.
nMatch(
"LOWE"))
1489 p.
NoNumb(
"trimming parameter");
1494 fprintf(
ioQQQ,
" number must be negative since log\n");
1499 else if (p.
nMatch(
"SKIP"))
1505 p.
NoNumb(
"number of points to skip in save");
1509 else if (p.
nMatch(
" UTA"))
1528 else if (p.
nMatch(
"KISI"))
1543 else if (p.
nMatch(
"WEAKH"))
1550 p.
NoNumb(
"threshold on save heating and cooling");
1560 else if (p.
nMatch(
"KSHE"))
1566 p.
NoNumb(
"k-shell ionization opacity limit");
1577 fprintf(
ioQQQ,
" k-shell energy must be greater than 194 Ryd\n");
1582 else if (p.
nMatch(
"NCHR"))
1589 p.
NoNumb(
"number of charge states");
1593 long nChrg =
nint(val);
1594 if (nChrg < 2 || nChrg >
NCHU)
1597 " illegal value for number of charge states: %ld\n",
1599 fprintf(
ioQQQ,
" choose a value between 2 and %d\n",
NCHU);
1601 " or increase NCHS in grainvar.h and recompile\n");
1611 else if (p.
nMatch(
"NEGO"))
1617 else if (p.
nMatch(
"NEND"))
1629 p.
NoNumb(
"limit to zone number");
1638 "CAUTION - it will take a lot of memory to save"
1639 " results for %li zones. Is this many zones really necessary?\n",
1644 else if (p.
nMatch(
"TSQD"))
1652 p.
NoNumb(
"highest density in t^2 section of printout");
1657 else if (p.
nMatch(
"NMAP"))
1663 p.
NoNumb(
"steps in heating-cooling map");
1673 else if (p.
nMatch(
"PATH"))
1675 fprintf(
ioQQQ,
" The SET PATH command is no longer supported.\n");
1676 fprintf(
ioQQQ,
" Please set the correct path in the file path.h.\n");
1678 " Or set the environment variable CLOUDY_DATA_PATH.\n Sorry.\n");
1682 else if (p.
nMatch(
"PHFI"))
1688 p.
NoNumb(
"version of PHFIT");
1696 else if (ip == 1996)
1703 fprintf(
ioQQQ,
" Two possible values are 1995 and 1996.\n");
1717 " I didn\'t recognize a key on this SET SAVE HASH line.\n");
1726 if (strcmp(chString_quotes_lowercase,
"return") == 0)
1731 else if (strcmp(chString_quotes_lowercase,
"time") == 0)
1749 fprintf(
ioQQQ,
" the keyword C is no longer necessary since"
1750 " energy conservation is now supported by default.\n");
1753 else if (p.
nMatch(
"SUPP"))
1760 p.
NoNumb(
"line width or resolution");
1764 " line width or resolution must be greater than zero.\n");
1782 else if (p.
nMatch(
"PREF"))
1786 fprintf(
ioQQQ,
" The SET SAVE PREFIX command should precede all save commands.\n" );
1793 else if (p.
nMatch(
"FLUS"))
1802 " There should have been an option on this command.\n");
1804 " Valid options for SET SAVE are summarized in Hazy 1 "
1805 "Miscellaneous commands.\n");
1807 " The SET PUNCHLWIDTH command is now SET SAVE LINE WIDTH.\n");
1813 else if (p.
nMatch(
"CONT"))
1825 "PROBLEM The set FeII continuum command must have"
1826 " three numbers, the lower and upper wavelength range in Angstroms"
1827 " and the number of bins to divide this into.\n");
1833 fprintf(
ioQQQ,
"PROBLEM The first two numbers on the set "
1834 "FeII continuum command must be the lower and upper "
1835 "wavelength range in Angstroms and the first must be less "
1836 "than the second.\n");
1842 "PROBLEM The third number on the set FeII continuum "
1843 "command must be the number of bins to divide the range into and"
1844 " it must be greater than 1.\n");
1850 else if (p.
nMatch(
"RESO"))
1857 p.
NoNumb(
"continuum resolution scale");
1865 else if (p.
nMatch(
"SHIE"))
1878 else if (p.
nMatch(
"FEDE"))
1886 else if (p.
nMatch(
"FERL"))
1890 else if (p.
nMatch(
"NONE"))
1898 " I didn\'t recognize a key on this SET CONTINUUM SHIELDing line.\n");
1900 " The ones I know about are: PESC, FEDErman, & FERLand.\n");
1908 " I didn\'t recognize a key on this SET CONTINUUM line.\n");
1910 " The ones I know about are: RESOlution and SHIEld.\n");
1917 fprintf(
ioQQQ,
" I didn\'t recognize a key on this SET command.\n");
const double DEPTH_OFFSET
const int INPUT_LINE_LENGTH
NORETURN void TotalInsanity(void)
#define DEBUG_ENTRY(funcname)
realnum GrainHeatScaleFactor
long int GetElem(void) const
bool nMatch(const char *chKey) const
const char * StandardEnergyUnit(void) const
NORETURN void NoNumb(const char *chDesc) const
int GetQuote(char *chLabel, bool lgABORT)
int PrintLine(FILE *fp) const
static t_PredCont & Inst()
t_coll_source coll_source[N_X_COLLIDER]
void set_version(phfit_version val)
long add(double energy, const char *unit="Ryd")
void setAssertAbort(bool val)
bool lgInnerShell_Kisielius
double DR_mean_scale[LIMELM]
bool lgCollStrenThermAver
vector< bool > lgTreatIsotopes
void SetNChrgStates(long nChrg)
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
t_mole_global mole_global
UNUSED const double SPEEDLIGHT
#define LINE_CONT_SHIELD_FERLAND
#define LINE_CONT_SHIELD_PESC
#define LINE_CONT_SHIELD_FEDERMAN
t_secondaries secondaries
realnum C12_C13_isotope_ratio_parsed
double ResolutionScaleFactor
bool lgCheckEnergyEveryZone
realnum IonizErrorAllowed
realnum PressureErrorAllowed
realnum GasPhaseAbundErrorAllowed
realnum HeatCoolRelErrorAllowed
double rate_h2_form_grains_set
char chH2_small_model_type
bool lgLeiden_Keep_ipMH2s
realnum vparm[LIMEXT][LIMPAR]
char chVarFmt[LIMPAR][FILENAME_PATH_LENGTH_2]
realnum varang[LIMPAR][2]
const double TEMP_LIMIT_HIGH
const double TEMP_LIMIT_LOW
long int fine_opac_nresolv
char chHashString[INPUT_LINE_LENGTH]
void init_genrand(unsigned long s)