# $HeadURL: svn://forge.ipsl.fr/orchidee/trunk/ORCHIDEE_OL/FG_CRUJRA_SPIN/PARAM/orchidee.def $
# $Date: 2024-03-29 12:18:36 +0100 (ven. 29 mars 2024) $
# $Revision: 8512 $

#**************************************************************************
#           Suggested parameter set up for ORCHIDEE trunk
#
# See all optional parameters in modipsl/modeles/ORCHIDEE/orchidee.default
#
# Note when running with libIGCM, variables set here to _AUTOBLOCKER_ can 
# not be changed in run.def otherwise the simulation will stop. Variables 
# set to _AUTO_ can be changed from the comp.card but they can also be 
# changed directly in the run.def. A value set in run.def can never be
# changed again by libIGCM. 
#**************************************************************************

# Parameters that should be removed once these issues are resolved
#**************************************************************************

# From a scientific point of view hydraulic architecture is much nicer
# than a direct dependency on soil water. Julien is working on both
# the nummerics and the science of the hydraulic architecture. To
# avoid further delays with milestone 4.1 we decided to change the
# settings.
ENERGY_CONTROL=2

# Prescribe forest management to facilitate the interpretation of the
# results when comparing versions.
OK_READ_FM_MAP=n

# Hack to use a higher threshold for small lai in the calculation of kB_m1 in condveg 
HACK_KB_M1 = y

# Parameters related to the restart file and the start date
#**************************************************************************
# Name of restart file for sechiba part of the model
# (default NONE)
SECHIBA_restart_in = _AUTOBLOCKER_

# Name of restart file for stomate part of the model
# (default NONE)
STOMATE_RESTART_FILEIN = _AUTOBLOCKER_


# Parameters related to the diagnostic output files and reading input files
#**************************************************************************
# Use XIOS for writing diagnostics file
# (defualt y)
XIOS_ORCHIDEE_OK = _AUTOBLOCKER_

# Use XIOS for interpolation of input files
XIOS_INTERPOLATION=n

# Flag to activate sechiba_out_2.nc history file when using IOIPSL for SECHIBA
# (defualt n)
SECHIBA_HISTFILE2 = _AUTO_

# Write frequency in seconds in sechiba_history.nc when using IOIPSL If
# WRITE_STEP=0 then all IOIPSL output are deactivated.
# (default 86400)  
WRITE_STEP = _AUTO_

# Writefrequency in seconds sechiba_out_2.nc when using IOIPSL
# (default 1800)
WRITE_STEP2 = _AUTO_ 

# Writefrequency in days in stomate_history.nc when using IOIPSL
# (default 10)
STOMATE_HIST_DT = _AUTO_

# Writefrequency in days or -1 for monthly output in stomate_ipcc_history.nc
# when using IOIPSL
# (default 0)
STOMATE_IPCC_HIST_DT = _AUTO_


# Parameters related to debugging and error checking
#**************************************************************************
# Mass balance and surface area checks
# 1 - is recommended when running global long-term simulations.
# Under this option, mass and area conservation are checked for all
# biogeochemical processes but only at the highest level thus stomate.f90
# and stomate_lpj.f90. Although these checks are not very expensive in terms
# of computer time, skipping the numerous lower level checks is expected to
# save some time. Under this option the mass balance error is only written
# to the history file. No information is provided in which subroutine the
# problem occurred.
# 2 - is recommended when developing and testing the model. Now the mass
# balance is explicitly checked in stomate.f90, stomate_lpj.f90 and all
# its subroutines. Under this option the mass balance error is written to
# the history file and if the mass balance is not closed, the warning
# message will indicate in which subroutine the problem likely
# originated.
# 3 - is recommended when having a problem with mass balance closure. The
# mass balance is explicitly checked in stomate.f90, stomate_lpj.f90 and all
# its subroutines. If a mass balance occurs, the model is stopped.
# (default)
ERR_ACT = 3

# If the model crashes and it is not clear in which subroutine the crash
# occurs one could increase the print level for text output in out_orchidee_*
# PRINTLEV = 1 : some output in initialization phase
# PRINTLEV = 2 : more output in initialization phase and printing of new date
# PRINTLEV = 3, 4,.. : more output also at each timestep
# (default 2)
PRINTLEV=2

# If the model crashes on an ipslerr there is a fair change that the pixel and
# PFT where the crash occur will be printed in the out_orchidee_* file. Try to
# re-run the model for a single pixel or a small region (for example,
# 3 by 3). LIMIT_EAST, LIMIT_NORTH, LIMIT_SOUTH and LIMIT_WEST should
# be set in the run.def 

# If it is known in which subroutine the model crashes, the local print level
# of that subroutine could be increased. Additional write statements will then
# be activated. These write statements print the values of specific variables.
# (default 2)
#PRINTLEV_sapiens_lcchange = 4

# When a local print level is set, the grid and pft number for which the
# values needs to written should be set. This setting reduces reduces
# the size and enhances the readability of the out_orchidee_* files.  
TEST_GRID = 1
TEST_PFT = 2


