Version 5 (modified by bguenet, 4 years ago) (diff) |
---|
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_sechiba/sechiba.f90 in the subroutine sechiba_init
ok_NameOfNewFlag=.FALSE. CALL getin_p('OK_NAMEOFNEWFLAG', ok_NameOfNewFlag)