Changeset 6145


Ignore:
Timestamp:
2019-07-30T17:35:35+02:00 (5 years ago)
Author:
josefine.ghattas
Message:

Correction related to VEGET_UPDATE and small fractions as done in the trunk [6034]: Separated into new subroutine slowproc_veget_max_limit the code were veget_max and frac_nobio is set to 0 if smaller than min_vegfrac. This subroutine is now called in slowproc_veget (as before) and also called after the new map has been read in slowproc_readvegetmax. See ticket #456

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ORCHIDEE_2_2/ORCHIDEE/src_sechiba/slowproc.f90

    r6144 r6145  
    16561656 
    16571657!! ================================================================================================================================ 
    1658 !! SUBROUTINE   : slowproc_veget 
    1659 !! 
    1660 !>\BRIEF        Set small fractions to zero and normalize to keep the sum equal 1. Calucate veget and soiltile. 
    1661 !! 
    1662 !! DESCRIPTION  : Set small fractions to zero and normalize to keep the sum equal 1. Calucate veget and soiltile. 
    1663 !! (1) Set veget_max and frac_nobio for fraction smaller than min_vegfrac. 
    1664 !! (2) Calculate veget 
    1665 !! (3) Calculate totfrac_nobio 
    1666 !! (4) Calculate soiltile 
    1667 !! (5) Calculate fraclut 
    1668 !! 
    1669 !! RECENT CHANGE(S): None 
    1670 !! 
    1671 !! MAIN OUTPUT VARIABLE(S): :: frac_nobio, totfrac_nobio, veget_max, veget, soiltile, fraclut 
     1658!! SUBROUTINE   : slowproc_veget_max_limit 
     1659!! 
     1660!>\BRIEF        Set small fractions of veget_max to zero and normalize to keep the sum equal 1 
     1661!! 
     1662!! DESCRIPTION  : Set small fractions of veget_max to zero and normalize to keep the sum equal 1 
     1663!! 
     1664!! RECENT CHANGE(S): The subroutine was previously a part of slowproc_veget, 
     1665!!    but was separated to be called also from slowproc_readvegetmax in order 
     1666!!    to have limited/normalized vegetation fractions right after its reading 
     1667!!    from the file (added by V.Bastrikov, 15/06/2019) 
     1668!! 
     1669!! MAIN OUTPUT VARIABLE(S): :: frac_nobio, veget_max 
    16721670!! 
    16731671!! REFERENCE(S) : None 
     
    16771675!_ ================================================================================================================================ 
    16781676 
    1679   SUBROUTINE slowproc_veget (kjpindex, lai, frac_nobio, totfrac_nobio, veget_max, veget, soiltile, fraclut, nwdFraclut) 
     1677  SUBROUTINE slowproc_veget_max_limit (kjpindex, frac_nobio, veget_max) 
    16801678    ! 
    16811679    ! 0. Declarations 
     
    16831681    ! 0.1 Input variables  
    16841682    INTEGER(i_std), INTENT(in)                             :: kjpindex    !! Domain size - terrestrial pixels only 
    1685     REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(in)       :: lai         !! PFT leaf area index (m^{2} m^{-2}) 
    16861683 
    16871684    ! 0.2 Modified variables  
     
    16891686    REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(inout)    :: veget_max   !! Maximum fraction of vegetation type including none biological fraction (unitless) 
    16901687 
    1691     ! 0.3 Output variables  
    1692     REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(out)      :: veget       !! Fraction of pixel covered by PFT. Fraction accounts for none-biological land covers (unitless) 
    1693     REAL(r_std),DIMENSION (kjpindex), INTENT (out)         :: totfrac_nobio 
    1694     REAL(r_std), DIMENSION (kjpindex,nstm), INTENT(out)    :: soiltile     !! Fraction of each soil tile within vegtot (0-1, unitless) 
    1695     REAL(r_std), DIMENSION (kjpindex,nlut), INTENT(out)    :: fraclut      !! Fraction of each landuse tile (0-1, unitless) 
    1696     REAL(r_std), DIMENSION (kjpindex,nlut), INTENT(out)    :: nwdFraclut   !! Fraction of non-woody vegetation in each landuse tile (0-1, unitless) 
    1697  
    16981688    ! 0.4 Local scalar and varaiables  
    1699     INTEGER(i_std)                                         :: ji, jv, jst !! indices  
    1700     REAL(r_std)                                            :: SUMveg       
    1701  
    1702 !_ ================================================================================================================================ 
    1703     IF (printlev_loc > 8) WRITE(numout,*) 'Entering slowproc_veget' 
    1704  
    1705     !! 1. Set to zero fractions of frac_nobio and veget_max smaller than min_vegfrac 
    1706     !!    Normalize to have the sum equal 1. 
     1689    INTEGER(i_std)                                         :: ji, jv      !! indices  
     1690    REAL(r_std)                                            :: SUMveg      !! Total vegetation summed across PFTs 
     1691 
     1692!_ ================================================================================================================================ 
     1693    IF (printlev_loc >= 3) WRITE(numout,*) 'Entering slowproc_veget_max_limit' 
     1694 
     1695    !! Set to zero fractions of frac_nobio and veget_max smaller than min_vegfrac 
    17071696    DO ji = 1, kjpindex 
    17081697       IF ( SUM(frac_nobio(ji,:)) .LT. min_vegfrac ) THEN 
     
    17241713    ENDDO 
    17251714 
     1715    IF (printlev_loc >= 3) WRITE(numout,*) '  slowproc_veget_max_limit ended' 
     1716 
     1717  END SUBROUTINE slowproc_veget_max_limit 
     1718 
     1719 
     1720!! ================================================================================================================================ 
     1721!! SUBROUTINE   : slowproc_veget 
     1722!! 
     1723!>\BRIEF        Set small fractions to zero and normalize to keep the sum equal 1. Calucate veget and soiltile. 
     1724!! 
     1725!! DESCRIPTION  : Set small fractions to zero and normalize to keep the sum equal 1. Calucate veget and soiltile. 
     1726!! (1) Set veget_max and frac_nobio for fraction smaller than min_vegfrac. 
     1727!! (2) Calculate veget 
     1728!! (3) Calculate totfrac_nobio 
     1729!! (4) Calculate soiltile 
     1730!! (5) Calculate fraclut 
     1731!! 
     1732!! RECENT CHANGE(S): None 
     1733!! 
     1734!! MAIN OUTPUT VARIABLE(S): :: frac_nobio, totfrac_nobio, veget_max, veget, soiltile, fraclut 
     1735!! 
     1736!! REFERENCE(S) : None 
     1737!! 
     1738!! FLOWCHART    : None 
     1739!! \n 
     1740!_ ================================================================================================================================ 
     1741 
     1742  SUBROUTINE slowproc_veget (kjpindex, lai, frac_nobio, totfrac_nobio, veget_max, veget, soiltile, fraclut, nwdFraclut) 
     1743    ! 
     1744    ! 0. Declarations 
     1745    ! 
     1746    ! 0.1 Input variables  
     1747    INTEGER(i_std), INTENT(in)                             :: kjpindex    !! Domain size - terrestrial pixels only 
     1748    REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(in)       :: lai         !! PFT leaf area index (m^{2} m^{-2}) 
     1749 
     1750    ! 0.2 Modified variables  
     1751    REAL(r_std), DIMENSION(kjpindex,nnobio), INTENT(inout) :: frac_nobio  !! Fraction of the mesh which is covered by ice, lakes, ... 
     1752    REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(inout)    :: veget_max   !! Maximum fraction of vegetation type including none biological fraction (unitless) 
     1753 
     1754    ! 0.3 Output variables  
     1755    REAL(r_std), DIMENSION(kjpindex,nvm), INTENT(out)      :: veget       !! Fraction of pixel covered by PFT. Fraction accounts for none-biological land covers (unitless) 
     1756    REAL(r_std),DIMENSION (kjpindex), INTENT (out)         :: totfrac_nobio 
     1757    REAL(r_std), DIMENSION (kjpindex,nstm), INTENT(out)    :: soiltile     !! Fraction of each soil tile within vegtot (0-1, unitless) 
     1758    REAL(r_std), DIMENSION (kjpindex,nlut), INTENT(out)    :: fraclut      !! Fraction of each landuse tile (0-1, unitless) 
     1759    REAL(r_std), DIMENSION (kjpindex,nlut), INTENT(out)    :: nwdFraclut   !! Fraction of non-woody vegetation in each landuse tile (0-1, unitless) 
     1760 
     1761    ! 0.4 Local scalar and varaiables  
     1762    INTEGER(i_std)                                         :: ji, jv, jst !! indices  
     1763 
     1764!_ ================================================================================================================================ 
     1765    IF (printlev_loc > 8) WRITE(numout,*) 'Entering slowproc_veget' 
     1766 
     1767    !! 1. Set to zero fractions of frac_nobio and veget_max smaller than min_vegfrac 
     1768    !!    Normalize to have the sum equal 1. 
     1769    CALL slowproc_veget_max_limit(kjpindex, frac_nobio, veget_max) 
    17261770 
    17271771    !! 2. Calculate veget 
     
    24702514       ENDIF 
    24712515    ENDDO 
     2516 
     2517    !! Set to zero fractions of frac_nobio and veget_max smaller than min_vegfrac 
     2518    !! Normalize to have the sum equal 1. 
     2519    CALL slowproc_veget_max_limit(nbpt, frac_nobio_next, veget_next) 
    24722520 
    24732521    ! Write diagnostics 
Note: See TracChangeset for help on using the changeset viewer.