TABLE OF CONTENTS


::pwtk::mpdi::load_fromMPDI

SYNOPSIS

proc ::pwtk::mpdi::load_fromMPDI {mpdi {clear_existing 1}} {

PURPOSE

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

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

    # read the namelists & replace INPUTMOPDOS with MOPDOS

    set output [regsub INPUTMOPDOS \
                    [::pwtk::readNamelists $mpdi INPUTMOPDOS] MOPDOS]
                
    # molecularpdos.x must contain an INPUTMOPDOS namelist
    if { $output == "" } {
        ::pwtk::error "input file \"$mpdi\" does not appear to be a molecularpdos.x input file" 1
    }
    
    eval $output
    variable input_flow_list
    ::pwtk::input::namelists_ityp2atmSymb_ $input_flow_list
}