carbon_bsn_read Subroutine

subroutine carbon_bsn_read()

Uses

  • proc~~carbon_bsn_read~~UsesGraph proc~carbon_bsn_read carbon_bsn_read module~basin_module basin_module proc~carbon_bsn_read->module~basin_module module~carbon_module carbon_module proc~carbon_bsn_read->module~carbon_module module~input_file_module input_file_module proc~carbon_bsn_read->module~input_file_module module~plant_data_module plant_data_module proc~carbon_bsn_read->module~plant_data_module module~tillage_data_module tillage_data_module proc~carbon_bsn_read->module~tillage_data_module

reads carbon parameters from carbon.bsn and carbon_lyr.bsn.

carbon.bsn: title line, column header line, single data row with 28 values (22 original scalars, 5 residue-decomp tunables n_act_frac, cnr_cap, cnr_ref, cpr_cap, cpr_ref, and the mathers_method 0/1 flag for humus-slow pool initialization). legacy cbn_diag column (retired output flag) removed entirely. Example files no longer carry it.

carbon_lyr.bsn: title line, column header line, then one data row per layer group. each data row starts with an integer layer id (1 = top, 2 = subsurface) followed by 11 coefficients for that layer. layer id is the array index into carbdb(:) and org_allo(:), so future expansion past dimension(2) needs no change to this reader.

both files are required when bsn_cc%cswat == 2; the routine aborts via error stop if either file is missing, or if its data line(s) are missing or malformed. the leading title and column-header lines are optional and may be blank. no-op when carbon is off.

carbon.bsn (scalars)

comment and column-header lines are optional (may be blank); read with '(a)' so a blank line consumes exactly one record instead of skipping it. mathers_method: 1 = use the Mathers humus-slow init in soil_nutcarb_init, 0 = original method carbon_lyr.bsn (per-layer table)

the per-layer file name is built from carbon.bsn so it tracks any rename in file.cio: carbon.bsn -> carbon_lyr.bsn, foo.bsn -> foo_lyr.bsn. it travels with carbon.bsn and is not separately listed in file.cio.

Arguments

None