# PEM Documentation Index

Use this index to find the right entry point depending on your task.

## Local documentation

- `../README.md`: PEM source tree overview, prerequisites, and build commands (`make_pem_fcm`, `compile.sh`).
- `../deftank/README.md`: chained PCM/PEM workflow setup, mandatory run files, job-template adaptation, and outputs.
- `../toolkit/README.md`: post-processing and helper utilities (NetCDF analysis, plotting, startfi updates, code stats).
- `doc/Doxyfile`: local Doxygen configuration for PEM Fortran source documentation.
- `doc/build_doc.sh`: helper script to check/build/clean/open PEM Doxygen documentation.

### Build local API documentation

From the PEM root directory:

```bash
./doc/build_doc.sh
```

By default, this builds both documentation profiles (`mars` and `generic`).

Useful variants:

```bash
./doc/build_doc.sh --check-deps
./doc/build_doc.sh --clean
./doc/build_doc.sh --open
./doc/build_doc.sh --profile mars
./doc/build_doc.sh --profile generic
./doc/build_doc.sh --profile all
./doc/build_doc.sh --strict-warnings
./doc/build_doc.sh --warnings-baseline doc/doxygen/warnings-baseline --strict-warnings
./doc/build_doc.sh --update-warnings-baseline
```

Fallback direct command:

```bash
doxygen doc/Doxyfile
```

Open generated docs:
- mars profile path: `doc/doxygen/mars/html/index.html`
- generic profile path: `doc/doxygen/generic/html/index.html`

Landing page behavior:
- The Doxygen main page is a profile selector page.
- It helps avoid confusion between the two profile-specific `index.html` files.

## Online documentation

- PEM overview: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/PEM_(Planetary_Evolution_Model)
- Mars PEM page: https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Overview_of_the_Mars_PEM