📄 clm_drv.f90
字号:
SUBROUTINE clm_drv (lon ,lat ,istep ,lun_rst ,rdlai) !=======================================================================! Source file: clm_drv.f90! Original version: Yongjiu Dai, September 15, 1999!!======================================================================= USE clm2d_module USE phycon_module USE enkfpar_module use clmpar_module USE clmtc_module USE clmtv_module USE miscell_module IMPLICIT NONE! ------------------- input variables ----------------------------- integer, INTENT(in) :: & lon, &! atm number of longitudes lat, &! atm number of latitudes istep, &! atm time step index lun_rst ! logical unit number of restart file logical, INTENT(in) :: & rdlai ! true if read in LAI data set! ---------------------- local variables -------------------------- integer i,j,k,l,m ! loop/array indices real pgcm(kpt), calday real solisb(kpt), solisd(kpt) ! --------------------------------------------------------------------- do k = 1, kpt if(ivt(k)==17)then totwb(k) = 0. cycle endif totwb(k) = ldew(k) + scv(k) do i = 1, msl totwb(k) = totwb(k) + wice(i,k) + wliq(i,k) enddo enddo! ======================================================================! [2] Solar absorbed by vegetation and ground! ====================================================================== call surrad(kpt ,sigf ,albg ,albv ,alb ,ssun, ssha ,& sols ,soll ,solsd ,solld ,parsun, parsha,& sabvsun, sabvsha, sabg ,sabvg,solisb, solisd )! ======================================================================! [3] Main driver for CLM! Note: the modification should do here if pursue the multitask processes ! "process the "big" vector of [kpt] points as [numlv] "little"! vectors of [numpnt] points. [beg] is the starting location of the! [numpnt] points for the "little" vector in the "big" [kpt] vector.! multitask [numlv] processes"! ====================================================================== call clm_main ( kpt, ivt, msl, maxsnl, istep, dtime, dlat, & ! soil information csol, porsl, phi0, bsw, & dkmg, dksatu, dkdry, & hksati, & ! vegetation information z0m, displa, sqrtdi, & effcon, vmax25, slti, hlti, shti, hhti, & trda, trdm, trop, gradm, binter, extkn, & lai, sai, rootfr, & ! atmospheric forcing pco2m, po2m, us, vs, tm, qm, psrf, rhoair, & iptype, rainrate, snowrate, & hu, ht, hq, & ! model variables needed for restart snl, dz, z, zi, & tss, tlsun, tlsha, ldew, wliq, wice, & sag, scv, snowdp, rootr, etrc, & tg, & ! fraction fveg,wt,fsno,sigf,ssw, & ! fluxes taux, tauy, & fsena, fevpa, lfevpa, fsenl, fevpl, etr, & fseng, fevpg, olrg, fgrnd, trad, tref, & rsur, rnof, rst, assim, respc, & ! net solar radiation cosz,frl,parsun,parsha,sabvsun,sabvsha,sabg,sabvg,& extkb, extkd, thermk, solisb, solisd, & ! energy balance error errore ) print*,'clm_main'! ======================================================================! [4] Water and Energy balance check! ====================================================================== call balance_a (kpt ,ivt, msl ,dtime ,ldew ,scv ,& wice(1:msl,1:kpt) ,wliq(1:msl,1:kpt) ,& rainrate ,snowrate ,fevpa ,rnof, totwb ,errore ,xerr ,zerr)! ======================================================================! [5] Calendar information for the next time step! ====================================================================== call ticktime (dtime ,jday ,iyear ,mcsec)! ======================================================================! [6] Ecosystem dynamics: phenology, vegetation, soil carbon! or call satellite data to get LAI,.., ect.;! Fraction of snow cover.! ====================================================================== calday = float(jday) + float(mcsec)/86400. call laiini(kpt,ivt,dlat,calday,glai,gsai,green,fveg,lai,sai) call fractsnow (kpt,fveg,z0m,snowdp,wt,sigf,fsno)! ======================================================================! [7] Compute the cosine of solar zenith angle for next-time step! ====================================================================== call clmzen (kpt, calday, dlon, dlat, cosz)! ======================================================================! [8] Compute albedo (used in the next step radiation computations)! ====================================================================== call albedo (kpt,ivt,albsol,albvgs,albvgl,& chil,ref,tran,fveg,green,lai,sai,cosz,wt,fsno,ssw,tg,& scv,sag,alb,albg,albv,ssun,ssha,tranc,thermk,extkb,extkd)! ======================================================================! [9] Return required surface fields to atmospheric model:! [kpt] vector of subgrid points -> [lpt] vector of land points ->! [lon] x [lat] grid. this mapping is for land points only.! non-land points are undefined.! ====================================================================== call clm2d_return (lon ,lat)! ======================================================================! [10] Write out the model variables for restart run ! ======================================================================! call restartsave (lun_rst) END SUBROUTINE clm_drv
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -