A N-dimensional Fortran Interpolation Program (NterGeo.v2020a) for Geophysics Sciences-Application to a back-trajectory program (BACKPLUMES.v2020r1) using CHIMERE or WRF outputs

An interpolation program coded in Fortran for irregular N-dimensional cases is presented and freely available. Needs of interpolation procedure over irregular meshes or matrixes with interdependent input data dimensions is frequent in geophysical models. Also, these models often embed look-up tables of physics/chemistry modules. Fortran is a powerful and fast language, highly portable and easy to interface with other existing Fortran models. Our program does not need any libraries and can be compiled with any Fortran compiler. The program is fast and competitive compared to current Python libraries. A 5 novel optional parameter (normalisation option) is provided when considering different types of units on each dimension. For the general program, the inverse distance is used for the weight calculation with a distance defined as a p-distance. Some tests and examples are provided and available in the code package. Moreover, a real case of geophysics application embedding this interpolation program is provided and discussed, it consists in determining back-trajectories using atmospheric dispersion or mesoscale meteorological model outputs, respectively from the widely used models CHIMERE and WRF. 10


Reviewer #1
This manuscript presents an useful tool to support the scientific analysis of atmospheric model outputs. This tool allows the estimation of back trajectories of plumes and it is directly linked to commonly-used regional atmospheric and chemistry-transport models, such as WRF or CHIMERE. The fact that the tool is directly linked to these models allows a total consistence beteween forward and backward estimates, as 5 the wind field and grid are the same in both cases. The methodology is well described, with a clear and well-structured overall presentation. The code is available, through a link provided in the manuscript. I strongly recommend the publication of this manuscript in GMD. Here some minor comments that I consider that could improve the manuscript (but not necessary for publication).
Answer: 10 We acknowledge the reviewer for these interesting comments. There is also some questions, certainly because our text was not clear enough. Some minor corrections are then put into the manuscript as suggested by the reviewer.
1. In page 36, the authors mention that BACKPLUMES is different than other back-trajectories models, such as Hysplit or Flexpart. Could the authors explain more the differences with the before-mentioned 15 models? As the authors mention more processes than atmospheric motions, such as chemistry and deposition processes, can they be more precise, indicating which models consider those processes (further than only atmospheric motions)?

Answer:
There is no page 36 but we assume it is probably page 2 (introduction) or page 11. The paragraph 20 describing the backplumes model was completely changed to answer these questions. The introduction is simplified (because it is not the place for a model description) and the 'backplumes' section is enriched with more details about the model. The new part in the introduction is: In order to quantify the impact of such new interpolation program and show examples of its use, it is implemented in the back-tajectory model Backplumes, developed in the same team than the CHIMERE model, Mailler et al. (2017). This host model is well dedicated for this implementation, because the most important part of its calculation is an interpolation of a point in a model grid box. and the new paragraph for the presentation of the backplumes model is:

The Backplumes model
In order to test this new interpolation program, it is implemented in a backtrajectories model called "Backplumes". This model was already used in some studies such as (Mailler et al., 2016) and (Flamant et al., 2018) for example. Backplumes is open source and is available on the CHIMERE web site. Backplumes calculates backtrajectories from a starting point and a starting date. It is different from other 'backtrajectories' models, such as HYSPLIT (Stein et al., 2015), STILT (Lin et al., 2003), (Nehrkorn et al., 2010) and Flexpart (Pisso et al., 2019), because it is launching hundreds of passive tracers and plot as outputs all trajectories. Thus the answer is complementary compared to the other models: the output results is all possible trajectories, and not only the most probable. An advantage of Backplumes for the WRF and CHIMERE users is that the code is dedicated to directly read output results of these models. Being developed by the CHIMERE developers teams, the code is completely homogeneous with CHIMERE in term of numerical libraries. Another advantage is that the code is very fast and calculates hundreds of trajectories in a few minutes. Using the wind fields of WRF or CHIMERE, and running on the same grid, the results of backtrajectories are fully consistent with the simulations done by the models. The model is dedicated to calculate transport but not chemistry: only passive tracers are released. But a distinction could be made between gaseous or aerosol tracer: for the latter one, scavenging is calculated to have a more realistic trajectory. The model is easy to use and light because a small set of meteorological parameters is required. These meteorological parameters are described in Table ?? for WRF and CHIMERE.
2. In the comparison with Hysplit, could the authors indicate if their methodology consider the same meteorological parameters?
Answer: Yes, the same meteorological parameters are used and it is now explain in the new 'backplumes' 5 section.
3. It would be appreciated to include a comment (or to highlight if already included; apparently it is not included) about the target pollutants, if used for chemistry-transport models; if back trajectories are mainly estimated considering atmospheric motions this code can be used mainly for non-reactive pollutants. 10

Answer:
Backplumes can only calculates the transport of passive tracers. It was added in the new paragraph.
4. The authors mention through the paper "particles". Please clarify this more (or if it is a general pollutant, not necessarily a particle) Answer:

5.
Could it be possible (not necessary for publication) to have an example of the comparison with Hysplit and Python for the WRF and CHIMERE applications? It could be useful for potential users.

Answer:
There is no comparison with Hysplit because this is not the same kind of trajectories which are calcu-20 lated. But there is a comparison of 'Backplumes' used with WRF and CHIMERE. There is an interest to compare the same kind of calculation with two different forcings since the goal of this paper is to present a new interpolation algorithm.