wiki:DevelopmentActivities/Isotopes

Inclusion of isotopes and tracers into ORCHIDEE

This page describes the work done to include into the model the isotopes for water and carbon.

Preliminary technical discussion (06/07/2012)

Presents : Camille Risi (CR), Nicolas Vuichard (Nvui), Didier Solyga (DS), Philippe Peylin (PP)

The following points were discussed :

  • Add a supplementary dimension to the variables involved by the isotopes (water+carbon+nitrogen) instead of creating new variables
  • If possible, the isotope will be in the last dimension.
  • Need to discuss with Yann Meurdesoif about the optimization of the code. Questions asked : implicit vs explicit loop : Is the following code :

   D0  j =1,nvm
         param(j) = param_std(index(j))
   END DO

equivalent to

    param(:) = param_std(index(:))

  • CR provides a list for the water variables (see below) so DS can check before to start in September
  • About the equations : it is possible to use a index vector to have generic equations with the isotopes (same process used for the externalization)
  • This work can be coupled to the spatialization.
  • Concerning the subroutines : we need to pass a contiguous section of an array to a subroutine.
    See the course Fortran 95-2, (slides 80-82) (in french) for more information : http://www.idris.fr/data/cours/lang/fortran/choix_doc.html

List of hydrology variables needed a isotope dimension :

#sechiba
vevapwet
transpir
vevapsno
vevapnu
tot_melt
runoff
returnflow
irrigation
drainage
qsintgev
snow
snow_nobio
+ variables venant d'intersurf

#hydrol Choisnel
bqsb
gqsb
mean_bqsb
mean_gqsb
precisol
snowmelt
icemelt
runoff
tot_water_beg
tot_water_end
subsnowveg
subsnownobio
run_off_tot
+ variables en commun avec sechiba

# hydrol_vegupd
qsintveg2
bdq, gdq, qsdq
gtr, btr, qstr

#routing
fast_reservoir
slow_reservoir
stream_reservoir
lake_reservoir
runoff_mean
drainage_mean
precip_mean
lakeinflow_mean
returnflow_mean
irrigation_mean
riverflow_mean
coastalflow_mean
fast_diag, slow_diag, stream_diag, lake_diag
fast_flow
slow_flow
stream_flow
reinfiltration
baseirrig
transport
floods
wdelay
inflow
lakeinflow
+ variables en commun avec sechiba

Answers from Yann (17/07) :

  • Yann prefers the explicit loops except for initialization because : a) the compiler knows the bounds so it can optimize the loops b) It gives more information to the developer. But we can use the vector notation for the first index. For example :
    DO k = 1,niso
         DO j = 1, nvm
              transpir(:,j,k) = 
         END DO
    END DO
    
  • Yann advises to set the dimension of the isotopes as the last dimension. The explicit loop over the last dimension will be mandatory because of Fortran optimization. This last example is not recommended :
        DO ji = 1,kjpindex
           param(ji,:) = alpha * param(ji,:) + (1. - alpha)
        END DO
    
    The same advice if we pass a variable to a subroutine. We can pass an array to a subroutine by indicating the full dimensions as input variables (it is currently done in the model).
  • Concerning the equations : No specific recommendation.

Last modified 9 years ago Last modified on 08/07/12 17:14:12