DALESURBAN Program

Uses

  • program~~dalesurban~~UsesGraph program~dalesurban DALESURBAN modpois modpois program~dalesurban->modpois module~initfac initfac program~dalesurban->module~initfac module~modboundary modboundary program~dalesurban->module~modboundary module~modchecksim modchecksim program~dalesurban->module~modchecksim module~moddriver moddriver program~dalesurban->module~moddriver module~modeb modEB program~dalesurban->module~modeb module~modfielddump modfielddump program~dalesurban->module~modfielddump module~modfields modfields program~dalesurban->module~modfields module~modforces modforces program~dalesurban->module~modforces module~modglobal modglobal program~dalesurban->module~modglobal module~modibm modibm program~dalesurban->module~modibm module~modmpi modmpi program~dalesurban->module~modmpi module~modpurifiers modpurifiers program~dalesurban->module~modpurifiers module~modsave modsave program~dalesurban->module~modsave module~modstartup modstartup program~dalesurban->module~modstartup module~modstat_nc modstat_nc program~dalesurban->module~modstat_nc module~modstatsdump modstatsdump program~dalesurban->module~modstatsdump module~modsubgrid modsubgrid program~dalesurban->module~modsubgrid module~modthermodynamics modthermodynamics program~dalesurban->module~modthermodynamics module~modtimedep modtimedep program~dalesurban->module~modtimedep module~modtrees modtrees program~dalesurban->module~modtrees module~initfac->module~modglobal module~initfac->module~modmpi mpi mpi module~initfac->mpi netcdf netcdf module~initfac->netcdf module~modboundary->mpi module~modchecksim->module~modglobal module~modinletdata modinletdata module~moddriver->module~modinletdata module~modeb->module~modglobal module~modeb->mpi module~modfielddump->module~modfields module~modfielddump->module~modglobal module~modfielddump->mpi decomp_2d decomp_2d module~modfields->decomp_2d module~modibmdata modibmdata module~modibm->module~modibmdata module~modibm->mpi module~modmpi->mpi module~modpurifiers->mpi module~modstartup->mpi module~modstat_nc->module~modmpi module~modstat_nc->netcdf module~modstatsdump->module~modglobal module~modstatsdump->module~modmpi module~modstatsdump->mpi module~modsubgriddata modsubgriddata module~modsubgrid->module~modsubgriddata module~modsubgrid->mpi module~modtimedep->mpi module~modtrees->mpi

Calls

