40 const char chJob[10] ,
155 COmole_rate[ipR_SiP_Mg_Si_MgP].rk +
159 COmole_rate[ipR_SP_Mg_S_MgP].rk +
163 COmole_rate[ipR_CP_Mg_C_MgP].rk +
209 for( ion=0; ion<nelem+2; ++ion )
221 " CO_drive4 do not evaluate CO chemistry.\n");
242 " CO_drive5 CO chemistry loop %li chReason %s.\n" , loop, chReason );
251 fprintf(
ioQQQ,
"codrivbug %.2f %li Neg?:%c\tZero?:%c\tOH new\t%.3e\tCO\t%.3e\tTe\t%.3e\tH2/H\t%.2e\n",
276 fprintf(
ioQQQ,
"CO_drive not converged\n");
304 " PROBLEM CO_drive failed to converge1 due to negative pops, zone=%.2f, CO/C=%.2e OH/C=%.2e H2/H=%.2e\n",
322 " PROBLEM CO_drive failed to converge2 in %li iter, zone=%.2f, CO/C=%.2e negpop?%1c reason:%s\n",
343 double sum_ion , sum_mol;
346 if( fabs(sum_ion-sum_mol)/
SDIV(sum_mol) > 1e-2 )
356 fprintf(
ioQQQ,
"CO_drive not converged\n");
360 if( fabs(sum_ion-sum_mol)/
SDIV(sum_mol) > 1e-2 )
370 fprintf(
ioQQQ,
"CO_drive not converged\n");
379 const char chJob[10] ,
385 static realnum hden_save_prev_call;
390 const bool DEBUG_MOLECAVER =
false;
393 strcpy( chReason ,
"none given" );
396 if( strcmp(
"SETUP" , chJob ) == 0 )
398 static realnum hden_save_prev_iter;
451 if( DEBUG_MOLECAVER )
452 fprintf(
ioQQQ,
" DEBUG lgMolecAver iteration %li zone %li zeroing since very first call. H2/H=%.2e\n",
470 if( DEBUG_MOLECAVER )
471 fprintf(
ioQQQ,
" DEBUG lgMolecAver iteration %li zone %li resetting since first call on new iteration. H2/H=%.2e\n",
489 if( DEBUG_MOLECAVER )
490 fprintf(
ioQQQ,
"DEBUG lgMolecAver iteration %li zone %li second zone on new iteration, saving reset.\n",
iteration,
nzone);
497 else if( strcmp(
"AVER" , chJob ) == 0 )
532 if( fabs(ratio-1.) < 1.5 ||
533 fabs(ratio-1.) > 0.66 )
537 COmole[i]->co_save*damper;
543 (log10(
COmole[i]->hevmol) + log10(
COmole[i]->co_save))/2. );
566 sprintf( chReason ,
"OH change from %.3e to %.3e",
578 sprintf( chReason ,
"CO/C >1, value is %e",
584 fprintf(
ioQQQ,
" DEBUG lgMolecAver converged? %c" ,
TorF(lgReturn) );
587 fprintf(
ioQQQ,
"\n" );