Using MesoNH datasets with CAMS » History » Version 1
Rafael Bailon-Ruiz, 2020-08-28 18:22
1 | 1 | Rafael Bailon-Ruiz | h1. Using MesoNH datasets with CAMS |
---|---|---|---|
2 | |||
3 | The "Mesonh file format":http://mesonh.aero.obs-mip.fr/mesonh54 is a file format that encapsulate atmospheric data, developped by the CNRM-GAME and the Toulouse Aerology laboratory. It is an anelastic and non-hydrostatic model, which simulates the atmosphric movements from meso-scale (~1000km) to meter scale. |
||
4 | Mesonh files are compiled and large files, thus it needs a special reading of the file (partial loading in memory, getting the variables). This is the objective of this library. |
||
5 | |||
6 | h2. Creating the dataset from file |
||
7 | |||
8 | First of all, we create a dataset by using our MesonhDataset class. The class takes a path or a list of paths that leads to MesonhFiles. The files passed will be loaded inside an "xarray":http://xarray.pydata.org/en/stable/why-xarray.html. Once done, we have loaded data inside, but access the whole data at once would crash the computer because of the huge amount it has inside. First of all, we need to access the different variables of the dataset. |
||
9 | |||
10 | h2. Accessing variables |
||
11 | |||
12 | Since we want to access to variables and their state at specific space and time moment, we need a accessor. For this, we use a MesonhVariable accessor. Its usage is bind to a specific variable and its goal is to retrieve data from the dataset using the keys of the map that are related to this variable. To interface variable accessor and dataset, we use a MesonhInterface class or subclass. |
||
13 | |||
14 | h2. Samples and Aircrafts |
||
15 | |||
16 | When Aircrafts are flying, they acquire data from their current position. This works this way in both simulation and real flights mode. Because of that, the Mesonh samples from MesonhDataset follows the same idea. For this, we use the MesonhProbe plugin for the Aircrafts. When the status of the Aircraft are updated, we fetch the current sample with the UAV position. Once fetched, the sample is added to the database. This way, we can build maps from the database using samples from the Mesonh (without using the whole ground truth). |