TABLE OF CONTENTS


::pwtk::ppi::load_fromPPI

SYNOPSIS

proc ::pwtk::ppi::load_fromPPI {ppi {clear_existing 1}} {

PURPOSE

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

    if { [::pwtk::is_true $clear_existing] } {
        # clear the current pp.x input data ...
        ::pwtk::input::clear INPUTPP PLOT
    }
    
    # read the namelists

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

    # pp.x must contain at least one of the two namelists
    if { $output == "" } {
        ::pwtk::error "input file \"$ppi\" does not appear to be a pp.x input file" 1
    }

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