SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/tebgrid.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE TEBGRID( PSOILDEPTH, PD_G, PD_G1 )
00003 
00004 !     ##########################################################################
00005 !
00006 !!****  *TEBGRID*  
00007 !!
00008 !!    PURPOSE
00009 !!    -------
00010 !
00011 !     Calculates the soil grid configuration using a simple
00012 !     geometric relation for all sub-surface layers.
00013 !     This algorithm assumes the total soil depth > 0 m
00014 !         
00015 !     
00016 !!**  METHOD
00017 !!    ------
00018 !
00019 !     Direct calculation
00020 !
00021 !!    EXTERNAL
00022 !!    --------
00023 !
00024 !     None
00025 !!
00026 !!    IMPLICIT ARGUMENTS
00027 !!    ------------------
00028 !!
00029 !!    REFERENCE
00030 !!    ---------
00031 !!
00032 !!    Noilhan and Planton (1989)
00033 !!    Belair (1995)
00034 !!    Boone (2000)
00035 !!    Boone et al. (2000)
00036 !!    Habets et al. (2003)
00037 !!      
00038 !!    AUTHOR
00039 !!    ------
00040 !!      A. Boone           * Meteo-France *
00041 !!
00042 !!    MODIFICATIONS
00043 !!    -------------
00044 !!      Original    12/04/03
00045 !!      B. Decharme    12/10 uppermost soil layer set to 1cm
00046 !-------------------------------------------------------------------------------
00047 !
00048 !*       0.     DECLARATIONS
00049 !               ------------
00050 !
00051 !
00052 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00053 USE PARKIND1  ,ONLY : JPRB
00054 !
00055 IMPLICIT NONE
00056 !
00057 !*      0.1    declarations of arguments
00058 !
00059 !
00060 REAL, DIMENSION(:),   INTENT(IN)  :: PSOILDEPTH  ! total soil depth            (m)
00061 !                                   
00062 REAL, DIMENSION(:,:), INTENT(OUT) :: PD_G        ! depth of base of soil layers (m)
00063 REAL, OPTIONAL,       INTENT(IN)  :: PD_G1       ! depth of first layer
00064 !
00065 !
00066 !*      0.2    declarations of local variables
00067 !
00068 INTEGER                           :: JJ, JNLVL
00069 !
00070 !
00071 REAL, PARAMETER                   :: ZGRIDFACTOR = 3.0 ! soil depth factor
00072 !                                                      ! of increase with depth
00073 !                                                      ! for all *sub-surface* 
00074 !                                                      ! layers. Note, uppermost
00075 !                                                      ! layer fixed by other
00076 !                                                      ! constraints.          (-)
00077 !
00078 REAL                              :: ZD_G1 = 0.01      ! uppermost soil layer 
00079 !                                                      ! thickness/depth       (m)
00080 !                                                      ! Can not be too thin as 
00081 !                                                      ! then definition of soil
00082 !                                                      ! properties (i.e. phyiscal
00083 !                                                      ! representation of) and 
00084 !                                                      ! accuarcy of
00085 !                                                      ! numerical solution come
00086 !                                                      ! into question. If it is too
00087 !                                                      ! thick, then resolution of
00088 !                                                      ! diurnal cycle not as valid.
00089 !                                                      ! Also chosen to comply with
00090 !                                                      ! remotely sensed soil moisture.
00091 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00092 !-------------------------------------------------------------------------------
00093 !        0.     Initialization
00094 !               --------------
00095 !
00096 IF (LHOOK) CALL DR_HOOK('TEBGRID',0,ZHOOK_HANDLE)
00097 JNLVL = SIZE(PD_G,2)
00098 !
00099 IF (PRESENT(PD_G1)) ZD_G1 = PD_G1
00100 !-------------------------------------------------------------------------------
00101 !
00102 !*       1.     Assign soil layer depths
00103 !               ------------------------
00104 !               using a geometric relation
00105 !               for layers 2...N
00106 !               This is GENERAL rule.
00107 !               Note that the first soil layer
00108 !               is FIXED except for VERY thin
00109 !               soils (see #3 below).
00110 !
00111 PD_G(:,1)     = ZD_G1
00112 PD_G(:,JNLVL) = PSOILDEPTH(:)
00113 !
00114 DO JJ=JNLVL-1,2,-1
00115    PD_G(:,JJ) = PD_G(:,JJ+1)/ZGRIDFACTOR
00116 ENDDO
00117 !
00118 !-------------------------------------------------------------------------------
00119 !
00120 !*       2.     When the soil is sufficiently thin
00121 !               ------------------------------------------
00122 !               We recalculate layer depths such
00123 !               that all layer thicknesses are >= ZD_G1
00124 !               We favor keeping a minimum grid thickness
00125 !               OVER maintaining geometric relation
00126 !               for increasingly thin soils. This means
00127 !               that uppermost soil moisture is readily
00128 !               comparable (i.e. for same layer thickness)
00129 !               EVERYWHERE except for most thin soils (below).
00130 !
00131 DO JJ=1,JNLVL
00132    PD_G(:,JJ) = MAX(PD_G(:,JJ), JJ*ZD_G1)
00133 ENDDO
00134 !
00135 !-------------------------------------------------------------------------------
00136 !
00137 !*       3.     In the LIMIT For extremely thin soils
00138 !               ------------------------------------------
00139 !               This should be a RARE occurance, but 
00140 !               accounted for none-the-less ...:
00141 !               hold the ratio between all layer 
00142 !               thicknesses constant. 
00143 !           
00144 DO JJ=1,JNLVL
00145    WHERE(PSOILDEPTH(:) < JNLVL*ZD_G1)
00146       PD_G(:,JJ) = JJ*PSOILDEPTH/JNLVL
00147    END WHERE
00148 ENDDO
00149 IF (LHOOK) CALL DR_HOOK('TEBGRID',1,ZHOOK_HANDLE)
00150 !
00151 !-------------------------------------------------------------------------------
00152 !
00153 END SUBROUTINE TEBGRID