wiki:Documentation/UserGuide/NewFlag

How to add a new flag

Author: D. Solyga
Last revision: B. Guenet (2020/03/19)

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_var.f90 in the existing control type block. Variables declared in constantes_var.f90 are global

   LOGICAL, SAVE :: ok_NameOfNewFlag      !! Explanation of new flag
!$OMP THREADPRIVATE(ok_NameOfNewFlag)

Read the flag from the parameter file

Next, you need to read the flag value. Don't forget to wrote a default value. This is done in ../modeles/ORCHIDEE/src_parameter/control.f90 in the subroutine sechiba_init

    !Config Key   = OK_NAMEOFNEWFLAG
    !Config Desc  = Short description of what your flag is doing
    !Config If    = If your flag is called only if another is activated (e.g. OK_STOMATE) wrote the name of the this flag
    !Config Def   = FALSE
    !Config Help  = More detailled description of what your flag is doing
    ok_NameOfNewFlag=.FALSE.
    CALL getin_p('OK_NAMEOFNEWFLAG', ok_NameOfNewFlag)


Last modified 10 months ago Last modified on 03/19/20 17:17:59