River Routing Model (U. of Texas River Transport Model) [#!Branstetter:2001!#]
USES:
use shr_kind_mod, only : r8 => shr_kind_r8 use spmdMod , only : masterproc,npes,iam,mpicom,comp_id,MPI_REAL8,MPI_INTEGER use spmdMod , only : MPI_MAX,MPI_SUM use clm_varpar , only : lsmlon, lsmlat, rtmlon, rtmlat use clm_varcon , only : re, spval use clm_varctl , only : iulog use shr_sys_mod , only : shr_sys_flush use abortutils , only : endrun use RunoffMod , only : runoff, nt_rtm, rtm_tracers use RunoffMod , only : gsMap_rtm_gdc2glo use clm_mct_mod use perf_modPUBLIC TYPES:
implicit none privatePUBLIC MEMBER FUNCTIONS:
public Rtmini ! Initialize RTM grid and land mask public RtmInput ! Update rtm inputs public RtmMapl2r ! Maps input from clm to rtm grid public Rtm ! River routing model (based on U. Texas code) public RtmRest ! Read/write RTM restart data (netcdf)REVISION HISTORY:
Author: Sam LevisPRIVATE MEMBER FUNCTIONS:
PRIVATE TYPES:
RTM tracers character(len=256) :: rtm_trstr ! tracer string RTM input real(r8), pointer :: rtmin_acc(:,:) ! RTM averaging buffer for runoff real(r8), pointer :: rtmin_avg(:,:) ! RTM global input integer :: ncount_rtm = 0 ! RTM time averaging = number of time samples to average over real(r8) :: delt_rtm ! RTM time step real(r8) :: delt_rtm_max ! RTM max timestep real(r8) :: cfl_scale = 0.1_r8 ! cfl scale factor, must be <= 1.0 real(r8), parameter :: effvel(nt_rtm) = 0.35_r8 ! downstream velocity (m/s) glo integer , pointer :: dwnstrm_index(:)! downstream index gdc real(r8), pointer :: ddist(:) ! downstream dist (m) real(r8), pointer :: evel(:,:) ! effective tracer velocity (m/s) real(r8), pointer :: sfluxin(:,:) ! cell tracer influx (m3/s) real(r8), pointer :: fluxout(:,:) ! cell tracer outlflux (m3/s) real(r8), pointer :: totrunin(:,:) ! cell tracer lnd forcing on rtm grid (mm/s) map type(mct_sMat) :: sMat0_l2r type(mct_sMat) :: sMat0_l2r_d type(mct_sMatP) :: sMatP_l2r