PlaSim
======

Gerneral Circulation Models Planet Simulator (PlaSim) and PUMA

This repository has all necessary components to run the models.

These models are research models used in Meteorology and Earth Sciences.
You need knowledge in Meteorology and skills in Linux, C and FORTRAN
for running the models and interpreting the results.

Please start reading the manuals located in:

puma/doc for the PUMA model
plasim/doc for the Planet Simulator

Then have a look at the README file for configuration and setup.

## Installation

### coriolis

```bash
cd /cofast/$USER
git clone https://gogs.elic.ucl.ac.be/TECLIM/PlaSim.git

cd PlaSim
./configure.sh
```

## Quick run

```bash
cd /cofast/$USER/PlaSim
./most.x
```

Example:

- Select model "Planet Simulator"
- Select modules "ML Ocean" and "Sea Ice"
- Edit number of cores (eg 16)
- Switch GUI off
- Switch Output on
- Switch "Double Precision" on
- Edit number of years to run
- Click on `Save & Exit`

See the corresponding example below:

![MoSt example](./images/run_example.png)

Now, launch the model:

```bash
screen
cd /cofast/$USER/PlaSim
source modules.load
cd plasim/run
./most_plasim_run
```

> You can leave the `screen` process with

```bash
Ctrl+a d
```

> You can monitor the model process with

```bash
cd /cofast/$USER/PlaSim/plasim/run
cat plasim_diag | grep Completed
```

For one year, results are:

```bash
****************************************
* User   time         :    244.036 sec *
* System time         :      1.324 sec *
* Total CPU time      :    245.360 sec *
* Memory usage        :    120.780 MB  *
* Page reclaims       :  25832 pages   *
* Page faults         :   5185 pages   *
* Disk read           : 416163 blocks  *
* Disk write          :2726849 blocks  *
****************************************
* Seconds per sim year:    245         *
* Sim years per day   :    353         *
****************************************

532K  MOST_DIAG.0001.txt
 18M  MOST_PLA.0001.nc
1.3M  MOST_OCE.0001.nc
2.2M  MOST_ICE.0001.nc
 26M  MOST_LSG.0001.nc
```

