# LUCIA alternative

Gitlab project: https://earth.bsc.es/gitlab/es/lucia-alternative

- **EC-Earth_integration**: Mandatory changes to OASIS src code. Changes to the old
  Lucia tool (CERFACS) so that it is compatible with the modifications done to 
  OASIS. lucia_lite_bsc.py is the script that runs the analysis in the POST job.
- **Final_lucia_lite_documentation.pdf**: Report with detailed information on how to 
  use the tool and interpret the results
- **lucia_lite_portable.py**: Script that can run without the autousubmit 
  environment. It only needs the Oasis log files and setting the parameters 
  manually.


Tool to get performance metrics from coupled experiments using OASIS

Requeriments:
- Tested with Python 3.6 - 3.8, Pandas 1.0.3 and Matplotlib 3.1.3 packages 
  (module load gcc/5.4.0 python/3.7.4 is enough in MN4)


**If using autosubmit:**
1. Set the LUCIA variable to -3 in proj.conf. 
2. The tool will be executed in the POST
job. 
3. You can find the results in the runtime/log/${leg} directory. Note that 
CLEAN job will compress the results into a tgz file and move it out of the
runtime folder.

It is possible to modify the parameters inside the POST.cmd / lucia_lite_bsc.py
files. Default ones will be used otherwise.

**If running without autosubmit:**

1. Copy the lucia_lite.py script where the lucia.??.?????? log files 
   are located, i.e. the experiment run directory.
2. Call it:

    python3 lucia_lite.py minmax 10 10 40

    where the arguments are:
   - Method: "average" or "minmax"
   - ignore_init_ts: number of the coupling steps that will be considered as 
     initialization. Thus, they are ignored.
   - ingore_end_ts: Same but for the finalization.
   - num_ts_print: number of timesteps that will be printed in detail
   - components_to_ignore: list of components that will be ignored during the 
     analysis (IO servers, sequential components...)
   


Results will be stored in **lucia_lite_results** and **lucia_lite_plots** subdirectories.

Find some output examples in the [documentation](https://earth.bsc.es/gitlab/es/lucia-alternative/-/blob/master/Final_lucia_lite_documentation.pdf).
