!///////////////////////////////////////////////////////////////////////////////////////
!// LPJ-GUESS INSTRUCTION SCRIPT FOR COHORT/INDIVIDUAL MODE
!// Global PFTs
!//
!// LPJ-GUESS 3.0
!// 
!// peter anthoni 2016-05-19 updated for EC-Earth landcover
!///////////////////////////////////////////////////////////////////////////////////////
! Input files
!

param "file_lu"      (str "")
param "file_lucrop"  (str "")
param "file_lupasture"  (str "")
param "file_lunatural"  (str "")
param "file_luforest"  (str "")
param "file_woodharv_frac"      (str "")
param "file_woodharv_vol"      (str "")

!///////////////////////////////////////////////////////////////////////////////////////
! Output files
!

! Prefined yearly output
! These files may be outcommented if their output is not required. 

file_cmass_cropland ""
file_cmass_pasture ""
file_cmass_natural "cmass_natural.out"
file_cmass_forest ""

file_anpp_cropland ""
file_anpp_pasture ""
file_anpp_natural "anpp_natural.out"
file_anpp_forest ""

file_dens_natural "dens_natural.out"
file_dens_forest ""

file_cflux_cropland "cflux_cropland.out"
file_cflux_pasture "cflux_pasture.out"
file_cflux_natural "cflux_natural.out"
file_cflux_forest ""

file_cpool_cropland "cpool_cropland.out"
file_cpool_pasture "cpool_pasture.out"
file_cpool_natural "cpool_natural.out"
file_cpool_forest ""

file_nflux_cropland "nflux_cropland.out"
file_nflux_pasture "nflux_pasture.out"
file_nflux_natural "nflux_natural.out"
file_nflux_forest ""

file_npool_cropland "npool_cropland.out"
file_npool_pasture "npool_pasture.out"
file_npool_natural "npool_natural.out"


!///////////////////////////////////////////////////////////////////////////////////////
!// RUN PARAMETERS AND OPTIONS 
!

!!!!!!!!!!!! landcover parameters !!!!!!!!!!!!!!

npatch_secondarystand 1		! number of replicate patches to simulate in secondary stands ! ecev3 - could use 5
reduce_all_stands 0		! Whether to reduce equal percentage of all stands of a stand type at land cover change
age_limit_reduce 15		! Minimum age of stands to reduce at land cover change
				! ecev3 - trunk has 5

run_landcover 1        ! whether to use (and change) landcover fractions (1) or not (0)	

run_urban 1	      ! whether to simulate urban land (1) or not (0)	
run_crop 1	      ! whether to simulate crop vegetation (1) or not (0)
run_forest 0	      ! whether to simulate managed forest (1) or not (0)
run_pasture 1	      ! whether to simulate pasture (1) or not (0)
run_natural 1	      ! whether to simulate natural vegetation (1) or not (0)
run_peatland 1	      ! whether to simulate peatland (1) or not (0)
run_barren 1	      ! whether to simulate barren land (1) or not (0)

ifslowharvestpool 1	! If a slow harvested product pool is included in patchpft.
printseparatestands 0	! Whether to print multiple stands within a land cover type (except cropland) separately
gross_land_transfer 2	! Whether to use gross land transfer: simulate gross lcc (1); read landcover transfer matrix input file (2); 
			! read stand type transfer matrix input file (3), or not (0)
ifprimary_lc_transfer 1	! Whether to use primary/secondary land transition info in landcover transfer input file (1). or not (0)
ifprimary_to_secondary_transfer 1 ! Whether to use primary-to-secondary land transition info (within land cover type) in landcover 
				  ! transfer input file (1). or not (0)
harvest_secondary_to_new_stand 1  ! Whether to create new stands at clearcut of secondary stands (1). or not (0)
transfer_level 1	! Pooling level of land cover transitions; 0: one big pool; 1: land cover-level; 2: stand type-level
iftransfer_to_new_stand 0 ! Whether to create new stands in transfer_to_new_stand() according to the rules in copy_stand_type()

! ecev3 - specific
printcrescendo 0	! Whether to print CRESCENDO output
printcrescendodaily 0	! Whether to print daily CRESCENDO output
printcrescendofacedaily 0 ! Whether to print daily FACE experiment CRESCENDO output
printcmip6 1            ! Whether to print CMIP6 output
printcmip6daily 1       ! Whether to print daily CMIP6 output
printifsinputdaily 0    ! Whether to print IFS input as output

!LUMIP: parameters for deforest_glob experiment
deforest_method_type 0  ! LUMIP: deforestation method: 0=disabled, 1=deforest if start<=year<end and in all grid points
                        ! 2=like 1, but only in gridpoints and years with a primary to secondary transition vs>0
deforest_start_year  0  ! calendar year the establishment for trees will be turned off (0=disabled)
deforest_end_year    0  ! calendar  year the establishment for trees will be turned on again (0=disabled)

!///////////////////////////////////////////////////////////////////////////////////////
!// PARAMETERS FOR MANAGEMENT TYPES

group "crop_management" (

	planting_system "monoculture"
)

!///////////////////////////////////////////////////////////////////////////////////////
!// PARAMETERS FOR STAND TYPES


group "common_stand" (

	intercrop "nointercrop"
	naturalveg "none"
	restrictpfts 0		! Use all pft:s defined for a land cover (pft parameter landcover)
)

group "crop_stand" (

	landcover "cropland"
	intercrop "naturalgrass" ! Use natural grass pft:s as covercrop
	restrictpfts 1		! Use only pft:s specified in stand type
	planting_system "monoculture"
	hydrology "rainfed"
)

st "Urban" (

	common_stand
	stinclude 1
	landcover "urban"
)

st "Peatland" (

	common_stand
	stinclude 1
	landcover "peatland"
)

st "Natural" (

	common_stand
	stinclude 1
	landcover "natural"
)

st "Pasture" (

	common_stand
	stinclude 1
	landcover "pasture"
)

st "Forest" (

	common_stand
	stinclude 1
	landcover "forest"
	naturalveg "all"	! Use natural pft:s
	harvest_system "continuous"
)

st "Barren" (

	common_stand
	stinclude 1
	landcover "barren"
)


!///////////////////////////////////////////////////////////////////////////////////////
!// PARAMETERS FOR PFTS
!// Run GUESS with -help option for list of keywords and their meanings


pft "C3G_pas" (
	C3G
	landcover "pasture"
	harv_eff 0.5			! old value; intensive grazing: 90% grazed, 25-60 % returned to soil as faeces (0.36-0.675 removed, 0.5 OK average)
	res_outtake 0.0			! not used by crop grass
)

pft "C4G_pas" (
	C4G
	landcover "pasture"
	harv_eff 0.5			! old value; intensive grazing: 90% grazed, 25-60 % returned to soil as faeces (0.36-0.675 removed, 0.5 OK average)
	res_outtake 0.0			! not used by crop grass
)

pft "C3G_pea" (
	C3G
	landcover "peatland"
	harv_eff 0
)

! ecev3
pft "C4G_pea" (
	C4G
	landcover "peatland"
	harv_eff 0
	res_outtake 0.0
)


! ecev3
pft "C3G_urb" (
	C3G
	landcover "urban"
	harv_eff 0
	res_outtake 0.0
)

! ecev3
pft "C4G_urb" (
	C4G
	landcover "urban"
	harv_eff 0
	res_outtake 0.0
)
