**WARNING: The following tutorial applies to LIS version 1.5 and only on CNES HPC.
However, it could be an example for generating custom preparation script outside of the CNES HPC**
## Prerequisites
The script prepare_snow_annual_map_data.py can only be launch on CNES HPC and with specific modules:
The script prepare_data_for_snow_annual_map.py can only be launch on CNES HPC and with specific modules:
- Python in version 3.5.2
- Amalthee in version 0.2
...
...
@@ -19,13 +19,13 @@ module load python/3.5.2
module load amalthee
```
The script prepare_snow_annual_map_data.py must be located along the following scripts, in order to launch correctly the sub-tasks:
The script prepare_data_for_snow_annual_map.py must be located along the following scripts, in order to launch correctly the sub-tasks:
-[run_lis_from_filelist.sh](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/blob/develop/hpc/run_lis_from_filelist.sh), it is a PBS script dedicated to the production of the snow products
-[run_snow_annual_map.sh](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/blob/develop/hpc/run_snow_annual_map.sh), it is a PBS script dedicated to the production of the snow annual maps
## Configuration parameters
The scripts prepare_snow_annual_map_data.py does not take additional argument in itself. To edit the configuration,
The scripts prepare_data_for_snow_annual_map.py does not take additional argument in itself. To edit the configuration,
the script must be modified manually with any text editor. The section of the script to modify is reported below.
```
...
...
@@ -53,7 +53,7 @@ def main():
These parameters are described in [snow_annual_map_schema.json](https://gitlab.orfeo-toolbox.org/remote_modules/let-it-snow/blob/develop/doc/snow_annual_map_schema.json)
and correspond to the parameters of the json file to provide to the application run_snow_annual_map.py.
However, the two last parameters are specific to prepare_snow_annual_map_data.py:
However, the two last parameters are specific to prepare_data_for_snow_annual_map.py:
- "snow_products_dir", must be filled with the storage path chosen for all the snow products.
- "data_availability_check", must remains at "false" and is only modified by the script itself if all the data required for the snow annual map processing are available.
...
...
@@ -65,7 +65,7 @@ The only external configuration parameters is the following file:
The script can now simply be launched by the following command:
```
python prepare_snow_annual_map_data.py
python prepare_data_for_snow_annual_map.py
```
The generated log allows to monitor the status of the data requires before snow annual map processing.
...
...
@@ -74,7 +74,7 @@ In the case where all the required snow products are not already available in th
- the first one is a request for the generation of the missing snow products under **"snow_products_dir"**, when the L2A products are available.
- the second one is triggered when some L2A products are not available, the sub-process in then in charge for the downloading of the products in to the datalake (see Amalthee documentation for command amalthee_theia.fill_datalake())
Because these sub-processes are asynchronous, it is required to run the prepare_snow_annual_map_data.py multiple time.
Because these sub-processes are asynchronous, it is required to run the prepare_data_for_snow_annual_map.py multiple time.
For example, if no data is available and that it is the first time you run the script, it would require to run it 3 times:
- the first time to fill the datalake with the requested L2A products.
- the second time to generate all the snow products corresponding to these L2A products