... | ... | @@ -14,6 +14,7 @@ Summary: |
|
|
- [Running](#running-1)
|
|
|
- [Plotting](#plotting-1)
|
|
|
- [Better figures](#better-figures)
|
|
|
- [HDF5-formatted output](#hdf5-formatted-output)
|
|
|
|
|
|
# Prerequisites
|
|
|
If you downloaded the archive in the [_dist_](https://gitlab.obspm.fr/dblain/exorem/-/tree/master/dist) directory, you should have everything you need, except a stellar spectrum (see point 4 below), and more importantly the k-coefficients tables (see point 3 below). Otherwise, check the following:
|
... | ... | @@ -29,6 +30,7 @@ To plot the figures using the provided plot functions, you will need Python3, an |
|
|
- numpy
|
|
|
- scipy
|
|
|
- matplotlib
|
|
|
- h5py
|
|
|
|
|
|
# First run
|
|
|
## Setup
|
... | ... | @@ -243,4 +245,31 @@ Not happy with the figures you get ? What if for example you wanted to see the c |
|
|
|
|
|
There is much other things you can do. Do not hesitate to check the _src/python/plot_figures.py_ file to look at the docstrings of the functions.
|
|
|
|
|
|
## HDF5-formatted output
|
|
|
To read the HDF5-formatted outputs, you can use [HDFView](https://www.hdfgroup.org/downloads/hdfview/).
|
|
|
You can also read them using Python and h5py.
|
|
|
1. To do the latter, open a python console:
|
|
|
```bash
|
|
|
python
|
|
|
```
|
|
|
2. Import the h5py module:
|
|
|
```python
|
|
|
from src.python.plot_figures import *
|
|
|
```
|
|
|
Note: you can also simply `import h5py`.
|
|
|
3. Open the result file, here we assume that the result file is _./outputs/exorem/example.h5_:
|
|
|
```python
|
|
|
data = load_result('./outputs/exorem/example.h5')
|
|
|
```
|
|
|
4. You can explore the file using:
|
|
|
```python
|
|
|
list(data) # print >['model_parameters', 'outputs']
|
|
|
list(data['outputs']) # print all sub-groups and datasets in group 'outputs'
|
|
|
pressure_level = np.asarray(data['outputs']['levels']['pressure']) # get the pressure array
|
|
|
cloud_fraction = data['model_parameters']['clouds']['fraction'][()] # get the cloud fraction scalar
|
|
|
eddy_mode = str(data['model_parameters']['atmosphere']['eddy_mode'][()], 'utf-8') # get the eddy mode string
|
|
|
```
|
|
|
|
|
|
More on the HDF5-output file [here](Documentation).
|
|
|
|
|
|
Enjoy Exo-REM ! |
|
|
\ No newline at end of file |