14 FILE *ioPUN,
long int ipPun,
size_t maxLevels );
23 if( strcmp(
save.chSaveArgs[ipPun],
"LABE" )==0 )
25 if(
save.lgPunHeader[ipPun] )
28 fprintf( ioPUN,
"#Species labels\n" );
29 save.lgPunHeader[ipPun] =
false;
33 fprintf( ioPUN,
"%s\n", spg->
label.c_str() );
39 else if( strcmp(
save.chSaveArgs[ipPun],
"LEVL") == 0 )
42 if(
save.lgPunHeader[ipPun] )
45 fprintf( ioPUN,
"#Species\tnumber of levels\n" );
46 save.lgPunHeader[ipPun] =
false;
52 fprintf( ioPUN,
"%s", spg->
label.c_str() );
54 fprintf( ioPUN,
"\t%4lu\n", 0UL );
56 fprintf( ioPUN,
"\t%4lu\n", (
unsigned long)sp->
levels->
size() );
63 if( strcmp(
save.chSaveSpecies[ipPun],
"" ) == 0 )
66 size_t mostLevels = 0;
74 ASSERT( mostLevels < 10000 );
87 fprintf(
ioQQQ,
"Could not find species %s, so SAVE SPECIES LABELS to get a list of all species."
88 "\nSorry.\n",
save.chSaveSpecies[ipPun] );
93 if( saveSpecies->
levels != NULL )
106 fprintf(ioPUN,
"\t0");
108 fprintf(ioPUN,
"\t%.3e", arg);
114 FILE *ioPUN,
long int ipPun,
size_t maxLevels )
125 if( strcmp( chKey,
"ENER" )==0 )
127 if(
save.lgPunHeader[ipPun] )
129 save.lgPunHeader[ipPun] =
false;
131 fprintf( ioPUN,
"#species energies");
132 for(
size_t i = 0; i < maxLevels; ++i )
134 fprintf( ioPUN,
"\t%lu", (
unsigned long)i );
136 fprintf( ioPUN,
"\n");
139 fprintf( ioPUN,
"%s", spg->
label.c_str() );
142 fprintf( ioPUN,
"\t%.6e", 0. );
148 ASSERT( (*st).g() > 0.f );
149 fprintf( ioPUN,
"\t%.6e",
AnuUnit( (*st).energy().Ryd() ) );
152 fprintf( ioPUN,
"\n");
156 if( strcmp( chKey,
"POPU" )==0 )
158 if(
save.lgPunHeader[ipPun] )
160 fprintf( ioPUN,
"#depth [cm] species populations [cm-3]");
162 for(
size_t i = 0; i < maxLevels; ++i )
164 fprintf( ioPUN,
"\t%lu", (
unsigned long)i );
166 fprintf( ioPUN,
"\n");
167 save.lgPunHeader[ipPun] =
false;
170 fprintf( ioPUN,
"%.5e",
radius.depth_mid_zone );
171 fprintf( ioPUN,
"\t%s", spg->
label.c_str() );
179 bool lgZeroHit =
false;
186 if( (*st).Pop() == 0.)
190 fprintf( ioPUN,
"\n");
192 else if( strcmp( chKey,
"COLU" )==0 )
195 if(
save.lgPunHeader[ipPun] )
197 fprintf( ioPUN,
"#species column density [cm-2]");
199 for(
size_t i = 0; i < maxLevels; ++i )
201 fprintf( ioPUN,
"\t%lu", (
unsigned long)i );
203 fprintf( ioPUN,
"\n");
204 save.lgPunHeader[ipPun] =
false;
207 fprintf( ioPUN,
"%s", spg->
label.c_str() );
216 bool lgZeroHit =
false;
222 if( (*st).ColDen() == 0.)
226 fprintf( ioPUN,
"\n");
double AnuUnit(realnum energy)
#define DEBUG_ENTRY(funcname)
ProxyIterator< qStateConstProxy, qStateConstProxy > const_iterator
t_mole_global mole_global
molezone * findspecieslocal(const char buf[])
molecule * findspecies(const char buf[])
STATIC void SaveSpeciesOne(const size_t species_index, const char chKey[], FILE *ioPUN, long int ipPun, size_t maxLevels)
STATIC void PrintShortZero(FILE *ioPUN, double arg)
void SaveSpecies(FILE *ioPUN, long int ipPun)