<commit_before>#include "pihm.h"

void ReadBgc(const char *fn, ctrl_struct *ctrl, co2control_struct *co2,
    ndepcontrol_struct *ndepctrl, cninit_struct * cninit, char *co2_fn,
    char *ndep_fn)
{
    FILE           *bgc_file;
    char            cmdstr[MAXSTRING];
    int             lno = 0;

    /* Read bgc simulation control file */
    bgc_file = fopen(fn, "r");
    CheckFile(bgc_file, fn);
    PIHMprintf(VL_VERBOSE, " Reading %s\n", fn);

    FindLine(bgc_file, "RESTART", &lno, fn);
    NextLine(bgc_file, cmdstr, &lno);
    sscanf(cmdstr, "%d", &ctrl->read_bgc_restart);
    NextLine(bgc_file, cmdstr, &lno);
    sscanf(cmdstr, "%d", &ctrl->write_bgc_restart);

    FindLine(bgc_file, "CO2_CONTROL", &lno, fn);
    NextLine(bgc_file, cmdstr, &lno);<commit_msg>:zap: Control BGC spinup in bgc input<commit_after>#include "pihm.h"

void ReadBgc(const char *fn, ctrl_struct *ctrl, co2control_struct *co2,
    ndepcontrol_struct *ndepctrl, cninit_struct * cninit, char *co2_fn,
    char *ndep_fn)
{
    FILE           *bgc_file;
    char            cmdstr[MAXSTRING];
    int             lno = 0;
    int             acc_flag = 0;

    /* Read bgc simulation control file */
    bgc_file = fopen(fn, "r");
    CheckFile(bgc_file, fn);
    PIHMprintf(VL_VERBOSE, " Reading %s\n", fn);

    FindLine(bgc_file, "RESTART", &lno, fn);
    NextLine(bgc_file, cmdstr, &lno);
    sscanf(cmdstr, "%d", &ctrl->read_bgc_restart);
    NextLine(bgc_file, cmdstr, &lno);
    sscanf(cmdstr, "%d", &ctrl->write_bgc_restart);

    FindLine(bgc_file, "TIME_DEFINE", &lno, fn);
    NextLine(bgc_file, cmdstr, &lno);
    if (spinup_mode)
    {
        sscanf(cmdstr, "%d", &acc_flag);
        spinup_mode = (acc_flag == 1) ? ACC_SPINUP_MODE : SPINUP_MODE;
    }

    FindLine(bgc_file, "CO2_CONTROL", &lno, fn);
    NextLine(bgc_file, cmdstr, &lno);
{'fraction_non_alphanumeric': 0.14355628058727568, 'fraction_numerical': 0.0065252854812398045, 'mean_word_length': 3.210526315789474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2596913', 'n_tokens_mistral': 754, 'n_tokens_neox': 737, 'n_words': 149}