TABLE OF CONTENTS


::pwtk::pri::load_fromPRI

SYNOPSIS

proc ::pwtk::pri::load_fromPRI {pri {clear_existing 1}} {

PURPOSE

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

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

    # read the namelists

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

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

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