program~~dalesurban~~CallsGraph program~dalesurban DALESURBAN advection advection program~dalesurban->advection createscals createscals program~dalesurban->createscals initpois initpois program~dalesurban->initpois poisson poisson program~dalesurban->poisson proc~bottom bottom program~dalesurban->proc~bottom proc~boundary boundary program~dalesurban->proc~boundary proc~calcfluidvolumes calcfluidvolumes program~dalesurban->proc~calcfluidvolumes proc~checkinitvalues checkinitvalues program~dalesurban->proc~checkinitvalues proc~checksim checksim program~dalesurban->proc~checksim proc~coriolis coriolis program~dalesurban->proc~coriolis proc~createmasks createmasks program~dalesurban->proc~createmasks proc~createpurifiers createpurifiers program~dalesurban->proc~createpurifiers proc~createtrees createtrees program~dalesurban->proc~createtrees proc~eb EB program~dalesurban->proc~eb proc~exitfielddump exitfielddump program~dalesurban->proc~exitfielddump proc~exitmpi exitmpi program~dalesurban->proc~exitmpi proc~exitstatsdump exitstatsdump program~dalesurban->proc~exitstatsdump proc~fielddump fielddump program~dalesurban->proc~fielddump proc~fixuinf1 fixuinf1 program~dalesurban->proc~fixuinf1 proc~fixuinf2 fixuinf2 program~dalesurban->proc~fixuinf2 proc~forces forces program~dalesurban->proc~forces proc~grwdamp grwdamp program~dalesurban->proc~grwdamp proc~halos halos program~dalesurban->proc~halos proc~ibmnorm ibmnorm program~dalesurban->proc~ibmnorm proc~ibmwallfun ibmwallfun program~dalesurban->proc~ibmwallfun proc~init2decomp init2decomp program~dalesurban->proc~init2decomp proc~initboundary initboundary program~dalesurban->proc~initboundary proc~initchecksim initchecksim program~dalesurban->proc~initchecksim proc~initdriver initdriver program~dalesurban->proc~initdriver proc~initeb initEB program~dalesurban->proc~initeb proc~initfielddump initfielddump program~dalesurban->proc~initfielddump proc~initfields initfields program~dalesurban->proc~initfields proc~initglobal initglobal program~dalesurban->proc~initglobal proc~initibm initibm program~dalesurban->proc~initibm proc~initmpi initmpi program~dalesurban->proc~initmpi proc~initstat_nc initstat_nc program~dalesurban->proc~initstat_nc proc~initstatsdump initstatsdump program~dalesurban->proc~initstatsdump proc~initsubgrid initsubgrid program~dalesurban->proc~initsubgrid proc~initthermodynamics initthermodynamics program~dalesurban->proc~initthermodynamics proc~inittimedep inittimedep program~dalesurban->proc~inittimedep proc~lstend lstend program~dalesurban->proc~lstend proc~masscorr masscorr program~dalesurban->proc~masscorr proc~nudge nudge program~dalesurban->proc~nudge proc~periodicebcorr periodicEBcorr program~dalesurban->proc~periodicebcorr proc~purifiers purifiers program~dalesurban->proc~purifiers proc~readfacetfiles readfacetfiles program~dalesurban->proc~readfacetfiles proc~readinitfiles readinitfiles program~dalesurban->proc~readinitfiles proc~readnamelists readnamelists program~dalesurban->proc~readnamelists proc~shiftedpbcs shiftedPBCs program~dalesurban->proc~shiftedpbcs proc~starttimer starttimer program~dalesurban->proc~starttimer proc~statsdump statsdump program~dalesurban->proc~statsdump proc~subgrid subgrid program~dalesurban->proc~subgrid proc~thermodynamics thermodynamics program~dalesurban->proc~thermodynamics proc~timedep timedep program~dalesurban->proc~timedep proc~trees trees program~dalesurban->proc~trees proc~writerestartfiles writerestartfiles program~dalesurban->proc~writerestartfiles scalsource scalsource program~dalesurban->scalsource tstep_integrate tstep_integrate program~dalesurban->tstep_integrate tstep_update tstep_update program~dalesurban->tstep_update wfmneutral wfmneutral proc~bottom->wfmneutral wfuno wfuno proc~bottom->wfuno proc~driverchunkread driverchunkread proc~boundary->proc~driverchunkread proc~drivergen drivergen proc~boundary->proc~drivergen proc~fluxtop fluxtop proc~boundary->proc~fluxtop proc~fluxtopscal fluxtopscal proc~boundary->proc~fluxtopscal proc~valuetop valuetop proc~boundary->proc~valuetop proc~valuetopscal valuetopscal proc~boundary->proc~valuetopscal proc~xmi_driver xmi_driver proc~boundary->proc~xmi_driver proc~xmi_profile xmi_profile proc~boundary->proc~xmi_profile proc~xmo_convective xmo_convective proc~boundary->proc~xmo_convective proc~xqi_driver xqi_driver proc~boundary->proc~xqi_driver proc~xqi_profile xqi_profile proc~boundary->proc~xqi_profile proc~xqo_convective xqo_convective proc~boundary->proc~xqo_convective proc~xsi_custom xsi_custom proc~boundary->proc~xsi_custom proc~xsi_driver xsi_driver proc~boundary->proc~xsi_driver proc~xsi_profile xsi_profile proc~boundary->proc~xsi_profile proc~xso_convective xso_convective proc~boundary->proc~xso_convective proc~xti_driver xTi_driver proc~boundary->proc~xti_driver proc~xti_profile xTi_profile proc~boundary->proc~xti_profile proc~xto_convective xTo_convective proc~boundary->proc~xto_convective proc~ymi_profile ymi_profile proc~boundary->proc~ymi_profile proc~ymo_convective ymo_convective proc~boundary->proc~ymo_convective proc~yqi_profile yqi_profile proc~boundary->proc~yqi_profile proc~yqo_convective yqo_convective proc~boundary->proc~yqo_convective proc~ysi_profile ysi_profile proc~boundary->proc~ysi_profile proc~yso_convective yso_convective proc~boundary->proc~yso_convective proc~yti_profile yTi_profile proc~boundary->proc~yti_profile proc~yto_convective yTo_convective proc~boundary->proc~yto_convective proc~fluidvolume fluidvolume proc~calcfluidvolumes->proc~fluidvolume proc~uoutletarea uoutletarea proc~calcfluidvolumes->proc~uoutletarea proc~voutletarea voutletarea proc~calcfluidvolumes->proc~voutletarea mpi_bcast mpi_bcast proc~checkinitvalues->mpi_bcast mpi_finalize mpi_finalize proc~checkinitvalues->mpi_finalize proc~calccourant calccourant proc~checksim->proc~calccourant proc~calcdiffnr calcdiffnr proc~checksim->proc~calcdiffnr proc~chkdiv chkdiv proc~checksim->proc~chkdiv mpi_allreduce mpi_allreduce proc~createmasks->mpi_allreduce zstart zstart proc~createmasks->zstart proc~createpurifiers->mpi_bcast proc~createtrees->mpi_bcast interface~writestat_nc writestat_nc proc~eb->interface~writestat_nc proc~eb->mpi_bcast proc~calclw calclw proc~eb->proc~calclw proc~gaussji gaussji proc~eb->proc~gaussji proc~intqh intqH proc~eb->proc~intqh proc~matinv4 matinv4 proc~eb->proc~matinv4 proc~updategr updateGR proc~eb->proc~updategr proc~writestat_1d_nc writestat_1D_nc proc~eb->proc~writestat_1d_nc proc~writestat_2d_nc writestat_2D_nc proc~eb->proc~writestat_2d_nc proc~exitstat_nc exitstat_nc proc~exitfielddump->proc~exitstat_nc decomp_2d_finalize decomp_2d_finalize proc~exitmpi->decomp_2d_finalize proc~exitmpi->mpi_finalize mpi_wtime mpi_wtime proc~exitmpi->mpi_wtime proc~fielddump->interface~writestat_nc proc~detfreestream detfreestream proc~fixuinf2->proc~detfreestream exchange_halo_z exchange_halo_z proc~halos->exchange_halo_z proc~xm_periodic xm_periodic proc~halos->proc~xm_periodic proc~xq_periodic xq_periodic proc~halos->proc~xq_periodic proc~xs_periodic xs_periodic proc~halos->proc~xs_periodic proc~xt_periodic xT_periodic proc~halos->proc~xt_periodic proc~ym_periodic ym_periodic proc~halos->proc~ym_periodic proc~yq_periodic yq_periodic proc~halos->proc~yq_periodic proc~ys_periodic ys_periodic proc~halos->proc~ys_periodic proc~yt_periodic yT_periodic proc~halos->proc~yt_periodic proc~advecc2nd_corr_liberal advecc2nd_corr_liberal proc~ibmnorm->proc~advecc2nd_corr_liberal proc~solid solid proc~ibmnorm->proc~solid proc~ibmwallfun->interface~writestat_nc proc~diffc_corr diffc_corr proc~ibmwallfun->proc~diffc_corr proc~diffu_corr diffu_corr proc~ibmwallfun->proc~diffu_corr proc~diffv_corr diffv_corr proc~ibmwallfun->proc~diffv_corr proc~diffw_corr diffw_corr proc~ibmwallfun->proc~diffw_corr proc~wallfunheat wallfunheat proc~ibmwallfun->proc~wallfunheat proc~wallfunmom wallfunmom proc~ibmwallfun->proc~wallfunmom proc~ibmwallfun->proc~writestat_1d_nc decomp_2d_init decomp_2d_init proc~init2decomp->decomp_2d_init mpi_cart_coords mpi_cart_coords proc~init2decomp->mpi_cart_coords mpi_cart_shift mpi_cart_shift proc~init2decomp->mpi_cart_shift proc~initchecksim->mpi_bcast zend zend proc~initdriver->zend proc~initdriver->zstart proc~define_nc define_nc proc~initeb->proc~define_nc proc~initeb->proc~gaussji proc~initeb->proc~matinv4 proc~ncinfo ncinfo proc~initeb->proc~ncinfo proc~open_nc open_nc proc~initeb->proc~open_nc proc~writestat_dims_nc writestat_dims_nc proc~initeb->proc~writestat_dims_nc proc~initfielddump->mpi_bcast proc~initfielddump->proc~define_nc proc~initfielddump->proc~ncinfo proc~initfielddump->proc~open_nc proc~initfielddump->proc~writestat_dims_nc alloc_z alloc_z proc~initfields->alloc_z float float proc~initglobal->float proc~initglobal->mpi_bcast xsize xsize proc~initglobal->xsize ysize ysize proc~initglobal->ysize proc~initglobal->zend zsize zsize proc~initglobal->zsize proc~initglobal->zstart proc~initibm->exchange_halo_z proc~initibm->proc~define_nc proc~initibmnorm initibmnorm proc~initibm->proc~initibmnorm proc~initibmwallfun initibmwallfun proc~initibm->proc~initibmwallfun proc~initibm->proc~ncinfo proc~initibm->proc~open_nc proc~initibm->proc~solid proc~initibm->proc~writestat_dims_nc mpi_comm_rank mpi_comm_rank proc~initmpi->mpi_comm_rank mpi_comm_size mpi_comm_size proc~initmpi->mpi_comm_size mpi_init mpi_init proc~initmpi->mpi_init proc~initstatsdump->mpi_bcast proc~initstatsdump->proc~define_nc proc~initstatsdump->proc~ncinfo proc~initstatsdump->proc~open_nc proc~initstatsdump->proc~writestat_dims_nc proc~initstatsdump->zend proc~initstatsdump->zstart proc~subgridnamelist subgridnamelist proc~initsubgrid->proc~subgridnamelist proc~inittimedep->proc~timedep proc~inittimedep->mpi_bcast proc~avexy_ibm avexy_ibm proc~masscorr->proc~avexy_ibm proc~sumy_ibm sumy_ibm proc~masscorr->proc~sumy_ibm proc~periodicebcorr->mpi_allreduce proc~readfacetfiles->mpi_bcast nf90_get_var nf90_get_var proc~readfacetfiles->nf90_get_var nf90_inq_varid nf90_inq_varid proc~readfacetfiles->nf90_inq_varid nf90_open nf90_open proc~readfacetfiles->nf90_open proc~qsat qsat proc~readfacetfiles->proc~qsat proc~readinitfiles->proc~halos proc~readinitfiles->proc~thermodynamics proc~readinitfiles->mpi_bcast proc~readinitfiles->proc~avexy_ibm proc~calc_halflev calc_halflev proc~readinitfiles->proc~calc_halflev proc~readinitfiles->proc~drivergen proc~randomnize randomnize proc~readinitfiles->proc~randomnize proc~readdriverfile readdriverfile proc~readinitfiles->proc~readdriverfile proc~readdriverfile_chunk readdriverfile_chunk proc~readinitfiles->proc~readdriverfile_chunk proc~readinletfile readinletfile proc~readinitfiles->proc~readinletfile proc~readrestartfiles readrestartfiles proc~readinitfiles->proc~readrestartfiles proc~slabsum slabsum proc~readinitfiles->proc~slabsum proc~readnamelists->mpi_bcast proc~shiftedpbcs->zstart proc~starttimer->mpi_wtime proc~statsdump->interface~writestat_nc proc~statsdump->proc~avexy_ibm proc~avey_ibm avey_ibm proc~statsdump->proc~avey_ibm proc~tkestatsdump tkestatsdump proc~statsdump->proc~tkestatsdump proc~statsdump->proc~writestat_1d_nc proc~closure closure proc~subgrid->proc~closure proc~diffc diffc proc~subgrid->proc~diffc proc~diffe diffe proc~subgrid->proc~diffe proc~diffu diffu proc~subgrid->proc~diffu proc~diffv diffv proc~subgrid->proc~diffv proc~diffw diffw proc~subgrid->proc~diffw proc~sources sources proc~subgrid->proc~sources proc~thermodynamics->proc~avexy_ibm proc~thermodynamics->proc~calc_halflev proc~calthv calthv proc~thermodynamics->proc~calthv proc~diagfld diagfld proc~thermodynamics->proc~diagfld proc~thermo thermo proc~thermodynamics->proc~thermo proc~timedeplw timedeplw proc~timedep->proc~timedeplw proc~timedepnudge timedepnudge proc~timedep->proc~timedepnudge proc~timedepsurf timedepsurf proc~timedep->proc~timedepsurf proc~timedepsw timedepsw proc~timedep->proc~timedepsw proc~trees->mpi_allreduce mpi_abort mpi_abort proc~writerestartfiles->mpi_abort proc~writerestartfiles->mpi_bcast interface~writestat_nc->proc~writestat_1d_nc interface~writestat_nc->proc~writestat_2d_nc proc~writestat_3d_nc writestat_3D_nc interface~writestat_nc->proc~writestat_3d_nc proc~writestat_3d_short_nc writestat_3D_short_nc interface~writestat_nc->proc~writestat_3d_short_nc proc~writestat_time_nc writestat_time_nc interface~writestat_nc->proc~writestat_time_nc proc~advecc2nd_corr_liberal->zstart proc~avexy_ibm->mpi_allreduce proc~avey_ibm->mpi_allreduce proc~calccourant->mpi_allreduce proc~calcdiffnr->mpi_allreduce proc~chkdiv->mpi_allreduce proc~closurebc closurebc proc~closure->proc~closurebc proc~define_nc->nf90_inq_varid nf90_def_var nf90_def_var proc~define_nc->nf90_def_var nf90_enddef nf90_enddef proc~define_nc->nf90_enddef nf90_inq_dimid nf90_inq_dimid proc~define_nc->nf90_inq_dimid nf90_put_att nf90_put_att proc~define_nc->nf90_put_att nf90_redef nf90_redef proc~define_nc->nf90_redef proc~nchandle_error nchandle_error proc~define_nc->proc~nchandle_error proc~diagfld->proc~avexy_ibm proc~fromztop fromztop proc~diagfld->proc~fromztop proc~diffc_corr->zstart proc~diffu_corr->zstart proc~diffv_corr->zstart proc~diffw_corr->zstart proc~driverchunkread->proc~readdriverfile_chunk proc~writedriverfile writedriverfile proc~drivergen->proc~writedriverfile nf90_close nf90_close proc~exitstat_nc->nf90_close proc~exitstat_nc->proc~nchandle_error proc~fluidvolume->proc~avexy_ibm proc~initibmnorm->mpi_bcast proc~initibmnorm->zend proc~initibmnorm->zstart proc~initibmwallfun->mpi_bcast proc~initibmwallfun->zend proc~initibmwallfun->zstart proc~alignment alignment proc~initibmwallfun->proc~alignment proc~plane_line_intersection plane_line_intersection proc~initibmwallfun->proc~plane_line_intersection proc~intqh->mpi_allreduce proc~open_nc->nf90_get_var proc~open_nc->nf90_inq_varid proc~open_nc->nf90_open nf90_create nf90_create proc~open_nc->nf90_create nf90_def_dim nf90_def_dim proc~open_nc->nf90_def_dim proc~open_nc->nf90_def_var proc~open_nc->nf90_enddef proc~open_nc->nf90_inq_dimid nf90_inquire nf90_inquire proc~open_nc->nf90_inquire nf90_inquire_dimension nf90_inquire_dimension proc~open_nc->nf90_inquire_dimension proc~open_nc->nf90_put_att nf90_sync nf90_sync proc~open_nc->nf90_sync proc~excjs excjs proc~readinletfile->proc~excjs proc~yinterpolate yinterpolate proc~readinletfile->proc~yinterpolate proc~zinterpolate zinterpolate proc~readinletfile->proc~zinterpolate proc~zinterpolatet zinterpolatet proc~readinletfile->proc~zinterpolatet proc~zinterpolatew zinterpolatew proc~readinletfile->proc~zinterpolatew proc~zinterpolate1d zinterpolate1d proc~readrestartfiles->proc~zinterpolate1d proc~zinterpolate2d zinterpolate2d proc~readrestartfiles->proc~zinterpolate2d proc~zinterpolatet1d zinterpolatet1d proc~readrestartfiles->proc~zinterpolatet1d proc~zinterpolatew1d zinterpolatew1d proc~readrestartfiles->proc~zinterpolatew1d proc~slabsum->mpi_allreduce proc~solid->zstart proc~subgridnamelist->mpi_bcast proc~sumy_ibm->mpi_allreduce proc~tkestatsdump->exchange_halo_z proc~tkestatsdump->proc~avexy_ibm proc~uoutletarea->proc~sumy_ibm proc~updategr->proc~qsat proc~sumx_ibm sumx_ibm proc~voutletarea->proc~sumx_ibm proc~wallfunheat->mpi_allreduce proc~wallfunheat->zstart proc~heat_transfer_coef_flux heat_transfer_coef_flux proc~wallfunheat->proc~heat_transfer_coef_flux proc~interp_velocity_c interp_velocity_c proc~wallfunheat->proc~interp_velocity_c proc~is_equal is_equal proc~wallfunheat->proc~is_equal proc~local_coords local_coords proc~wallfunheat->proc~local_coords proc~moist_flux moist_flux proc~wallfunheat->proc~moist_flux proc~trilinear_interp_var trilinear_interp_var proc~wallfunheat->proc~trilinear_interp_var proc~wallfunmom->mpi_allreduce proc~wallfunmom->zstart proc~wallfunmom->proc~alignment proc~wallfunmom->proc~is_equal proc~wallfunmom->proc~local_coords proc~mom_transfer_coef_neutral mom_transfer_coef_neutral proc~wallfunmom->proc~mom_transfer_coef_neutral proc~mom_transfer_coef_stability mom_transfer_coef_stability proc~wallfunmom->proc~mom_transfer_coef_stability proc~wallfunmom->proc~trilinear_interp_var proc~writestat_1d_nc->nf90_inq_varid nf90_put_var nf90_put_var proc~writestat_1d_nc->nf90_put_var proc~writestat_1d_nc->nf90_sync proc~writestat_2d_nc->nf90_inq_varid proc~writestat_2d_nc->nf90_put_var proc~writestat_2d_nc->nf90_sync proc~writestat_dims_nc->nf90_inq_varid proc~writestat_dims_nc->nf90_inquire_dimension proc~writestat_dims_nc->nf90_put_var proc~xsi_custom->zstart proc~alignment->proc~is_equal proc~closurebc->exchange_halo_z mpi_isend mpi_isend proc~excjs->mpi_isend mpi_recv mpi_recv proc~excjs->mpi_recv mpi_wait mpi_wait proc~excjs->mpi_wait proc~local_coords->proc~is_equal proc~cross_product cross_product proc~local_coords->proc~cross_product nf90_strerror nf90_strerror proc~nchandle_error->nf90_strerror proc~sumx_ibm->mpi_allreduce proc~trilinear_interp_var->zstart proc~eval_corners eval_corners proc~trilinear_interp_var->proc~eval_corners proc~trilinear_interp trilinear_interp proc~trilinear_interp_var->proc~trilinear_interp proc~writestat_3d_nc->nf90_inq_varid proc~writestat_3d_nc->nf90_put_var proc~writestat_3d_nc->nf90_sync proc~writestat_3d_short_nc->nf90_inq_varid proc~writestat_3d_short_nc->nf90_put_var proc~writestat_3d_short_nc->nf90_sync proc~writestat_time_nc->nf90_inq_varid proc~writestat_time_nc->nf90_put_var proc~writestat_time_nc->nf90_sync