# Hydrology parameters
#**************************************************************************
# Activate river routing
# default = y
RIVER_ROUTING = _AUTO_

# Choice of routing method: standard or simple
ROUTING_METHOD = _AUTO_

# Activate creation of river_desc.nc file
# RIVER_DESC will be activated only the first execution in the simulation
RIVER_DESC = _AUTO_

# SOILTYPE_CLASSIF :  Type of classification used for the map of soil types
# (default zobler)
SOILTYPE_CLASSIF = usda 

# SOILALB_FILE : File to read bare soil albedo
SOILALB_FILE=soilcolor.nc

# FR_CENTER_C ([°C]) :  Center value of the freezing window in degree Celsius (default -1.0)
FR_CENTER_C=-1.0 

# Parameters related to vegetation map
#**************************************************************************
# Update vegetation frequency
# (default 0Y)
VEGET_UPDATE = _AUTO_

# Prescribed vegetation
# (default n)
IMPOSE_VEG = n


# Parameters related to surface and thermal physical properties
#************************************************************************
# ROUGH_DYN : Account for a dynamic roughness height (activation of Su et
# al. parametrization)
# (default y)
ROUGH_DYN = y

# USE_RATIO_Z0M_Z0H:  Impose a constant ratio as in ROUGH_DYN (default: y) 
USE_RATIO_Z0M_Z0H=y

# RATIO_Z0M_Z0H:  Ratio between z0m and z0h (Default: 10.0)
RATIO_Z0M_Z0H=10.0

# OK_FREEZE :  Activate the complet soil freezing scheme
# (default y)
OK_FREEZE = y

# OK_EXPLICITSNOW :  Activate explict snow scheme
# (default y)
OK_EXPLICITSNOW = y

# NSNOW : Number of snow levels. Possible values are 3 or 12
NSNOW=12

# Controls several settings related to the energy budget and water stress.
# 1 - DEFAULT uses the enerbil module in combination with the hydraulic
# architecture (ok_hydrol_arch and ok_gs_feedback true, while 
# ok_mleb and ok_impose_canopy_structure are set to false).
# 2 - option to use enerbil module and original water stress
# (not hydraulic architecture)
# 3 - The energy budget is calculated using the multi-layer energy scheme
# with a single layer: ok_hydrol_arch, ok_gs_feedback, ok_impose_canopy_structure
# and and ok_mleb all TRUE, but the energy budget is calculated for a single
# layer (jnlvls=1,jnlvls_under=0,jnlvls_canopy=1,jnlvls_over=0). No mleb output,
# ok_mleb_history_file is set to  FALSE.
# 4 - multi-layer energy budget: ok_hydrol_arch, ok_gs_feedback and ok_mleb all TRUE.
# ok_impose_canopy_structure is False, and the energy budget is calculated for
# multiple layers (jnlvls=29,jnlvls_under=10,jnlvls_canopy=10,jnlvls_over=9).    
# No mleb output, ok_mleb_history_file is set to  FALSE.
# 5 - user specific: user specific settings for these controls and layers will need
# to be defined in the run.def by the user.
#ENERGY_CONTROL=1


# Carbon related parameters
#**************************************************************************
# Analytic spinup
# (default n)
SPINUP_ANALYTIC = _AUTO_
SPINUP_PERIOD = _AUTO_

# Activate Stomate component
# (default y)
STOMATE_OK_STOMATE = _AUTOBLOCKER_ 

# As an alternative to DO_WOOD_HARVEST forest management can be accounted
# for. DO_WOOD_HARVEST is not yet available in ORCHIDEE v4.
# OK_READ_FM_MAP=y

# Parameters related to nitrogen cycle
#**************************************************************************
# Update nitrogen input maps
# (default 0Y)
NINPUT_UPDATE = _AUTO_

# Impose the CN ratio of leaves
STOMATE_IMPOSE_CN = _AUTO_

# Set STOMATE_READ_CN=y to read cnleaf_map.nc file if STOMATE_IMPOSE_CN=y
STOMATE_READ_CN = n
CNLEAF_VAR = CN_LEAF


# File and variable name for nitrogen input files
#**************************************************************************
Nammonium_FILE = Nammonium.nc
Nammonium_VAR = nhx

Nnitrate_FILE = Nnitrate.nc
Nnitrate_VAR = noy

Nfert_ammo_cropland_FILE = Nfert_ammo_cropland.nc
Nfert_ammo_cropland_VAR = nfer_crop_nh4

Nfert_nitr_cropland_FILE = Nfert_nitr_cropland.nc
Nfert_nitr_cropland_VAR = nfer_crop_no3

Nfert_ammo_pasture_FILE = Nfert_ammo_pasture.nc
Nfert_ammo_pasture_VAR = nfer_pas_nh4

Nfert_nitr_pasture_FILE = Nfert_nitr_pasture.nc
Nfert_nitr_pasture_VAR = nfer_pas_no3
 
Nbnf_FILE= bnf.nc
Nbnf_VAR= BNF_MGN_PERM2_PERYR


# Parameters describing the canopy structure
#**************************************************************************
# Number of diameter classes - enables to create complex canopies
# (default = 1)
NCIRC = 3

