AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
59 stars 22 forks source link

Refactor the mechanism conversion scripts #505

Open rs028 opened 10 months ago

rs028 commented 10 months ago

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():

  1. fix_mechanism_fac.py to preprocess the facsimile file
  2. 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.

rs028 commented 10 months ago

Issue #487 is also relevant and cna be addressed at the same time.