/**************************************************************************************/
/**                                                                                \n**/
/**                   l  p  j  .  c  o  n  f                                       \n**/
/**                                                                                \n**/
/** Default configuration file for LPJmL C Version 4.0.001 without land use        \n**/
/**                                                                                \n**/
/** Configuration file is divided into five sections:                              \n**/
/**                                                                                \n**/
/**  I.   Simulation description and type section                                  \n**/
/**  II.  Input parameter section                                                  \n**/
/**  III. Input data section                                                       \n**/
/**  IV.  Output data section                                                      \n**/
/**  V.   Run settings section                                                     \n**/
/**                                                                                \n**/
/** (C) Potsdam Institute for Climate Impact Research (PIK), see COPYRIGHT file    \n**/
/** authors, and contributors see AUTHORS file                                     \n**/
/** This file is part of LPJmL and licensed under GNU AGPL Version 3               \n**/
/** or later. See LICENSE file or go to http://www.gnu.org/licenses/               \n**/
/** Contact: https://gitlab.pik-potsdam.de/lpjml                                   \n**/
/**                                                                                \n**/
/**************************************************************************************/

#include "include/conf.h" /* include constant definitions */


/*#define RIVER_ROUTING *//* river routing enabled; exclude this line to
                         disable river routing */
#define ISRANDOM      /* random generation of daily precipitation */
#define WITH_GRIDBASED
#define WITH_SPITFIRE
#define USE_RADIATION
#define GSI_PHENOLOGY

/*===================================================================*/
/*  I. Simulation description and type section                       */
/*===================================================================*/

"LPJ SPITFIRE test" /* Simulation description */
LPJ             /* Simulation type with natural vegetation */
#ifdef ISRANDOM
RANDOM_PREC /* Random weather generator for precipitation enabled */
RANDOM_SEED /* seed for random number generator */
#else
INTERPOLATE_PREC
#endif
#ifdef USE_RADIATION
RADIATION
#else
CLOUDINESS
#endif
#ifdef WITH_SPITFIRE
SPITFIRE
#else
FIRE                 /* fire disturbance enabled */
#endif
#if defined(WITH_SPITFIRE) || defined(WITH_FIREWOOD)
#  ifndef FROM_RESTART
     NO_POPULATION
#  else
     POPULATION
#  endif
#else
NO_POPULATION
#endif
#ifdef USE_BURNTAREA
PRESCRIBE_BURNTAREA
#else
NO_PRESCRIBE_BURNTAREA
#endif
#ifdef USE_LANDCOVER
LANDCOVERFPC /* LANDCOVEREST to prescribe establishment or LANDCOVERFPC to prescribe maximum FPC */
#else
NO_LANDCOVER
#endif
#ifdef GSI_PHENOLOGY
NEW_PHENOLOGY
#else
OLD_PHENOLOGY
#endif
#ifdef RIVER_ROUTING
DRAINAGE
#else
NO_DRAINAGE
#endif
#ifdef PERMAFROST
PERM
#else
NO_PERM
#endif

/*===================================================================*/
/*  II. Input parameter section                                      */
/*===================================================================*/

#include "param.conf"    /* Input Parameter file */

/*===================================================================*/
/*  III. Input data section                                          */
/*===================================================================*/

#include "input_crumonthly.conf"    /* Input files of CRU dataset */

/*===================================================================*/
/*  IV. Output data section                                          */
/*===================================================================*/


#ifdef WITH_GRIDBASED
GRIDBASED
#define SUFFIX grid.bin
#else
PFTBASED
#define SUFFIX pft.bin
#endif

#ifndef FROM_RESTART

END	            /* no output files */

#else

/*
ID                  fmt filename
------------------- --- ----------------------------- */
GRID                RAW output/grid.bin
FPC                 RAW output/fpc.bin
MNPP                RAW output/mnpp.bin
MRH                 RAW output/mrh.bin
MTRANSP             RAW output/mtransp.bin
MRUNOFF             RAW output/mrunoff.bin
MDISCHARGE          RAW output/mdischarge.bin
MEVAP               RAW output/mevap.bin
MINTERC             RAW output/minterc.bin
MSWC1               RAW output/mswc1.bin
MSWC2               RAW output/mswc2.bin
FIREC               RAW output/firec.bin
FIREF               RAW output/firef.bin
VEGC                RAW output/vegc.bin
SOILC               RAW output/soilc.bin
LITC                RAW output/litc.bin
PFT_NPP             RAW output/pft_npp.SUFFIX
PFT_GCGP            RAW output/waterstress.bin
FLUX_ESTAB          RAW output/flux_estab.bin
APREC               RAW output/aprec.bin
#ifdef RIVER_ROUTING
INPUT_LAKE          RAW output/input_lake.bin
MEVAP_LAKE          RAW output/mevap_lake.bin
ADISCHARGE          RAW output/adischarge.bin
#endif
#ifdef WITH_SPITFIRE
MFIREC              RAW output/mfirec.bin
MNFIRE              RAW output/mnfire.bin
MFIREDI             RAW output/mfiredi.bin
MFIREEMISSION       RAW output/mfire_emission.bin
#endif /*
------------------- --- ------------------------------- */
END
#endif

/*===================================================================*/
/*  V. Run settings section                                          */
/*===================================================================*/

ALL    /* all grid cells */

#ifndef FROM_RESTART

5000  /* spinup years */
/* exclude next line in case of 0 spinup years */
30   /* cycle length during spinup (yr) */
1901 /* first year of simulation */
1901 /* last year of simulation */
NO_RESTART /* do not start from restart file */
RESTART /* create restart file: the last year of simulation=restart-year */
restart/restart.lpj /* filename of restart file */
1900 /* write restart at year; exclude line in case of no restart to
        be written */

#else

0    /* no spinup years */
/* exclude next line in case of 0 spinup years */
/*30    cycle length during spinup (yr) */
1901 /* first year of simulation */
2009 /* last year of simulation */
RESTART /* start from restart file */
restart/restart.lpj /* filename of restart file */
RESTART /* create restart file */
restart/restart_final.lpj /* filename of restart file */
2009 /* write restart at year; exclude line in case of no restart to
        be written */

#endif
