Changes between Version 1 and Version 2 of Documentation/UserGuide/ErrAct


Ignore:
Timestamp:
2020-03-19T15:15:18+01:00 (4 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/ErrAct

    v1 v2  
    1 The code distinguishes between three options to check for mass and surface conservation. These options are controlled by the parameter err_act. Always use err_act = 3 when developing and testing the code. Note that in addition to checking for mass balance closure ORCHIDEE trunk 4 will also check for the conservation of veget_max and frac_nobio. This is useful to make sure no surface area is lost when moving biomass from one PFT to another following natural disturbances, forest management, land cover changes and when using age classes. In some parts of the code, for example, modules that deal with disturbances, it is assumed that the tallest trees are stored in the last diameter class. When the difference in diameter between diameter classes becomes very small, this assumption could be violated. Therefore, the diameter classes are sorted to enforce the assumed order and where needed the order is checked. 
     1= Set the level of internal error checking =  
     2 
     3Author: S. Luyssaert [[BR]]  
     4Last major revision: S. Luyssaert (2020/03/19) [[BR]]  
     5 
     6 
     7== Objective == 
     8Background of this item: ORCHIDEE has quite some build in error and consistency checking. Setting the correct level of these checks can help you to more quickly find the reason of a crash or a suspicious result. These setting should work for both the land-only and the land-atmosphere configurations.  
     9 
     10== Carbon and nitrogen mass conservation ==  
     11The code distinguishes between three options to check for mass conservation. These options are controlled by the parameter err_act. Always use err_act = 3 when developing and testing the code. In some parts of the code, for example, modules that deal with disturbances, it is assumed that the tallest trees are stored in the last diameter class. When the difference in diameter between diameter classes becomes very small, this assumption could be violated. Therefore, the diameter classes are sorted to enforce the assumed order and where needed the order is checked. 
    212 
    313* err_act = 1 is recommended when running global long-term simulations. Under this option, mass balance closure is checked for all biogeochemical processes but only at the highest level thus stomate.f90 and stomate_lpj.f90. Although the mass balance 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 total mass balance error is only written to the history file. No information is provided in which subroutine the problem occurred. 
    414* err_act = 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. 
    515* err_act = 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 error occurs, the model is stopped. 
     16 
     17== Surface conservation == 
     18Note that in addition to checking for mass balance closure ORCHIDEE trunk 4 will also check for the conservation of veget_max and frac_nobio. This is useful to make sure no surface area is lost when moving biomass from one PFT to another following natural disturbances, forest management, land cover changes and when using age classes. Mass and surface conservation cannot be separated from each other and were therefore merged into a single parameter (see above). 
     19 
     20== NaN checking == 
     21err_act also checks the presence of NaN. This is especially useful when running the model in PROD mode because such a compilation will not crash on a divide by zero but will write NaN values instead. Note that the default setting of xios (prec=4 in the field definition file in src_xml) cannot write NaN to the history files. Mass conservation, surface conservation and NaNs cannot be separated from each other and were therefore merged into a single parameter (see above). 
     22 
     23== Water conservation == 
     24??? 
     25 
     26== Energy conservation == 
     27???