The regional parametrization of the laimax is implemented on the branch : [regional_laimax](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/tree/regional_laimax)
The regional parametrization of the laimax is implemented on the branch : [regional_laimax](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/tree/regional_laimax)
# run LPJmL-med with LAIMAX_REGION configuration
# run LPJmL-med with LAIMAX_REGION configuration
A new laimax configuration is implemented : LAIMAX_REGION. It has to be set in the .conf file and the specific country and region par files must be used (in param.conf).
A new laimax configuration is applied : LAIMAX_REGION. It has to be set in the configuration file (.conf) and specific country and region parameter files (.par) must be used.
## one country run : Morocco
## one country run : Morocco
In order to facilitate the future calibration, the LAIMAX_REGION configuration is only possible for one country run, here Morocco. Changes must be done in case of future global run.
In order to facilitate future calibration work, the LAIMAX_REGION configuration is only possible for one country run, here Morocco as an example. Changes must be done in case of future global run under this configuration.
The [country.par file](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/regional_laimax/par/manage_morocco_country.par) gives the number of countries (must be set to 1) and the country name.
The [country.par file](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/regional_laimax/par/manage_morocco_country.par) gives the number of countries, set to 1 and the country name.
```
```
1 /* Number of countries*/
1 /* Number of countries*/
/* country-id country-name */
/* country-id country-name */
Morocco "Morocco"
Morocco "Morocco"
```
```
The [region. par file](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/regional_laimax/par/manage_moroccan_regions_laimax.par) provides regional information:
The [region. par file](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/regional_laimax/par/manage_moroccan_regions_laimax.par) provides the following information per region:
Both par files are read in the [fscancountrypar.c](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/main/src/landuse/fscancountrypar.c) and [fscanregionpar.c](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/main/src/landuse/fscanregionpar.c) routines.
## new regionpar structure
The [regionpar structure](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/main/include/manage.h) integrates laimax values per crops and the regional irrigation system.
```
typedef struct
{
int id; /* region id (0-432)*/
char *name; /* region name */
Real bifratio; /* Yevich's data/rharvest von LPJ; for all crops (no rharvest for grass)*/
Real fuelratio; /* Yevich's data (withoutdung)/rharvest von LPJ; for all crops (no rharvest for grass)*/
Real woodconsum; /* domestic firewood consumption [kgDM/capita/day]*/
Real *laimax_cft; /* pointer to crop-specific laimax with regional parametrisation*/
int default_irrig_system; /* default irrig system at region level (SURF=1,SPRINK=2,DRIP=3), used for ALLCROPS or ALL_IRRIGATION with regional parametrisation */
} Regionpar; /* parameters defined for each region */
```
The selection of the regional laimax as the laimax values used further is done in the [initmanage.c function](https://gitlab.pik-potsdam.de/brunel/lpjml-med/-/blob/main/src/landuse/initmanage.c) depending on the LAIMAX_REGION configuration.