Opened 11 years ago

Closed 11 years ago

#6 closed defect (fixed)

Initialization of the variable sm_at in lpj_establish.f90

Reported by: dsolyga Owned by: nicolasvuichard
Priority: major Milestone: orchidee_1_9_6
Component: Biogeochemical processes Version: orchidee_1_9_5_2
Keywords: DGVM Cc:

Description

The local variable sm_at in lpj_establish is not initialized in the module. But it used in the following equations :

 biomass(:,j,iheartabove) = biomass(:,j,iheartabove) + &
                     ( biomass(:,j,isapabove) - sm2(:) * sm_at(:) )
 biomass(:,j,isapabove) = sm2(:) * sm_at(:)

 biomass(:,j,iheartbelow) = biomass(:,j,iheartbelow) + &
                  ( biomass(:,j,isapbelow) - sm2(:) * (un - sm_at) )
biomass(:,j,isapbelow) = sm2(:) * (un - sm_at(:))

The initialization is present but was commented since Nicolas Viovy modifications of the DGVM on his branch :https://forge.ipsl.jussieu.fr/orchidee/browser/perso/nicolas.viovy/orc_solvar/ORCHIDEE/src_stomate/lpj_establish.f90

!!$                ! ratio of above / total sap parts
!!$                sm_at(:) = biomass(:,j,isapabove) / &
!!$                     ( biomass(:,j,isapabove) + biomass(:,j,isapbelow) )
!!$

By default, the compiler set this variable to zero. Maybe this problem has effect on trees and "kill" them.

Change History (2)

comment:1 in reply to: ↑ description Changed 11 years ago by nicolasviovy

  • Owner changed from somebody to nicolasvuichard
  • Status changed from new to assigned

Replying to dsolyga:

Indeed when removing the old loop, the initialization of sm_at has been removed too.
So this initialization should by put in the next WHERE statement:

            WHERE ( ( d_ind(:,j) .GT. min_stomate ) .AND. &
                  ( biomass(:,j,isapabove) + biomass(:,j,isapbelow) ) .GT. sm2(:) )
                sm_at(:) = biomass(:,j,isapabove) / &
                   ( biomass(:,j,isapabove) + biomass(:,j,isapbelow) )
                biomass(:,j,iheartabove) = biomass(:,j,iheartabove) + &
                     ( biomass(:,j,isapabove) - sm2(:) * sm_at(:) )
                biomass(:,j,isapabove) = sm2(:) * sm_at(:)

                biomass(:,j,iheartbelow) = biomass(:,j,iheartbelow) + &
                     ( biomass(:,j,isapbelow) - sm2(:) * (un - sm_at(:)) )
                biomass(:,j,isapbelow) = sm2(:) * (un - sm_at(:))

             ENDWHERE

This modification should also be done in ORCHIDEE-N !


The local variable sm_at in lpj_establish is not initialized in the module. But it used in the following equations :

>  biomass(:,j,iheartabove) = biomass(:,j,iheartabove) + &
>                      ( biomass(:,j,isapabove) - sm2(:) * sm_at(:) )
>  biomass(:,j,isapabove) = sm2(:) * sm_at(:)
> 
>  biomass(:,j,iheartbelow) = biomass(:,j,iheartbelow) + &
>                   ( biomass(:,j,isapbelow) - sm2(:) * (un - sm_at) )
> biomass(:,j,isapbelow) = sm2(:) * (un - sm_at(:))
> 

The initialization is present but was commented since Nicolas Viovy modifications of the DGVM on his branch :https://forge.ipsl.jussieu.fr/orchidee/browser/perso/nicolas.viovy/orc_solvar/ORCHIDEE/src_stomate/lpj_establish.f90

!!$                ! ratio of above / total sap parts
!!$                sm_at(:) = biomass(:,j,isapabove) / &
!!$                     ( biomass(:,j,isapabove) + biomass(:,j,isapbelow) )
!!$

By default, the compiler set this variable to zero. Maybe this problem has effect on trees and "kill" them.

comment:2 Changed 11 years ago by dsolyga

  • Resolution set to fixed
  • Status changed from assigned to closed

This correction is done, see revision [620].
For the moment, it is ineffective because the condition is not respected (see ticket #7).
Didier Solyga

Note: See TracTickets for help on using tickets.