Version 1 (modified by nvuilsce, 10 years ago) (diff)


Technical modifications

This page summarizes the choices and the modifications done for the externalization of the parameters.

Global Specifications

We tried to respect as soon as possible the structure of the code.

Three folders over five were affected by the modifications : src_parameters, src_sechiba and src_stomate.

We regroup all the files containing parameters in src_parameters. We rewrite some parts of the code in order not to have explicit references to indexes to some PFTs (like agricultural ones).

We delete all the multiple definitions of some parameters like pi or the terrestrial radius R_Earth.

Finally, we gave names to some coefficents intervening in equations and externalized them.

The main changings are detailed below :


Originally, this folder was organized in 4 files called constantes.f90, constantes_co2.f90, constantes_veg.f90 and constantes_soil.f90.

The last three files were mixed up with stomate_constants.f90 to give pft_parameters.f90 and constantes_mtc.f90. These new files make the initialization and the overwriting of the pft-parameters.

All the default values for the pft-parameters are in constantes_mtc.f90.

constantes.f90 contains all the physical constants used by ORCHIDEE and (for the moment) the rest of the externalized parameters (scalar and no-pfts-sized arrays).


We add a new module called qsat_moisture.f90. This module regroups the routines for the calculation of qsat (previously in constantes_veg.f90).
intersurf.f90 reads the number of PFTs and the parameters values chosen by the user.


We delete stomate_constants.f90 in order to move its parameters in src_parameters. The too-specific parameters were moved to stomate_data.f90.
Due to Fortran language, we have to delete the following structures in ORCHIDEE (previously in stomate_constants.f90:

! type declaration for photosynthesis
  TYPE t_photo_type
    REAL(r_std), DIMENSION(nvm)                  :: t_max_a
    REAL(r_std), DIMENSION(nvm)                  :: t_max_b
    REAL(r_std), DIMENSION(nvm)                  :: t_max_c
    REAL(r_std), DIMENSION(nvm)                  :: t_opt_a
    REAL(r_std), DIMENSION(nvm)                  :: t_opt_b
    REAL(r_std), DIMENSION(nvm)                  :: t_opt_c
    REAL(r_std), DIMENSION(nvm)                  :: t_min_a
    REAL(r_std), DIMENSION(nvm)                  :: t_min_b
    REAL(r_std), DIMENSION(nvm)                  :: t_min_c
  END TYPE t_photo_type

and :

! type declaration for phenology
  TYPE pheno_type
    REAL(r_std), DIMENSION(nvm,3)                :: gdd
    REAL(r_std), DIMENSION(nvm)                  :: ngd
    REAL(r_std), DIMENSION(nvm)                  :: ncdgdd_temp
    REAL(r_std), DIMENSION(nvm)                  :: hum_frac
    REAL(r_std), DIMENSION(nvm)                  :: lowgpp_time
    REAL(r_std), DIMENSION(nvm)                  :: leaffall
    REAL(r_std), DIMENSION(nvm)                  :: leafagecrit
    REAL(r_std)                       :: tau_hum_month
    REAL(r_std)                       :: tau_hum_week
    REAL(r_std)                       :: tau_t2m_month
    REAL(r_std)                       :: tau_t2m_week
    REAL(r_std)                       :: tau_tsoil_month
    REAL(r_std)                       :: tau_soilhum_month
    REAL(r_std)                       :: tau_gpp_week
    REAL(r_std)                       :: tau_gdd
    REAL(r_std)                       :: tau_ngd
    REAL(r_std)                       :: tau_longterm
    REAL(r_std), DIMENSION(nvm)                  :: lai_initmin
    CHARACTER(len=6), DIMENSION(nvm)            :: pheno_model
    CHARACTER(len=6), DIMENSION(nvm)            :: senescence_type
    REAL(r_std), DIMENSION(nvm,3)                :: senescence_temp
    REAL(r_std), DIMENSION(nvm)                  :: senescence_hum
    REAL(r_std), DIMENSION(nvm)                  :: nosenescence_hum
    REAL(r_std), DIMENSION(nvm)                  :: max_turnover_time
    REAL(r_std), DIMENSION(nvm)                  :: min_leaf_age_for_senescence
    REAL(r_std), DIMENSION(nvm)                  :: min_turnover_time
    REAL(r_std), DIMENSION(nvm)                  :: hum_min_time
  END TYPE pheno_type

We replace the structures by individuals arrays.

During our validations on fluxnet sites, we modified the herbivory model and the formulation for the variable "black_carbon". In stomate_season.f90, we replace :

    DO j = 2,nvm
       IF ( natural(j) ) THEN
          WHERE ( nlflong_nat(:) .GT. zero )
             consumption(:) = hvc1 * nlflong_nat(:) ** hvc2
             herbivores(:,j) = one_year * green_age(:) * nlflong_nat(:) / consumption(:)
             herbivores(:,j) = 100000.
          herbivores(:,j) = 100000.

by :

     DO j = 2,nvm
       IF ( natural(j) ) THEN
          WHERE ( nlflong_nat(:,j) .GT. zero )
             consumption(:) = hvc1 * nlflong_nat(:,j) ** hvc2
             herbivores(:,j) = one_year * green_age(:,j) * nlflong_nat(:,j) / consumption(:)
             herbivores(:,j) = 100000.
          herbivores(:,j) = 100000.

in order to make herbivores more pft-specific. For "black_carbon", we relaced the following line

 black_carbon(:) = &
                  black_carbon(:) + bcfrac(:) * residue(:) 

by :

 black_carbon(:) = &
                  black_carbon(:) + bcfrac(:) * residue(:) * veget_max(:,j)

In both cases, when we add a new PFT on the same surface, the consumption of herbivory and the quantity of black carbon was doubled ! That's why we change the formulations of these two sub-models.

JULY 2011

The most part of the externalized parameters which were still in src_sechiba are in src_parameters now.