Changes between Version 28 and Version 29 of Branches/MergeOCN/Goll


Ignore:
Timestamp:
2015-05-27T14:37:40+02:00 (9 years ago)
Author:
dgoll
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Branches/MergeOCN/Goll

    v28 v29  
    180180             bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) - residual(ipts,j) 
    181181!DSGdebug_05 
    182  
    183  
    184  
    185  
    186 }}} 
     182}}} 
     183[...] 
    187184{{{ 
    188185!DSGdebug_05 
     
    190187           bm_alloc(:,j,k,icarbon) = f_alloc(:,j,k) * bm_alloc_tot(:,j)  ! residual was already removed from bm_alloc_tot 
    191188!DSGdebug_05 
     189}}} 
     190Further changes needed regarding residual to ensure mass conservation: 
     1911. The residual has to be initialized with zero: 
     192{{{ 
     193    ! If npp is not initialized, bare soil value is never set. 
     194    npp(:,:) = zero 
     195 
     196!DSGdebug_05a    ! Not having this results in an unitilized error 
     197!DSGdebug_05a    ! with valgrid, but I can't figure out why.  It always 
     198!DSGdebug_05a    ! seems to be set before being used. 
     199     ! DSG: Of course you get errors, when a variable was never set but is used 
     200     ! (for example in case first_call=true) 
     201     ! I set it to zero, as it should be zero in the aformentioned case 
     202!DSGdebug_05a    residual(:,:) = val_exp 
     203!DSGdebug_05a  
     204     residual(:,:) = zero 
     205!DSGdebug_05a  
     206}}} 
     2072. In case of nutrient down regulating bm_alloc the labile pool has to be corrected for not allocated residual 
     208{{{ 
     209    !DSGdebug_01 
     210    biomass(:,:,ilabile,:)   = biomass(:,:,ilabile,:)   - alloc_tot(:,:,:) 
     211    !DSGdebug_01 
     212 
     213    !DSGdebug_05a 
     214    WHERE ((residual(:,:).GT. zero).AND.(residual(:,:) .GT. bm_alloc_tot(:,:))) 
     215        biomass(:,:,ilabile,icarbon)  = biomass(:,:,ilabile,icarbon)   - (residual(:,:) - bm_alloc_tot(:,:)) 
     216    END WHERE 
     217    !DSGdebug_05a 
     218 
    192219}}} 
    193220