TABLE OF CONTENTS


::pwtk::bi::load_fromBI

SYNOPSIS

proc ::pwtk::bi::load_fromBI {bi {clear_existing 1}} {

PURPOSE

Load the input data from existing bands.x input file.

If clear_existing == 1, then the current input will be cleared, but otherwise the data will be simply added to the existing data.

ARGUMENTS

SOURCE

    ::pwtk::fileMustExist $bi "bands.x input"

    if { [::pwtk::is_true $clear_existing] } {
        # clear the current bands.x input data ...
        ::pwtk::input::clear BANDS
    }

    # read the namelists

    set output [::pwtk::readNamelists $bi $::pwtk::bi::input_flow_list]

    # bands.x must contain a BANDS namelist
    if { $output == "" } {
        ::pwtk::error "input file \"$bi\" does not appear to be a bands.x input file" 1
    }

    eval $output
    ::pwtk::input::namelists_ityp2atmSymb_ $::pwtk::bi::input_flow_list
}