SURFEX v7.3
General documentation of Surfex
 All Classes Files Functions Variables Typedefs
/home/dasprezs/EXPORT_v7_3/src/SURFEX/soildif.F90
Go to the documentation of this file.
00001 !     #########
00002       SUBROUTINE SOILDIF( HSCOND, HDIFSFCOND,                                    &
00003                          PVEG, PCV, PFFG, PFFV,                                  &
00004                          PCG, PCGMAX, PCT, PFROZEN1,                             &
00005                          PD_G, PTG, PWG, PWGI, KWG_LAYER,                        &
00006                          PHCAPSOILZ, PCONDDRYZ, PCONDSLDZ,                       &
00007                          PBCOEF, PWSAT, PMPOTSAT, PSOILCONDZ, PSOILHCAPZ         )  
00008 !     ##########################################################################
00009 !
00010 !!****  *SOIL*  
00011 !!
00012 !!    PURPOSE
00013 !!    -------
00014 !
00015 !     Calculates the coefficients related to the soil (i.e., surface heat capacities, CG, CT,
00016 !     and thermal conductivity and heat capacity profiles)
00017 !         
00018 !     
00019 !!**  METHOD
00020 !!    ------
00021 !
00022 !     Direct calculation
00023 !
00024 !!    EXTERNAL
00025 !!    --------
00026 !
00027 !     None
00028 !!
00029 !!    IMPLICIT ARGUMENTS
00030 !!    ------------------
00031 !!
00032 !!    USE MODD_CST
00033 !!    USE MODD_PARAMETERS
00034 !!
00035 !!      
00036 !!    REFERENCE
00037 !!    ---------
00038 !!
00039 !!    Noilhan and Planton (1989)
00040 !!    Belair (1995)
00041 !!    Boone (2000)
00042 !!      
00043 !!    AUTHOR
00044 !!    ------
00045 !!      A. Boone           * Meteo-France *
00046 !!
00047 !!    MODIFICATIONS
00048 !!    -------------
00049 !!      Original    
00050 !!                  25/03/99      (Boone)   Added Johansen (1975)/Peters-Lidard 
00051 !!                                          option to explicitly compute CG
00052 !!                  08/25/02      (Boone)   DIF option code only
00053 !!                  25/05/08     (Decharme) Add Flood properties
00054 !!                  03/08/11     (Decharme) Optimization
00055 !-------------------------------------------------------------------------------
00056 !
00057 !*       0.     DECLARATIONS
00058 !               ------------
00059 !
00060 USE MODD_CSTS,       ONLY : XCL, XCI, XRHOLW, XRHOLI, XPI, XDAY, XCONDI, XTT, XLMTT, XG
00061 USE MODD_ISBA_PAR,   ONLY : XCONDWTR, XWGMIN
00062 USE MODD_SURF_PAR,   ONLY : XUNDEF
00063 !
00064 USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
00065 USE PARKIND1  ,ONLY : JPRB
00066 !
00067 IMPLICIT NONE
00068 !
00069 !*      0.1    declarations of arguments
00070 !
00071 !
00072  CHARACTER(LEN=*),     INTENT(IN)   :: HSCOND  ! thermal conductivity formulation
00073 !                                             ! 'NP89' :  Noilhan and Planton 
00074 !                                             !  (1989: McCumber-Pielke (1981) and
00075 !                                             !  Clapp and Hornberger (1978))
00076 !                                             ! 'PL98' Method of Johansen (1975) as
00077 !                                             ! presented by Peters-Lidard (JAS: 1998)
00078 !
00079  CHARACTER(LEN=*),     INTENT(IN)  :: HDIFSFCOND ! NOTE: Only used when HISBA = DIF
00080 !                                               ! MLCH' = include the insulating effect of leaf
00081 !                                               !         litter/mulch on the surface thermal cond.
00082 !                                               ! 'DEF' = no mulch effect
00083 !
00084 REAL, DIMENSION(:), INTENT(IN)    :: PVEG, PCV
00085 !                                      Soil and vegetation parameters
00086 !                                      PVEG = fraction of vegetation
00087 !                                      PCV  = the heat capacity of the vegetation
00088 !
00089 REAL, DIMENSION(:,:), INTENT(IN)  :: PHCAPSOILZ, PCONDDRYZ, PCONDSLDZ, PD_G 
00090 !                                    PHCAPSOILZ = soil heat capacity [J/(K m3)]
00091 !                                    PCONDDRYZ  = soil dry thermal conductivity 
00092 !                                                 [W/(m K)] 
00093 !                                    PCONDSLDZ  = soil solids thermal conductivity 
00094 !                                                 [W/(m K)]
00095 !                                    PD_G       = soil layer depth [m]
00096 !
00097 REAL, DIMENSION(:,:), INTENT(IN)  :: PBCOEF, PWSAT, PMPOTSAT, PTG
00098 !                                    PBCOEF   = profile of b-parameter (-)
00099 !                                    PWSAT    = profile of porosity (m3/m3)
00100 !                                    PMPOTSAT = profile of matric potential at saturation (m)
00101 !
00102 REAL, DIMENSION(:,:),INTENT(INOUT):: PWG, PWGI
00103 !                                    PWG    = soil liquid water content (m3/m3)
00104 !                                    PWGI   = soil frozen water content (m3/m3)
00105 !
00106 INTEGER, DIMENSION(:), INTENT(IN) :: KWG_LAYER  
00107 !                                    KWG_LAYER = Number of soil moisture layers (DIF option)
00108 !
00109 REAL, DIMENSION(:), INTENT(OUT)   :: PFROZEN1, PCG, PCT
00110 !                                      PFROZEN1 = fraction of ice in superficial soil
00111 !                                      PCT      = averaged surface heat capacity of the grid (m2 K J-1)
00112 !                                      PCG      = averaged surface soil heat capacity (m2 K J-1)
00113 !
00114 REAL,               INTENT(IN)    :: PCGMAX
00115 !                                      Maximum soil heat capacity
00116 !
00117 REAL, DIMENSION(:,:), INTENT(OUT) :: PSOILCONDZ, PSOILHCAPZ
00118 !                                    PSOILHCAP = soil heat capacity        (J m-3 K-1)
00119 !                                    PSOILCOND = soil thermal conductivity (W m-1 K-1)
00120 !
00121 !
00122 REAL, DIMENSION(:), INTENT(IN)   :: PFFV, PFFG
00123 !                                   PFFG = Floodplain fraction over the ground
00124 !                                   without snow (ES)
00125 !                                   PFFV = Floodplain fraction over vegetation
00126 !                                   without snow (ES)
00127 !
00128 !
00129 !*      0.2    declarations of local variables
00130 !
00131 REAL, DIMENSION(SIZE(PWG,1),SIZE(PWG,2)) :: ZMATPOT
00132 !                                           ZMATPOT    = soil matric potential (m)
00133 !
00134 REAL                         :: ZFROZEN2DF, ZUNFROZEN2DF, ZCONDSATDF, ZLOG_CONDI, ZLOG_CONDWTR, 
00135                                 ZSATDEGDF, ZKERSTENDF, ZWORK1, ZWORK2, ZWORK3, ZLOG, ZWTOT
00136                                 
00137 !
00138 REAL, PARAMETER              :: ZVEGMULCH  = 0.10 ! reduction factor for the surface layer
00139 !                                                 ! thermal condictivity due to the presence
00140 !                                                 ! of mulch/organic material (ISBA-DF)
00141 !                                                 ! Set to 1 to remove this effect. 
00142 !
00143 REAL, DIMENSION(SIZE(PVEG)) :: ZFF, ZCF !heat capacity of the flood
00144 !
00145 REAL, DIMENSION(SIZE(PVEG)) :: ZWTD ! Water table depth (m)  
00146 !
00147 INTEGER :: INI, INL, JJ, JL, IDEPTH
00148 !
00149 REAL(KIND=JPRB) :: ZHOOK_HANDLE
00150 !
00151 !-------------------------------------------------------------------------------
00152 !
00153 !*       0.     Initialization:
00154 !               ---------------
00155 !
00156 IF (LHOOK) CALL DR_HOOK('SOILDIF',0,ZHOOK_HANDLE)
00157 !
00158 INI=SIZE(PWG,1)
00159 INL=SIZE(PWG,2)
00160 !
00161 ZCF    (:)   = XUNDEF
00162 !
00163 !-------------------------------------------------------------------------------
00164 !
00165 !*       1.     MATRIC POTENTIAL AND MOISTURE EXTRAPOLATION
00166 !               -------------------------------------------
00167 !
00168 !
00169 !Water Table Depth (m) 
00170 !WTD will be able to evolve according to observations or MODCOU/TRIP inputs 
00171 ZWTD(:)=100.
00172 !
00173 DO JL=1,INL
00174    DO JJ=1,INI
00175 !   
00176       IDEPTH=KWG_LAYER(JJ)
00177       IF(JL>IDEPTH)THEN
00178 !                           
00179 !       total matric potential
00180         ZWORK1  = MIN(1.0,(PWG(JJ,IDEPTH)+PWGI(JJ,IDEPTH))/PWSAT(JJ,IDEPTH))
00181         ZLOG    = PBCOEF(JJ,IDEPTH)*LOG(ZWORK1)
00182         ZMATPOT(JJ,IDEPTH) = PMPOTSAT(JJ,IDEPTH)*EXP(-ZLOG)
00183 
00184 !       extrapolation of total matric potential
00185         ZWORK1         = 0.5*(PD_G(JJ,IDEPTH)+PD_G(JJ,IDEPTH-1))
00186         ZWORK2         = 0.5*(PD_G(JJ,JL)+PD_G(JJ,JL-1))
00187         ZWORK3         = (PMPOTSAT(JJ,JL)-ZMATPOT(JJ,IDEPTH))/MAX(1.E-6,ZWTD(JJ)-ZWORK1)
00188         ZMATPOT(JJ,JL) = PMPOTSAT(JJ,JL)-ZWORK3*MAX(0.0,ZWTD(JJ)-ZWORK2)
00189 !
00190 !       total soil water content computation
00191         ZWORK1      = MAX(1.0,ZMATPOT(JJ,JL)/PMPOTSAT(JJ,JL))
00192         ZLOG        = LOG(ZWORK1)/PBCOEF(JJ,JL)
00193         ZWTOT       = PWSAT(JJ,JL)*EXP(-ZLOG)
00194         ZWTOT       = MAX(XWGMIN,ZWTOT)
00195 !
00196 !       soil liquid water content computation
00197         ZMATPOT(JJ,JL) = ZMATPOT(JJ,JL) + XLMTT*MIN(0.0,PTG(JJ,JL)-XTT)/(XG*PTG(JJ,JL))
00198 !        
00199         ZWORK1      = MAX(1.0,ZMATPOT(JJ,JL)/PMPOTSAT(JJ,JL))
00200         ZLOG        = LOG(ZWORK1)/PBCOEF(JJ,JL)
00201         PWG (JJ,JL) = PWSAT(JJ,JL)*EXP(-ZLOG)
00202         PWG (JJ,JL) = MAX(XWGMIN,PWG(JJ,JL))
00203 !        
00204 !       soil ice computation        
00205         PWGI(JJ,JL) = MAX(0.0,ZWTOT-PWG(JJ,JL))
00206 !        
00207       ENDIF
00208    ENDDO
00209 ENDDO
00210 !
00211 !-------------------------------------------------------------------------------
00212 !
00213 !*       2.     THE HEAT CAPACITY OF BARE-GROUND
00214 !               --------------------------------
00215 !               Explicit soil thermal diffusion option:
00216 !
00217 IF(HSCOND == 'NP89')THEN
00218 !
00219 ! Calculate the thermal conductivity [W/(m K)] using the method of McCumber and 
00220 ! Pielke (1981) used implicitly by Noilhan and Planton (1989).
00221 ! First calculate the soil water potential using Clapp and Hornberger (1978)
00222 ! (m): NOTE that this method DOES NOT explicitly account for soil ice
00223 ! so use a ice-weighted average (to prevent excessively low values
00224 ! when a soil layer totally frozen): 
00225 !
00226     DO JL=1,INL
00227      DO JJ=1,INI
00228 !        
00229 !       matric potential
00230         ZWORK1  = MIN(1.0,PWG(JJ,JL)/PWSAT(JJ,JL))
00231         ZLOG    = PBCOEF(JJ,JL)*LOG(ZWORK1)
00232         ZMATPOT(JJ,JL) = PMPOTSAT(JJ,JL)*EXP(-ZLOG)
00233 !
00234 !       thermal conductivity
00235         ZWORK1  = LOG10(-ZMATPOT(JJ,JL))+4.7
00236         ZWORK2  = 418.*EXP(-ZWORK1)
00237         ZWORK3  = MAX(0.171,ZWORK2)
00238         PSOILCONDZ(JJ,JL) = (1.0-PWSAT(JJ,JL)+PWG(JJ,JL)+PWGI(JJ,JL))   &        
00239                           / ((PWGI(JJ,JL)/XCONDI)+((1.0-PWSAT(JJ,JL)+PWG(JJ,JL))/ZWORK3))  
00240 !
00241      ENDDO
00242   ENDDO
00243                          
00244 !
00245 ELSE
00246 !
00247 ! Calculate thermal conductivity using PL98, but for explicit layers:
00248 !
00249   ZLOG_CONDI   = LOG(XCONDI)
00250   ZLOG_CONDWTR = LOG(XCONDWTR)
00251 !
00252   DO JL=1,INL
00253      DO JJ=1,INI
00254 !     
00255         ZFROZEN2DF   = PWGI(JJ,JL)/(PWGI(JJ,JL) + MAX(PWG(JJ,JL),XWGMIN))
00256         ZUNFROZEN2DF = (1.0-ZFROZEN2DF)*PWSAT(JJ,JL)
00257 !
00258 !Old: CONDSATDF=(CONDSLDZ**(1.0-WSAT))*(CONDI**(WSAT-UNFROZEN2DF))*(CONDWTR**UNFROZEN2DF)  
00259         ZWORK1      = LOG(PCONDSLDZ(JJ,JL))*(1.0-PWSAT(JJ,JL))
00260         ZWORK2      = ZLOG_CONDI*(PWSAT(JJ,JL)-ZUNFROZEN2DF)
00261         ZWORK3      = ZLOG_CONDWTR*ZUNFROZEN2DF        
00262         ZCONDSATDF  = EXP(ZWORK1+ZWORK2+ZWORK3)
00263 !
00264         ZSATDEGDF   = MAX(0.1, PWG(JJ,JL)/PWSAT(JJ,JL))
00265         ZKERSTENDF  = LOG10(ZSATDEGDF) + 1.0
00266         ZKERSTENDF  = (1.0-ZFROZEN2DF)*ZKERSTENDF + ZFROZEN2DF *ZSATDEGDF  
00267 !
00268 ! Thermal conductivity of soil:
00269 !
00270         PSOILCONDZ(JJ,JL) = ZKERSTENDF*(ZCONDSATDF-PCONDDRYZ(JJ,JL)) + PCONDDRYZ(JJ,JL)  
00271 !
00272      ENDDO
00273   ENDDO
00274 !
00275 ENDIF
00276 !
00277 ! Surface soil water reservoir frozen fraction:
00278 !
00279 PFROZEN1(:) = PWGI(:,1)/(PWGI(:,1) + MAX(PWG(:,1),XWGMIN))
00280 !
00281 ! This takes into account the insulating effect of dead vegetation/leaf litter/mulch on
00282 ! the uppermost soil layer thermal conductivity: it is a simple modification
00283 ! of the ideas presented by Gonzalez-Sosa et al., AFM, 1999: the thermal
00284 ! conductivity is reduced by the factor 'ZVEGMULCH'. The main impact is
00285 ! to reduce the thermal coupling between the surface layer and the 
00286 ! sub-surface soil. In the limit when
00287 ! there is no vegetation, the conductivity collapses into the bare-soil value.
00288 ! If the option is not in force ( HDIFSFCOND /= 'MLCH') then use only soil
00289 ! properties (no mulch effect). 
00290 !
00291 IF(HDIFSFCOND == 'MLCH') PSOILCONDZ(:,1) = (1.0 - PVEG(:) * (1.0 - ZVEGMULCH)) * PSOILCONDZ(:,1) 
00292 !
00293 ! Soil Heat capacity [J/(m3 K)]
00294 !
00295 DO JL=1,INL
00296    DO JJ=1,INI
00297       PSOILHCAPZ(JJ,JL) = (1.0-PWSAT(JJ,JL))*PHCAPSOILZ(JJ,JL) +         &
00298                                PWG  (JJ,JL) *XCL*XRHOLW        +         &
00299                                PWGI (JJ,JL) *XCI*XRHOLI    
00300    ENDDO
00301 ENDDO
00302 !
00303 ! Surface soil thermal inertia [(m2 K)/J]
00304 !
00305 PCG(:) = 2.*SQRT(XPI/(PSOILCONDZ(:,1)*PSOILHCAPZ(:,1)*XDAY))
00306 PCG(:) = MIN( PCG(:), PCGMAX )
00307 !
00308 !-------------------------------------------------------------------------------
00309 !
00310 !*       3.     THE HEAT CAPACITY OF FLOOD
00311 !               --------------------------------
00312 !
00313 ZFF(:) = PVEG(:)*PFFV(:) + (1.-PVEG(:))*PFFG(:)
00314 !
00315 WHERE (ZFF(:) > 0.)                                                 
00316        ZCF(:) = 2.0 * SQRT( XPI/(XCONDWTR*XRHOLW*XCL*XDAY) )
00317 END WHERE                 
00318 !
00319 !-------------------------------------------------------------------------------
00320 !
00321 !*      4.      GRID-AVERAGED HEAT CAPACITY
00322 !               ---------------------------
00323 !
00324 ! With contribution from the ground, flood and vegetation for explicit
00325 ! (ISBA-ES) snow scheme option (i.e. no snow effects included here):
00326 !
00327 PCT(:) = 1. / ( (1.-PVEG(:))*(1.-PFFG(:)) / PCG(:)     &
00328                  +  PVEG(:) *(1.-PFFV(:)) / PCV(:)     &
00329                  +  ZFF (:)               / ZCF(:)     )  
00330 !
00331 !
00332 !
00333 !-------------------------------------------------------------------------------
00334 !
00335 !*      5.      RESTORE DEFAULT VALUES
00336 !               ----------------------
00337 !
00338 ! restore default moisture and ice values under moisture soil depth
00339 !
00340 DO JL=1,INL
00341    DO JJ=1,INI
00342       IDEPTH=KWG_LAYER(JJ)
00343       IF(JL>IDEPTH)THEN
00344         PWG (JJ,JL) = XUNDEF
00345         PWGI(JJ,JL) = XUNDEF
00346       ENDIF
00347    ENDDO
00348 ENDDO
00349 !
00350 IF (LHOOK) CALL DR_HOOK('SOILDIF',1,ZHOOK_HANDLE)
00351 !
00352 !-------------------------------------------------------------------------------
00353 !
00354 END SUBROUTINE SOILDIF