wiki:DevelopmentActivities/ORCHIDEE-DOFOCO

Version 53 (modified by luyssaert, 11 years ago) (diff)

--

ROUTINES CHANGED

src_driver

  • readdim2.f90: bug fix from the trunk
  • teststomate.f90: added albedo variables to compile...in theory, this should be free of the albedo, but for the albedo we need the LAI effective which is calculated from the canopy structure, and therefore done in src_stomate...this should not cause problems as the added variables aren't used for anything, but only added to make the subroutine calls happy

src_parameters

  • pft_parameters.f90: added PFT-dependant variables related to the externalization of the new albedo, including declaration, allocation, deallocation, reading values from the input file, and setting default values. Added all PFT-dependent variables for respiration, growth and allocation.
  • constantes.f90: added some control variables for choosing albedo and snow albedo, a variable which defines the number of spectra bands, the number of vertical levels for the albedo/energy budget, some externalized parameters for the new albedo that are not PFT-dependent, as well as reading them in from the file. Made some constants PFT-dependent and thus moved them to pft_parameters.
  • constantes_mtc.f90: added default values for PFT-dependent albedo; respiration, growth and allocation parameters

src_sechiba

  • intersurf.f90: added a check to see if control flags are consistent for the new albedo, define a couple variables for the history files
  • sechiba.f90: added two new module variables, including allocation and initialization of one, passing around a couple more variables related to albedo
  • albedo.f90: new, separated all the vegetation and snow albedo routines from sechiba into their own file
  • condveg.f90: pass some additional variables to the module needed for the albedo, moved the snow and vegetation albedo routines into their own module (albedo.f90)...snow albedo needs to be calculated before the vegetation albedo for the new scheme, while it was calculated afterwards in the old scheme, which lead to some restructuring
  • slowproc.f90: passing around some albedo variables (sinang, nlevels, laieff)
  • enerbil.f90: merged in a bug fix from the trunk
  • AA_make: added albedo.f90 to compile

src_stomate

  • AA_make: Added file names to compile for some new modules
  • stomate.f90: added a call to calculate the effective lai used in the albedo routines, and pass the required variables (laieff, sinang, z_level) around...initializes the effective LAI during the first call
  • stomate_lpj.f90: switches to the different growth routines were removed from the subroutines and moved to stomate_lpj.f90 this resulted in cleaner and readable subroutines delaing with plant growth (see below).
  • stomate_laieff.f90: new, contains the routines to calculate the effective LAI for the albedo using the Pgap model of Haverd et al
  • stomate_alloc.f90: the original code was merged with stomate_npp.f90 into a new module stomate_growth_res_lim.f90 that deals with all the aspects of growth as formalized by Friedlingstein et al 1999.
  • stomate_npp.f90: the original code was merged with stomate_alloc.f90 into a new module stomate_growth_res_lim.f90 that deals with all the aspects of growth as formalized by Friedlingstein et al 1999.
  • stomate_growth_res_lim.f90: this is a new module containing all aspects of growth as formalized by Friedlingstein et al 1999.
  • stomate_growth_res_lim_ocn.f90: this is a new module containing all aspects of growth as formalized by Friedlingstein et al 1999 AND it has a labile pool such that it can deal with N-allocation. Not used in the dofoco branch because there is an issue with growth respiration but the code is available if the N-cycle is merged into the trunk.
  • stomate_growth_fun_all.f90: this is a new module that contains allometric-based growth and largely follows the logic of OC-N. However, the logic flow of phenological growth does no longer follow OCN. The linearisation and thus all other equations were changed to allow solving the set of equations for different basal area classes at the same time and for solving the equation for basal area rather than diameter to increase compatibility with forestry (to do).
  • stomate_prescribe.f90: the logic of the original code is preserved in a subroutine prescribe_diagnostic, however, stomate_prescribe is only called when firstcall = TRUE. Further, the code itself was simplified an entirely rewritten such that the initial stand respects the allometric relationships. In the diagnostic approach diameter and number of individuals is calculated from biomass. A second subroutine, called prescribe_prognostic is being coded in which basal area, biomass and the number of individuals respect the allometric relationships and the self-thinning rule.
  • stomate_data.f90: the biomass of a sapling now respects the allometric relationships
  • stomate_resp.f90: was rewritten in line with the respiration in OCN. For the moment the C/N ratio of tissue is a PFT-dependent variable, when N is added CN ratios should be calculated rather than prescribed.
  • stomate_stand_structure.f90: when the model is ran in the diagnostic mode, this routine is very similar to stomate_prescribe, however, it is called at every day. When the DOFOCO set-up is run this module calculates the prognostic stand structure as well as the canopy structure that is used to calculate LAIeffective.

RADIATION

APPROACH

The two stream radiation transfer model of Pinty et al. 2006 (J. Geophys. Res., 111, D02116, doi:10.1029/2005JD005952) is implemented in ORCHIDEE. This routine uses leaf scatter and canopy structure to calculate the radiation transfer and as a result albedo can be calculated. We are also making it into a multi-layer model with an arbitrary number of layers. The single scattering and forward efficiency values of the canopy are changed to match the diffuse and direct top of the canopy albedos for the single layer case. The calculation of the effective LAI now uses the Pgap model of Haverd et al described in their 2012 paper (Agricultural and Forest Meteorology, Vol. 160, pp 14-35) to take the canopy structure into account.

TASKS ACCOMPLISHED

  • Two stream radiation transfer model of Pinty et al is implemented
  • Effecive LAI is now calculated by the Pgap model of Haverd et al described in their 2012 paper (Agricultural and Forest Meteorology, Vol. 160, pp 14-35)
  • A framework capable of using an arbitrary number of canopy layers is in place, although the tests are still not satisfactory
  • The snow calculation has been modified to include snow in the background reflectance of Pinty's scheme, effectively putting snow under the canopy
  • Bernard's two stream solver routine has been modified to have both a diffuse and direct background reflectance value
  • The snow albedo model of CLM3 has been incorporated, since it distinguishes between NIR and VIS light, as well as diffuse and direct
  • All the albedo routines have been merged into the branch ORCHIDEE-DOFOCO

TO DO

  • change the dimensions of the variable albedo to store direct, diffuse, VIS and NIR (the direct and diffuse distinction becomes moot with the current multilayering scheme, as they must be averaged into one value for the background reflection to communicate between the layers)
  • Check the cause of the one day mismatch in between LAI and LAI_eff...UPDATE: seems like this is caused by the biomass being updated at 1800 s after midnight, while the LAIeff is updated in the slow processes, at midnight
  • clean code, why is laieff and singang written in both stomate and sechiba?
  • Use single scattering values that change over the course of the year...initial tests described below make it seem like this is important
  • to generate single scattering values for all PFTs (so far only values for main tree species in Europe are available, status 21.1.)
  • to introduce calculation of LAI_eff for grass and crops
  • testing and validation of new albedo scheme against observations in offline mode
  • coupling to atmosphere model LMDz
  • test to make sure that the PFTs are not being split into canopy and bare soil anywhere in the code...for example, set vegmax to 1.0 for PFT 6 and wildly change the bare soil parameters...this should have no effect
  • Validate the multilayer scheme against the RAMI-IV results

TESTS

  • The old albedo scheme from the svn 1.9.5.2 code was compared against the old albedo scheme from the code of ORCHIDEE in which changes were made. Both old schemes resulted in the same numerical result
  • The Pgap implimentation was compared to the result given by Jenny and Vanessa's code, with the same numerical result
  • The new scheme was compared against the old one in v1.9.6.0, and the results are qualitatively similar, but not identical
  • A 20 layer model was tested against the single layer model, giving small differences (a few percent, relative, at midday)
  • We tried to optimize the single scattering and forward efficiency values in the n-layer case to reproduce the average albedo in the 1-layer case, and using a generalised set search a full optimization with 20 layers can take thousands of steps and 200 times longer than doing no-optimization, and only a third of the points are optimised completely (for two layers, it takes about ten times longer than the no-opt case and optimises almost 70% of the timesteps)...using only 10-50 optimization steps results in 1-10% of the points being fully optimized, but looking at a graph of the two runs shows that the differences are really minimal, so we need to test the partial optimization in the new energy budget to see if it makes a real difference
  • Inclusion of the new snow albedo (CLM3) gives realistic trends, with the total albedo spiking after snowfalls and showing diurnal variation with leaves are present, but being flat at other times (the solar angle is incorporated through the use of Pgap, which mostly depends on the canopy)
  • I made use of single scattering albedos that Juliane got from Bernard's inversion scheme for 20 tree species, running tests with the min and max values for single scattering albedo and forward scattering efficiency for both VIS and NIR bands...the MUE for the overal albedo varies by 0.01 to 0.04 albdo units depending on the spectrum, showing that we should take this into account



