The MesODiF package for gradient computations with the atmospheric model Meso-NH. The meso-scale meteorological model Meso-NH is able to simulate atmospheric events ranging from the meso-scale down to the micro-scale. It also allows for transport and diffusion of passive scalar quantities such as pollutants coming from the coupling with a chemical package. The MesODiF package was generated to complete Meso-NH with both a tangent linear code and an adjoint code. The differentiation work, realized with respect to the state variables, is done on the adiabatic part of the code. Physical parameterizations are not taken into account yet. The linearized codes are efficient both in time and memory consumptions. In particular, checkpoint schemes and an appropriate differentiation of the Leap-Frog scheme of Meso-NH allow the computation of gradients on simulations with a physical meaning at a low CPU-time cost. Sensitivity analysis and variational data assimilation experiments are now attainable by the Meso-NH model.