Changes between Version 76 and Version 77 of Documentation/TrunkFunctionality4


Ignore:
Timestamp:
2021-01-21T13:41:43+01:00 (3 years ago)
Author:
luyssaert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/TrunkFunctionality4

    v76 v77  
    143143* 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. 
    144144* 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. 
    145 * arr_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. Additionally some high-level consistency checks are made on NBP: (1) the time integral of the NBP (from 0 -> t) should equal the C and N stock at time step t and (2) the flux-based and pool-based calculation of NBP should be identical. These two checks require that mass balance closure and area preservation from all all subroutines being called from stomate.f90 including stomate_lpj.f90. These checks, therefore, represent integrated checks which give confidence for the technical implementation of the C and N cycles.  
     145* arr_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. Additionally some high-level consistency checks are made on NBP: (1) the time integral of the NBP (from 0 -> t) should equal the C and N stock at time step t and (2) the flux-based and pool-based calculation of NBP should be identical. These two checks require mass balance closure and area preservation from all all subroutines being called from stomate.f90 including stomate_lpj.f90. These checks, therefore, represent integrated checks which give confidence for the technical implementation of the C and N cycles. Comparing the flux and pool based nbp estimates is an instantaneous check that covers just a single day in the model. This check should always be satisfied. If not there is a bug somewhere! Comparing the time integral of NEP vs the all pools includes all the accumulated precision errors. If those errors would be random there would be no problem but they are more likley biases. Hence, when the fluxes and pools increase several order of magnitudes (e.g toward 10e4) and a small bias (10e-12) is integrated over 10,000 days (10e4) the divergence between the time integral of NEP and the pools will approach/exceed 10-8 and will stop the model. This is a fundamental problem related to machine precision and the way we do the calculations (think of the so called catastrophic rounding errors that may occur with floating numbers). If the time integral is check in combination with err_act 3, the integral is set to the actual pools every 30 years. Note that 30 years is a compromise. If the model crashes, the user will have to decide whether (s)he is facing a precision error or a real bug.  
    146146 
    147147