= How to add a new flag = === Declare the new flag === For consistency reasons new flags are to be declared in a structure. First, you need to declare the new flag as a logical in ../modeles/ORCHIDEE/src_parameter/constantes.f90 in the existing control type block. Variables declared in constantes.f90 are global {{{ TYPE control_type LOGICAL :: ok_NameOfNewFlag !! Explanation of new flag END TYPE control_type }}} Next, you store the flags in a common variable named 'control'. This is done in ../modeles/ORCHIDEE/src_sechiba/sechiba.f90 in the subroutine sechiba_init {{{ control%ok_NameOfNewFlag = control_in%ok_NameOfNewFlag }}} [[BR]] === Read the flag from the parameter file === To be completed... [[BR]] [[BR]] = How to find a segmentation error = === Compilation for checking array dimension === Segmentation errors indicate issues with the memory which are often caused by ill-defined array dimensions. The dimension of your arrays can be checked by changing the settings of the compiler. Note that compiling will take longer but that running the code will take a lot longer! Run the code on a single point test-case to avoid wasting computing resources. open the make file AA_make.gdef in the utility folder {{{ emacs ../util/AA_make.gdef }}} adjust the settings of the compiler by adding 'check bounds'. The example is for a compilation on obelix {{{ #-Q- lxiv8 F_O = -O -check bounds $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR) }}} remove the previous make file {{{ ./modeles/ORCHIDEE_OL/make clean }}} install the new make file with the 'check bounds' option {{{ ./../../util/ins_make }}} and compile {{{ ./../modeles/ORCHIDEE_OL/make }}}