This page will list the parts of the code of ORCHIDEE we should "clean" for the version 2.0 and can be considered as a starting point for this work.[[BR]] Cleaning ORCHIDEE consists in two steps : reorganizing the stomate module and deleting/simplifying some parts of the code.[[BR]] All people working on the code can modify this page. = Restructuration of Stomate = In Orchidee 2.0, we want to make the organization of stomate similar as sechiba. More precisely, we want that : 1. to clear the file stomate.f90 from variables which could be defined in another module. For example a dozen variables are only used in stomate_season.f90. 2. to move the readstart and the writerestart of the variables in the modules they are defined and not anymore in stomate_io.f90 A list was made about the variables which could be moved. Look at the attached files below. (Warning : these files need to be updated!).[[BR]] A version of ORCHIDEE including these modifications was created in 2010; This work is not finished. You could find this version called Restruct_Stomate on the svn server. = Cleaning ORCHIDEE = A lot of simplifications have already been made in the externalized version of ORCHIDEE(regrouping R_Earth,pi,delete unused argument, etc...). Ask Didier Solyga about them. - Simplification : as the parameters min_sechiba and min_stomate are equal, we could replace these two parameters by an unique one (min_orchidee for example) - Simplification : two different allowed_err are defined in the hydrology modules : should we keep one ? - Clear all unuseful comments in the code - Unused parameters : ito_natagri and ito_total in '''stomate_constants.f90'''. ldveget_ori_on_restart and tsnow in '''constantes_veg.f90'''. Should we delete them ? - '''stomate_litter.f90''' : it seems that the variables litter_inc and litter_inc_PFT are the same : {{{ litter_inc(:,:,:,:) = zero lignin_struc_inc(:,:,:) = zero DO j = 2,nvm ! 2.2.1 litter DO k = 1, nlitt ! metabolic and structural ! 2.2.2 calculate litter increase (per m**2 of ground). ! Only a given fracion of fruit turnover is directly coverted into litter. ! Litter increase for each PFT, structural and metabolic, above/below litter_inc_PFT(:,j,k,iabove) = & litterfrac(ileaf,k) * bm_to_litter(:,j,ileaf) + & litterfrac(isapabove,k) * bm_to_litter(:,j,isapabove) + & litterfrac(iheartabove,k) * bm_to_litter(:,j,iheartabove) + & litterfrac(ifruit,k) * bm_to_litter(:,j,ifruit) + & litterfrac(icarbres,k) * bm_to_litter(:,j,icarbres) + & litterfrac(ileaf,k) * turnover(:,j,ileaf) + & litterfrac(isapabove,k) * turnover(:,j,isapabove) + & litterfrac(iheartabove,k) * turnover(:,j,iheartabove) + & litterfrac(ifruit,k) * turnover(:,j,ifruit) + & litterfrac(icarbres,k) * turnover(:,j,icarbres) litter_inc_PFT(:,j,k,ibelow) = & litterfrac(isapbelow,k) * bm_to_litter(:,j,isapbelow) + & litterfrac(iheartbelow,k) * bm_to_litter(:,j,iheartbelow) + & litterfrac(iroot,k) * bm_to_litter(:,j,iroot) + & litterfrac(isapbelow,k) * turnover(:,j,isapbelow) + & litterfrac(iheartbelow,k) * turnover(:,j,iheartbelow) + & litterfrac(iroot,k) * turnover(:,j,iroot) ! litter increase, met/struct, above/below litter_inc(:,k,j,iabove) = litter_inc(:,k,j,iabove) + litter_inc_PFT(:,j,k,iabove) litter_inc(:,k,j,ibelow) = litter_inc(:,k,j,ibelow) + litter_inc_PFT(:,j,k,ibelow) }}} - in '''lpj_crown.f90''' : copy of the variable height_presc in height_presc12. Then height_presc12 is no more used in ORCHIDEE 1.9.5.2 . {{{ ! no convertion, just cop height_presc_12(1:nvm) = height_presc(1:nvm) }}} - in '''weather.f90''' : an error message should be changed and translated in english : {{{ IF ( nbindex == 0 ) THEN WRITE(numout,*) 'Couillon! On est au plein milieu de l''ocean.' STOP 'Ou est-ce un bug?' }}}