Source Code

program DALESURBAN      !Version 48

!!----------------------------------------------------------------
!!     0.0    USE STATEMENTS FOR CORE MODULES
!!----------------------------------------------------------------
  use modmpi,            only : initmpi,exitmpi,myid,starttimer
  use modglobal,         only : initglobal,rk3step,timeleft
  use modstartup,        only : readnamelists,init2decomp,checkinitvalues,readinitfiles,exitmodules
  use modfields,         only : initfields
  use modsave,           only : writerestartfiles
  use modboundary,       only : initboundary,boundary,grwdamp,halos
  use modthermodynamics, only : initthermodynamics,thermodynamics
  use modsubgrid,        only : initsubgrid,subgrid
  use modforces,         only : calcfluidvolumes,forces,coriolis,lstend,fixuinf1,fixuinf2,fixthetainf,nudge,masscorr,shiftedPBCs,periodicEBcorr
  use modpois,           only : initpois,poisson
  use modibm,            only : initibm,createmasks,ibmwallfun,ibmnorm,bottom
  use modtrees,          only : createtrees,trees
  use modpurifiers,      only : createpurifiers,purifiers
  use initfac,           only : readfacetfiles
  use modEB,             only : initEB,EB
  use moddriver,         only : initdriver

!----------------------------------------------------------------
!     0.1     USE STATEMENTS FOR ADDONS STATISTICAL ROUTINES
!----------------------------------------------------------------
  use modchecksim,     only : initchecksim,checksim
  use modstat_nc,      only : initstat_nc
  use modfielddump,    only : initfielddump,fielddump,exitfielddump
  use modstatsdump,    only : initstatsdump,statsdump,exitstatsdump    !tg3315
  use modtimedep,      only : inittimedep,timedep
  implicit none

!----------------------------------------------------------------
!     1      READ NAMELISTS,INITIALISE GRID, CONSTANTS AND FIELDS
!----------------------------------------------------------------
  call initmpi

  !call startup
  call readnamelists

  call init2decomp

  call checkinitvalues

  call initglobal

  call initfields

  call initboundary

  call initthermodynamics

  call initsubgrid

  ! call initinlet

  call initdriver

  call initpois

  call readfacetfiles
  ! These should be combined once file format is sorted
  call initibm

  call createmasks

  call calcfluidvolumes

  call readinitfiles

  call createscals

!---------------------------------------------------------
!      2     INITIALIZE STATISTICAL ROUTINES AND ADD-ONS
!---------------------------------------------------------
  call initchecksim ! Could be deprecated

  call initstat_nc ! Could be deprecated

  call initstatsdump

  call initEB

  call inittimedep

  call initfielddump

  call boundary

  call createtrees

  call createpurifiers

  !call fielddump

!------------------------------------------------------
!   3.0   MAIN TIME LOOP
!------------------------------------------------------
  !write(*,*) 'Starting rank ', myid
  call starttimer
  do while ((timeleft>0) .or. (rk3step < 3))

    call tstep_update

    call timedep

!-----------------------------------------------------
!   3.2   ADVECTION AND DIFFUSION
!-----------------------------------------------------

    call advection ! includes predicted pressure gradient term

    call shiftedPBCs

    call subgrid