ALLOCATION

APPROACH

The functional allocation introduced in OCN is being moved into ORCHIDEE v1.9.5.2. Functional allocation respects allometric relationships between foliage, wood and root C allocation

TO DO

CHECK

  • Define all allometric relationships in a single subroutine to increase consistency of the model
  • Only pass prognostic variables in the argument list i.e. ::lai should not be passed as it can be calculated from biomass which is already passed. Same applies for ::height
  • why is lai_target an output variable?
  • can lai_happy be replaced by i.e. 0.5*lai_target in growth_fun_all
  • Externalize variables in resp, growth, prescribe, ...
  • Check the code for +++CHECK+++ and +++TEMP+++
  • Change area rather than number of individuals. Always have 100 individuals but calculate a scalar to adjust the fluxes. Seems easier to initialize then the current approach
  • rewrite equations for grasslands

CAUTION

  • Both resource and allometric allocation make use of the variable pipe_tune2 and pipe_tune3. In 1.9.5.2 these variables are set to 40 and 0.5 respectively. In OCN the values are 55 and 0.65 respectively. Use the appropriate values depending on the tests.
  • The variable ::use_reserve, seems to be consistently used as a flag in the allometric based allocation. However, in the resource-based allocation it is consistently used as a C stock (gC m-2). The value is set in stomate_alloc.f90 and used in stomate_npp.f90.
  • Unexpectedly, the resource based scheme (which should simply reproduce the previous scheme) now has a seasonal cycle for ilabile (The previous scheme does not). However, it does not seem to affect the outcome and it clearly is on purpose as stomate_npp.f90 contains several lines of code dealing with ilabile in the resource based scheme.

TESTS

  • TEST 1: The old allocation scheme (flag STOMATE_FUNCTIONAL_ALLOCATION is not available) in the tag 1.9.5.2 (rev 712) was run for: (1) one pixel (52-53N, 6-7E), (2) 2 years, (3) without restart file, (4) with NCC forcing and (5) for all forest PFTs on a single pixel. The configuration can be found at home/users/sluys/MY_1_9_5_2/config/ORCHIDEE_OL/MYDEBUG1.
  • TEST 2: The old allocation scheme made up by stomate_alloc.f90 and stomate_npp.f90 (flag STOMATE_FUNCTIONAL_ALLOCATION = n) in the adjusted 1.9.5.2 (rev 712) code was run for: (1) one pixel (52-53N, 6-7E), (2) 2 years, (3) without restart file, (4) with NCC forcing and (5) for all forest PFTs on a single pixel. The configuration can be found at home/users/sluys/MY_DEBUG/config/ORCHIDEE_OL/MYDEBUG2.
  • TEST 2b: The old allocation scheme made up by stomate_growth_res_lim.f90 (flag STOMATE_FUNCTIONAL_ALLOCATION = n) in the adjusted 1.9.5.2 (rev 712) code was run for: (1) one pixel (52-53N, 6-7E), (2) 2 years, (3) without restart file, (4) with NCC forcing and (5) for all forest PFTs on a single pixel. The configuration can be found at home/users/sluys/MY_DEBUG/config/ORCHIDEE_OL/MYDEBUG2.
  • TEST 3: The new allocation scheme (flag STOMATE_FUNCTIONAL_ALLOCATION = y) in the adjusted 1.9.5.2 (rev 712) code was run for: (1) one pixel (52-53N, 6-7E), (2) 10 years, (3) without restart file, (4) with NCC forcing and (5) for all forest PFTs on a single pixel. The configuration can be found at home/users/sluys/MMY_DEBUG/config/ORCHIDEE_OL/MYDEBUG3.



ENERGY BUDGET

APPROACH

The aim of this development is to improve the simulation of the energy balance in Orchidee through the implementation of a multi-layer energy balance model that retains implicit coupling with the atmospheric model and with the sub-surface hydrology scheme. The scheme is described in full in the working document 'Towards a multi-layer representation of the energy balance in a land surface model' (contact: James Ryder).

ROUTINES TO BE CHANGED

  • enerbil.f90: Re-write to describe new calculation scheme but with the preservation of existing input and output variables
  • diffuco.f90: Re-write to calculate diffusion co-efficients in new scheme
  • intersurf.f90: Addition of new coupling co-efficients for description of transport between the surface and the LMDz atmospheric model

Attachments (8)