The mechanism conversion script (mech_converter.py) needs to be refactored. At the moment it consists of a giant convert_to_fortran() function, which does a lot of things in a sequence to convert the chemical mechanism from facsimile to fortran format.
In addition, two other scripts have been added to the conversion process and are called within convert_to_fortran():
fix_mechanism_fac.py to preprocess the facsimile file
kpp_conversion.py to support an alternative kpp format
The whole thing is hard to maintain/modify and probably not very efficient. The code should be split in smaller functions and reorganized accordingly.
The mechanism conversion script (
mech_converter.py) needs to be refactored. At the moment it consists of a giantconvert_to_fortran()function, which does a lot of things in a sequence to convert the chemical mechanism from facsimile to fortran format.In addition, two other scripts have been added to the conversion process and are called within
convert_to_fortran():fix_mechanism_fac.pyto preprocess the facsimile filekpp_conversion.pyto support an alternative kpp formatThe whole thing is hard to maintain/modify and probably not very efficient. The code should be split in smaller functions and reorganized accordingly.