!-----------------------------------------------------
!   3.3   THE SURFACE LAYER
!-----------------------------------------------------

    call bottom
!-----------------------------------------------------
!   3.4   REMAINING TERMS
!-----------------------------------------------------

    call coriolis       !remaining terms of ns equation

    call forces         !remaining terms of ns equation

    call lstend         !large scale forcings

    call nudge          ! nudge top cells of fields to enforce steady-state

    call ibmwallfun     ! immersed boundary forcing: only shear forces.
    call periodicEBcorr

    call masscorr       ! correct pred. velocity pup to get correct mass flow

    call ibmnorm        ! immersed boundary forcing: set normal velocities to zero

    call EB

    call trees

    call scalsource     ! adds continuous forces in specified region of domain

!------------------------------------------------------
!   3.4   EXECUTE ADD ONS
!------------------------------------------------------
    call fixuinf2

    call fixuinf1

!-----------------------------------------------------------------------
!   3.5  PRESSURE FLUCTUATIONS, TIME INTEGRATION AND BOUNDARY CONDITIONS
!-----------------------------------------------------------------------
    call grwdamp        !damping at top of the model

    call poisson

    call purifiers      !placing of purifiers here may need to be checked

    call tstep_integrate

    call halos

    call checksim

    call fielddump

    call statsdump

    call boundary

    !call fixthetainf ! deprecated

!-----------------------------------------------------
!   3.6   LIQUID WATER CONTENT AND DIAGNOSTIC FIELDS
!-----------------------------------------------------
    call thermodynamics

!-----------------------------------------------------
!   3.7  WRITE RESTARTFILES AND DO STATISTICS
!------------------------------------------------------

    call writerestartfiles

  end do
!-------------------------------------------------------
!             END OF TIME LOOP
!-------------------------------------------------------

!--------------------------------------------------------
!    4    FINALIZE ADD ONS AND THE MAIN PROGRAM
!-------------------------------------------------------
  call exitfielddump
  call exitstatsdump     !tg3315
  !call exitmodules
  !call exittest
  call exitmpi

end program DALESURBAN