TABLE OF CONTENTS


::pwtk::di::load_fromDI

SYNOPSIS

proc ::pwtk::di::load_fromDI {di {clear_existing 1}} {

PURPOSE

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

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

    # read the namelist

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

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

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