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 [DUST] + DustDryDep Dust dry deposition [DUST] -> 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 ====
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, fndepdyn use clm_varctl , only : iulog use spmdMod , only : masterproc,mpicom use decompMod , only : get_proc_clumps, get_clump_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_write_binary, restFile_filename use inicFileMod , only : inicfile_perp 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 ndepFileMod , only : ndepdyn_interp #else use STATICEcosysDynMod , only : EcosystemDyn, interpMonthlyVeg #endif #if (defined DUST) use DUSTMod , only : DustDryDep, DustEmission #endif use VOCEmissionMod , only : VOCEmission use DryDepVelocity , only : depvel_compute #if (defined CASA) use CASAMod , only : casa_ecosystemDyn #endif #if (defined RTM) use RtmMod , only : Rtmriverflux #endif use abortutils , only : endrun use UrbanMod , only : UrbanAlbedo, UrbanRadiation, UrbanFluxes use perf_mod use SNICARMod , only : SnowAge_grain use aerdepMod , only : interpMonthlyAerdep use clm_varctl , only : set_caerdep_from_file, set_dustdep_from_filePUBLIC TYPES:
implicit nonePUBLIC MEMBER FUNCTIONS:
public :: clm_driver1 ! Phase one of the clm driver (clm physics) public :: clm_driver2 ! Phase two of the clm driver (history, restart writes updates etc.)PRIVATE MEMBER FUNCTIONS:
private :: write_diagnostic ! Write diagnostic information to log file private :: do_inicwrite ! If time to write an initial condition file