Skip to content

Fix indexing of solsym in run_chm_diags_ts_355 test. #466

@overfelt

Description

@overfelt

In the unit test validate_chm_diags_ts_355 defined in file validation/mo_chm_diags/chm_diags.cpp the names of gas-phase chemical constituents array is dimensioned as char solsym[gas_pcnst][17] where constexpr const int gas_pcnst = gas_chemistry::gas_pcnst; which is 31 but in the mo_chm_diags::chm_diags function that is being tested is indexed in a loop of the form for (int nn = lchnk; nn < pcnst; nn++) where pcnst is set in the file mo_chm_diags.hpp as

 27 constexpr const int pcnst = 80; // FIXME, 80 is the only value I found for this
 28                                 // in the fortran, but using 41 in the test  

Also the setting of char solsym[gas_pcnst][17] is not correct. This is set to an array of char * so should be char *solsym[gas_pcnst].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions