Ignore:
Timestamp:
2011-06-17T14:02:17+02:00 (13 years ago)
Author:
didier.solyga
Message:

Externalized version merged with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_EXT/ORCHIDEE/src_stomate/stomate_alloc.f90

    r64 r257  
    162162       ! 1.1.1 soil levels 
    163163 
    164        z_soil(0) = 0. 
     164       z_soil(0) = zero 
    165165       z_soil(1:nbdl) = diaglev(1:nbdl) 
    166166 
     
    202202    ! 
    203203 
    204     f_alloc(:,:,:) = 0.0 
    205     f_alloc(:,:,icarbres) = 1.0 
     204    f_alloc(:,:,:) = zero 
     205    f_alloc(:,:,icarbres) = un 
    206206    ! 
    207207    ! 1.3 Convolution of the temperature and humidity profiles with some kind of profile 
     
    212212 
    213213    ! 1.3.1.1 rpc is an integration constant such that the integral of the root profile is 1. 
    214     rpc(:) = 1. / ( 1. - EXP( -z_soil(nbdl) / z_nitrogen ) ) 
     214    rpc(:) = un / ( un - EXP( -z_soil(nbdl) / z_nitrogen ) ) 
    215215 
    216216    ! 1.3.1.2 integrate over the nbdl levels 
     
    229229 
    230230    ! 1.3.2.1 rpc is an integration constant such that the integral of the root profile is 1. 
    231     rpc(:) = 1. / ( 1. - EXP( -z_soil(nbdl) / z_nitrogen ) ) 
     231    rpc(:) = un / ( un - EXP( -z_soil(nbdl) / z_nitrogen ) ) 
    232232 
    233233    ! 1.3.2.2 integrate over the nbdl levels 
    234234 
    235     h_nitrogen(:) = 0.0 
     235    h_nitrogen(:) = zero 
    236236 
    237237    DO l = 1, nbdl 
     
    251251    ! mean LAI on natural part 
    252252 
    253     natveg_tot(:) = 0.0 
    254     lai_nat(:) = 0.0 
     253    natveg_tot(:) = zero 
     254    lai_nat(:) = zero 
    255255 
    256256    DO j = 2, nvm 
     
    259259          veget_max_nat(:,j) = veget_max(:,j) 
    260260       ELSE 
    261           veget_max_nat(:,j) = 0.0 
     261          veget_max_nat(:,j) = zero 
    262262       ENDIF 
    263263 
     
    314314       !             3/ must be at the beginning of the growing season 
    315315 
    316        WHERE ( ( biomass(:,j,ileaf) .GT. 0.0 ) .AND. &  
     316       WHERE ( ( biomass(:,j,ileaf) .GT. zero ) .AND. &  
    317317            ( .NOT. senescence(:,j) ) .AND. & 
    318318            ( lai(:,j) .LT. lai_happy(j) ) .AND. & 
     
    337337       ELSEWHERE 
    338338 
    339           transloc_leaf(:) = 0.0 
     339          transloc_leaf(:) = zero 
    340340 
    341341       ENDWHERE 
     
    468468          ! leaf allocation 
    469469 
    470           LtoLSR(:) = 1. - RtoLSR(:) - StoLSR(:) 
     470          LtoLSR(:) = un - RtoLSR(:) - StoLSR(:) 
    471471          LtoLSR(:) = MAX( min_LtoLSR, MIN( max_LtoLSR, LtoLSR(:) ) ) 
    472472 
    473473          ! roots: the rest 
    474474 
    475           RtoLSR(:) = 1. - LtoLSR(:) - StoLSR(:) 
     475          RtoLSR(:) = un - LtoLSR(:) - StoLSR(:) 
    476476 
    477477       ENDWHERE 
     
    483483          StoLSR(:) = StoLSR(:) + LtoLSR(:) 
    484484 
    485           LtoLSR(:) = 0.0 
     485          LtoLSR(:) = zero 
    486486 
    487487       ENDWHERE 
     
    514514 
    515515                IF ( ( biomass(i,j,icarbres)*sla(j) ) .LT. 2*lai_max(j) ) THEN 
    516                    carb_rescale(i) = 1. / ( 1. + ecureuil(j) * ( LtoLSR(i) + RtoLSR(i) ) ) 
     516                   carb_rescale(i) = un / ( un + ecureuil(j) * ( LtoLSR(i) + RtoLSR(i) ) ) 
    517517                ELSE 
    518                    carb_rescale(i) = 1. 
     518                   carb_rescale(i) = un 
    519519                ENDIF 
    520520 
     
    522522 
    523523                f_alloc(i,j,isapabove) = StoLSR(i) * alloc_sap_above(i) * & 
    524                      ( 1. - f_alloc(i,j,ifruit) ) * carb_rescale(i) 
    525                 f_alloc(i,j,isapbelow) = StoLSR(i) * ( 1. - alloc_sap_above(i) ) * & 
    526                      ( 1. - f_alloc(i,j,ifruit) ) * carb_rescale(i) 
     524                     ( un - f_alloc(i,j,ifruit) ) * carb_rescale(i) 
     525                f_alloc(i,j,isapbelow) = StoLSR(i) * ( un - alloc_sap_above(i) ) * & 
     526                     ( un - f_alloc(i,j,ifruit) ) * carb_rescale(i) 
    527527 
    528528                f_alloc(i,j,iroot) = RtoLSR(i) * ( 1.-f_alloc(i,j,ifruit) ) * carb_rescale(i) 
     
    530530                ! this is equivalent to: 
    531531                ! reserve alloc = ecureuil*(LtoLSR+StoLSR)*(1-fruit_alloc)*carb_rescale 
    532                 f_alloc(i,j,icarbres) = ( 1. - carb_rescale(i) ) * ( 1.-f_alloc(i,j,ifruit) ) 
     532                f_alloc(i,j,icarbres) = ( un - carb_rescale(i) ) * ( 1.-f_alloc(i,j,ifruit) ) 
    533533 
    534534             ENDIF  ! senescent? 
Note: See TracChangeset for help on using the changeset viewer.