This module provides the main CLM driver physics calling sequence. Most computations occurs over ``clumps'' of gridcells (and associated subgrid scale entities) assigned to each MPI process. Computation is further parallelized by looping over clumps on each process using shared memory OpenMP.
The main CLM driver physics calling sequence for clm_driver1 is as follows:
+ interpMonthlyVeg interpolate monthly vegetation data [! CN or ! CNDV] + readMonthlyVegetation read vegetation data for two months [! CN or ! CNDV] ==== Begin Loop over clumps ==== -> dynland_hwcontent Get initial heat, water content + pftdyn_interp [pftdyn] + dynland_hwcontent Get new heat, water content [pftdyn] ==== Begin Loop over clumps ==== -> clm_driverInit save of variables from previous time step -> Hydrology1 canopy interception and precip on ground -> FracWet fraction of wet vegetated surface and dry elai -> SurfaceRadiation surface solar radiation -> UrbanRadiation surface solar and longwave radiation for Urban landunits -> Biogeophysics1 leaf temperature and surface fluxes -> BareGroundFluxes surface fluxes for bare soil or snow-covered vegetation patches -> UrbanFluxes surface fluxes for urban landunits -> MoninObukIni first-guess Monin-Obukhov length and wind speed -> FrictionVelocity friction velocity and potential temperature and humidity profiles -> CanopyFluxes leaf temperature and surface fluxes for vegetated patches -> QSat saturated vapor pressure, specific humidity, & derivatives at leaf surface -> MoninObukIni first-guess Monin-Obukhov length and wind speed -> FrictionVelocity friction velocity and potential temperature and humidity profiles -> Stomata stomatal resistance and photosynthesis for sunlit leaves -> Stomata stomatal resistance and photosynthesis for shaded leaves -> QSat recalculation of saturated vapor pressure, specific humidity, & derivatives at leaf surface + DustEmission Dust mobilization + DustDryDep Dust dry deposition -> Biogeophysics_Lake lake temperature and surface fluxes + VOCEmission compute VOC emission [VOC] -> Biogeophysics2 soil/snow & ground temp and update surface fluxes -> pft2col Average from PFT level to column level -> Hydrology2 surface and soil hydrology -> Hydrology_Lake lake hydrology -> SnowAge_grain update snow effective grain size for snow radiative transfer + CNEcosystemDyn Carbon Nitrogen model ecosystem dynamics: [CN] vegetation phenology and soil carbon + casa_ecosystemDyn CASA Prime Carbon model ecosystem dynamics: [CASA] vegetation phenology and soil carbon + EcosystemDyn "static" ecosystem dynamics: [! CN or ! CASA] vegetation phenology and soil carbon -> BalanceCheck check for errors in energy and water balances -> SurfaceAlbedo albedos for next time step -> UrbanAlbedo Urban landunit albedos for next time step ==== End Loop over clumps ==== Second phase of the clm main driver, for handling history and restart file output. -> write_diagnostic output diagnostic if appropriate + Rtmriverflux calls RTM river routing model [RTM] + inicPerp initial snow and soil moisture [is_perpetual] -> updateAccFlds update accumulated fields -> hist_update_hbuf accumulate history fields for time interval -> htapes_wrapup write history tapes if appropriate -> restFile_write write restart file if appropriate
Optional subroutines are denoted by an plus (+) with the associated CPP token or variable in brackets at the end of the line.
USES:
use shr_kind_mod , only : r8 => shr_kind_r8 use clmtype use clm_varctl , only : wrtdia, fpftdyn use clm_varctl , only : iulog use spmdMod , only : masterproc,mpicom use decompMod , only : get_proc_clumps, get_clump_bounds, get_proc_bounds use filterMod , only : filter, setFilters #if (defined CNDV) use CNDVMod , only : dv, histCNDV use pftdynMod , only : pftwt_interp #endif use pftdynMod , only : pftdyn_interp, pftdyn_wbal_init, pftdyn_wbal #ifdef CN use pftdynMod , only : pftdyn_cnbal #endif use dynlandMod , only : dynland_hwcontent use clm_varcon , only : zlnd, isturb use clm_time_manager , only : get_step_size, get_curr_calday, & get_curr_date, get_ref_date, get_nstep, is_perpetual use histFileMod , only : hist_update_hbuf, hist_htapes_wrapup use restFileMod , only : restFile_write, restFile_filename use inicPerpMod , only : inicPerp use accFldsMod , only : updateAccFlds use clm_driverInitMod , only : clm_driverInit use BalanceCheckMod , only : BeginWaterBalance, BalanceCheck use SurfaceRadiationMod , only : SurfaceRadiation use Hydrology1Mod , only : Hydrology1 use Hydrology2Mod , only : Hydrology2 use HydrologyLakeMod , only : HydrologyLake use Biogeophysics1Mod , only : Biogeophysics1 use BareGroundFluxesMod , only : BareGroundFluxes use CanopyFluxesMod , only : CanopyFluxes use Biogeophysics2Mod , only : Biogeophysics2 use BiogeophysicsLakeMod, only : BiogeophysicsLake use SurfaceAlbedoMod , only : SurfaceAlbedo use pft2colMod , only : pft2col #if (defined CN) use CNSetValueMod , only : CNZeroFluxes_dwt use CNEcosystemDynMod , only : CNEcosystemDyn use CNAnnualUpdateMod , only : CNAnnualUpdate use CNBalanceCheckMod , only : BeginCBalance, BeginNBalance, & CBalanceCheck, NBalanceCheck use ndepStreamMod , only : ndep_interp #else use STATICEcosysDynMod , only : EcosystemDyn #endif use DUSTMod , only : DustDryDep, DustEmission use VOCEmissionMod , only : VOCEmission use seq_drydep_mod , only : n_drydep, drydep_method, DD_XLND use STATICEcosysDynMod , only : interpMonthlyVeg use DryDepVelocity , only : depvel_compute #if (defined CASA) use CASAMod , only : casa_ecosystemDyn #endif #if (defined RTM) use RtmMod , only : RtmInput, RtmMapl2r, Rtm #endif use abortutils , only : endrun use UrbanMod , only : UrbanAlbedo, UrbanRadiation, UrbanFluxes use SNICARMod , only : SnowAge_grain use clm_atmlnd , only : clm_map2gcell use perf_modPUBLIC TYPES:
implicit nonePUBLIC MEMBER FUNCTIONS:
public :: clm_drv ! clm physics,history, restart writesPRIVATE MEMBER FUNCTIONS:
private :: write_diagnostic ! Write diagnostic information to log file