TABLE OF CONTENTS


::pwtk::hpi::load_fromHPI

SYNOPSIS

proc ::pwtk::hpi::load_fromHPI {hpi {clear_existing 1}} {

PURPOSE

Load the input data from existing hp.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 $hpi "hp.x input"

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

    # read the namelist

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

    # hp.x must contain an INPUTHP namelist
    if { $output == "" } {
        ::pwtk::error "input file \"$hpi\" does not appear to be a hp.x input file" 1
    }

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