# How to run aquaplanet slab ocean experiments using MPI-ESM
# How to run aquaplanet slab ocean experiments using MPI-ESM
Currently, one has to use the `mpiesm-landveg` branch if you'd like to run aquaplanet slab ocean.
Currently, one has to use the `mpiesm-landveg` branch if you'd like to run aquaplanet slab ocean.
Update: This is not exactly true anymore, you can find out how to compile and use the p8-cdy branch [here](https://gitlab.dkrz.de/cdy/cdy-technical-page/-/wikis/Setup-and-run-CDY-branch-of-ECHAM). The advantage of that is that it's the same ECHAM version as in the MPI-ESM-p8-cdy branch, the downside is that `mkexp` doesn't work with it and you have to modify the run scripts manually, which can be a bit more challenging.
The example shown below is based on [previous guideline in here](https://gitlab.dkrz.de/jsbach/jsbach/-/wikis/uploads/3bae9f07c2ab3a9c5ac33a6894f9c211/Getting_Started_with_Git_for_MPIESM.pdf)
The example shown below is based on [previous guideline in here](https://gitlab.dkrz.de/jsbach/jsbach/-/wikis/uploads/3bae9f07c2ab3a9c5ac33a6894f9c211/Getting_Started_with_Git_for_MPIESM.pdf)
# Download model
### Clone mpiesm without --recursive and put it in directory mpiesm-landveg
# Download model
```bash
### Clone mpiesm without --recursive and put it in directory mpiesm-landveg
### Check whether submodules are initialised and/or checked out (likely not)
```bash
### Check whether submodules are initialised and/or checked out (likely not)
git submodule
```bash
# This should list all submodules not yet initialised or checked out
git submodule
```
# This should list all submodules not yet initialised or checked out
```
### Initialise and check out submodules, then check again
```bash
### Initialise and check out submodules, then check again
git submodule update --init
```bash
git submodule
git submodule update --init
```
git submodule
```
# Compile model
### Read RECIPE.landveg
# Compile model
### Read RECIPE.landveg
### Edit landveg-compile.ksh to your needs
Of primary importance for aquaplanet slab ocean, you will be using `mpiesm-as` (echam6 only).
### Edit landveg-compile.ksh to your needs
Of primary importance for aquaplanet slab ocean, you will be using `mpiesm-as` (echam6 only).
```bash
vers=aqua # model version (tag used in the executable name)
```bash
cplmod=mpiesm-as # coupled model name: mpiesm-s (jsbach3, cbalance, hd)
vers=aqua # model version (tag used in the executable name)
# mpiesm-s4 (jsbach4)
cplmod=mpiesm-as # coupled model name: mpiesm-s (jsbach3, cbalance, hd)
# mpiesm-as (echam6)
# mpiesm-s4 (jsbach4)
# mpiesm-as4 (echam6 with jsbach4)
# mpiesm-as (echam6)
# mpiesm-asob (mpiesm-1.2)
# mpiesm-as4 (echam6 with jsbach4)
compiler=intel # compiler to be used (nag/intel/gcc)
# mpiesm-asob (mpiesm-1.2)
configure=yes# yes: run configure - mandatory if running the first time model version $vers
compiler=intel # compiler to be used (nag/intel/gcc)
automake=no # yes: run automake, e.g. if dependencies changed (only with configure=yes)
configure=yes# yes: run configure - mandatory if running the first time model version $vers
make_argument="-j 8"# number of processes for make, 'clean' or 'distclean'
automake=no # yes: run automake, e.g. if dependencies changed (only with configure=yes)
# (make clean needs the modules, thus script is helpful)
make_argument="-j 8"# number of processes for make, 'clean' or 'distclean'
```
# (make clean needs the modules, thus script is helpful)
```
### Execute landveg-compile.ksh
```bash
### Execute landveg-compile.ksh
./landveg-compile.ksh
```bash
```
./landveg-compile.ksh
```
# Generate run script
The recipe/guideline on how to do this is in an older version of RECIPE.landveg. However, with the new checkout of `mpiesm-landveg`, this is no longer available. Hence, a snippet of that guideline is attached here.
# Generate run script
The recipe/guideline on how to do this is in an older version of RECIPE.landveg. However, with the new checkout of `mpiesm-landveg`, this is no longer available. Hence, a snippet of that guideline is attached here.
```yaml
Running
```yaml
---------
Running
For standard simulation with mpiesm-asob we recommend to use runscripts generated
---------
with mkexp (compare RECIPE section 3 and below).
For standard simulation with mpiesm-asob we recommend to use runscripts generated
with mkexp (compare RECIPE section 3 and below).
For all other configurations generate the run scripts using Create_TASKS.frm
For all other configurations generate the run scripts using Create_TASKS.frm
Not yet there, but getting close...... Namelist parameters and input forcing files must be specified in accordance to aquaplanet slab ocean requirements.
### Edits to run script
Not yet there, but getting close...... Namelist parameters and input forcing files must be specified in accordance to aquaplanet slab ocean requirements.
While many input forcing files need to change, this is done by changing the link/pointing. However, to run with slab ocean, you'll need an extra file, the `heatflux` or `qflx` file. Assume for the moment you have this file `T63_heatflux_test.nc`. There are also two other files that are not necessarily readily available, `T63GR15_surf_aqua_irad_noseason_final.nc` and `T63_ozone_historical_1850.nc`\
Below, unless otherwise stated, `#` means to comment these lines out and be sure to add the new pointers.
While many input forcing files need to change, this is done by changing the link/pointing. However, to run with slab ocean, you'll need an extra file, the `heatflux` or `qflx` file. Assume for the moment you have this file `T63_heatflux_test.nc`. There are also two other files that are not necessarily readily available, `T63GR15_surf_aqua_irad_noseason_final.nc` and `T63_ozone_historical_1850.nc`\
Below, unless otherwise stated, `#` means to comment these lines out and be sure to add the new pointers.
1. 3d initial file of atmosphere (spectral, no dependence on lsmask)
```bash
1. 3d initial file of atmosphere (spectral, no dependence on lsmask)
A little more on preparations of these input files, particularly for aquaplanet slab ocean.
A little more on preparations of these input files, particularly for aquaplanet slab ocean.
- Ozone file needs a vertical profile to ensure radiative properties of the stratosphere and troposphere, but for an aquaplanet slab ocean, we would need zonally invariant and hemispherically symmetric ozone concentrations.
- Solar irradiance must have no seasons. Here, we ensure eccentricity and obliquity is also set to zero. However, all these do not account for varying zenith angle of the sun.
- Ozone file needs a vertical profile to ensure radiative properties of the stratosphere and troposphere, but for an aquaplanet slab ocean, we would need zonally invariant and hemispherically symmetric ozone concentrations.
- 'qfl' file: The simplest option is to use no correction 'qflx=0' everywhere. Here, the system would respond to the forcing and can arrive at a different mean state climate, fully free to evolve.
- Solar irradiance must have no seasons. Here, we ensure eccentricity and obliquity is also set to zero. However, all these do not account for varying zenith angle of the sun.
- 'qflx' file to constrain to the same climate mean state. Here, the 'qlfx' file is normally obtained by first running a slab ocean aquaplanet with zero flux correction in order to get the climatological SST. The SST is then used to run a pure aquaplanet run with prescribed SST that has been post-processed (i.e. climatological mean, zonally averaged, hemispherically symmetric) for about 20 years, and from which we can get the surface flux associated with the mean climate state. This surface flux then requires post-processing to get a climatological mean, zonally invariant and hemispherically symmetric flux file, that is then used as the 'qflx' file input to the actual aquaplanet slab ocean run.
- 'qfl' file: The simplest option is to use no correction 'qflx=0' everywhere. Here, the system would respond to the forcing and can arrive at a different mean state climate, fully free to evolve.
- 'qflx' file to constrain to the same climate mean state. Here, the 'qlfx' file is normally obtained by first running a slab ocean aquaplanet with zero flux correction in order to get the climatological SST. The SST is then used to run a pure aquaplanet run with prescribed SST that has been post-processed (i.e. climatological mean, zonally averaged, hemispherically symmetric) for about 20 years, and from which we can get the surface flux associated with the mean climate state. This surface flux then requires post-processing to get a climatological mean, zonally invariant and hemispherically symmetric flux file, that is then used as the 'qflx' file input to the actual aquaplanet slab ocean run.