stefanfluck / palmpy

Package supporting the generation of static driver files for simulations with the PALM model system. Check out the Wiki and engage in the Discussions!
GNU General Public License v3.0
18 stars 4 forks source link

rewrite dialect input with exec() statements. #39

Open stefanfluck opened 3 years ago

stefanfluck commented 3 years ago

Currently, each new dialect requires 1) a dialect.py file in the dicts folder and 2) a couple of lines in the make_static routine. automate that with exec('command as string'). Therefore, any kind of string can be supplied in the namelist, and just the file can be supplied in the dicts folder.

alternative: make path of dicts folder/file also an input in the namelist. if none provided -> use current path as it is now.

stefanfluck commented 3 years ago

use mpd = importlib.import_module('palmpy.staticcreation.dictfolder.'+dialectvar')