Detailed documentation of the PLATIN (PLant-ATmosphere INteraction) model