⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 balance_a.f90

📁 CLM集合卡曼滤波数据同化算法
💻 F90
字号:
  SUBROUTINE balance_a (kpt   ,ivt    ,msl      ,dtime    ,ldew     ,scv ,&                        wice  ,wliq   ,rainrate ,snowrate ,fevpa  ,rnof,&                        totwb ,errore ,xerr     ,zerr)! ======================================================================!      Source file: balance_a.f90! Original version: Yongjiu Dai, September 15, 1999!! accumulate the numerical truncation errors of water and energy balance! calculation. it is helpful to see the performance of the process of integration.!! the error for energy balance:! error = abs(Net radiation - the change of internal energy - Sensible heat - Latent heat)! should be less than 0.02 W/m2 in each time integration interval;! ! the error for water balance:! error = abs(precipitation - the change of water storage - evaporation - runoff)! should be less than 0.001 mm in  each time integration interval.!! ======================================================================  implicit none  integer, INTENT(in) :: &        kpt,             &!number of clm land points, including subgrid points        ivt(kpt),        &!land cover types        msl               !soil layer number  real, INTENT(in) :: &        dtime,           &!time step (s)        ldew(kpt),       &!depth of water on foliage (kg/m2)        scv(kpt),        &! snow water equivalent (mm)        wice(1:msl, 1:kpt),  &!ice lens mass (kg/m2)        wliq(1:msl, 1:kpt),  &!liquid water mass (kg/m2)        rainrate(kpt),   &!rain rate (mm/s)        snowrate(kpt),   &!snow rate (mm/s)        fevpa(kpt),      &!evapotranspiration from canopy to atmosphere (mm/s)        rnof(kpt),       &!total runoff (mm h2o/s)        errore(kpt),     &!energy balnce error (W/m2)        totwb(kpt)        !water mass begining of  the time step  real, INTENT(inout) :: &        xerr(kpt),       &!accumulation of water balance error        zerr(kpt)         !accumulation of energy balnce error! local  integer i, k            !do loop index  real  endwb(kpt),      &!water mass end of  the time step        errorw(kpt)       !water balance error (mm)! ----------------------------------------------------------------------! water balance      do k = 1, kpt         if(ivt(k) == 17)then            xerr(k) = 0.            errorw(k) = 0.            cycle         endif         if(ivt(k) == 11 .OR. ivt(k) == 15)then            errorw(k) = 0.            cycle         endif         endwb(k) = ldew(k) + scv(k)  &                  + (- rainrate(k) - snowrate(k) + fevpa(k) + rnof(k))*dtime         do i = 1, msl            endwb(k) = endwb(k) + wice(i,k) + wliq(i,k)         enddo         if(wice(1,k)>30.) print*, 'ice over 20 mm in top soil layer', wice(1,k)         errorw(k) = endwb(k) - totwb(k)!*       if(abs(errorw(k)) > 1.e-3) &!*       write(6,*) 'Warning: water balance violation',errorw(k),totwb(k),endwb(k)         xerr(k) = xerr(k) + errorw(k)      enddo! energy balance      do k = 1, kpt         if(abs(errore(k)) > .2) then!*          write(6,*) 'Warning: energy balance violation ',errore(k)         endif         zerr(k) = zerr(k) + errore(k)      enddo  END SUBROUTINE balance_a

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -