<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0"><?xmltex \makeatother\@nolinetrue\makeatletter?>
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-14-3095-2021</article-id><title-group><article-title>Radiative Transfer Model 3.0 integrated into the <?xmltex \hack{\break}?>PALM model system 6.0</article-title><alt-title>RTM 3.0 integrated into PALM 6.0</alt-title>
      </title-group><?xmltex \runningtitle{RTM 3.0 integrated into PALM 6.0}?><?xmltex \runningauthor{P. Kr\v{c} et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1">
          <name><surname>Krč</surname><given-names>Pavel</given-names></name>
          <email>krc@cs.cas.cz</email>
        <ext-link>https://orcid.org/0000-0001-7710-712X</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Resler</surname><given-names>Jaroslav</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-3847-7624</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Sühring</surname><given-names>Matthias</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Schubert</surname><given-names>Sebastian</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-5683-3894</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3 aff4">
          <name><surname>Salim</surname><given-names>Mohamed H.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-7838-6124</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff5">
          <name><surname>Fuka</surname><given-names>Vladimír</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>Institute of Computer Science, Czech Academy of Sciences, Prague, Czech Republic</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Institute of Meteorology and Climatology, Leibniz University Hannover, Hanover,  Germany</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Geography Department, Humboldt-Universität zu Berlin, Berlin, Germany</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Faculty of Energy Engineering, Aswan University, Aswan, Egypt</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Pavel Krč (krc@cs.cas.cz)</corresp></author-notes><pub-date><day>31</day><month>May</month><year>2021</year></pub-date>
      
      <volume>14</volume>
      <issue>5</issue>
      <fpage>3095</fpage><lpage>3120</lpage>
      <history>
        <date date-type="received"><day>27</day><month>May</month><year>2020</year></date>
           <date date-type="rev-request"><day>2</day><month>July</month><year>2020</year></date>
           <date date-type="rev-recd"><day>10</day><month>March</month><year>2021</year></date>
           <date date-type="accepted"><day>29</day><month>March</month><year>2021</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2021 Pavel Krč et al.</copyright-statement>
        <copyright-year>2021</copyright-year>
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021.html">This article is available from https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021.pdf</self-uri>
      <abstract><title>Abstract</title>
    <p id="d1e156">The Radiative Transfer Model (RTM) is an explicitly resolved three-dimensional multi-reflection radiation model integrated into the PALM modelling system. It is responsible for modelling complex radiative interactions within the urban canopy. It represents a key component in modelling energy transfer inside the urban layer and consequently PALM's ability to provide explicit simulations of the urban canopy at metre-scale resolution. This paper presents RTM version 3.0, which is integrated into the PALM modelling system version 6.0. This version of RTM has been substantially improved over previous versions. A more realistic representation is enabled by the newly simulated processes, e.g. the interaction of longwave radiation with the plant canopy, evapotranspiration and latent heat flux, calculation of mean radiant temperature, and bidirectional interaction with the radiation forcing model. The new version also features novel discretization schemes and algorithms, namely the angular discretization and the azimuthal ray tracing, which offer significantly improved scalability and computational efficiency, enabling larger parallel simulations. It has been successfully tested on a realistic urban scenario with a horizontal size of over 6 million grid points using 8192 parallel processes.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

      <?xmltex \hack{\newpage}?>
<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
<sec id="Ch1.S1.SS1">
  <label>1.1</label><title>Overview of current solutions</title>
      <p id="d1e177">Accurate representation of spatio-temporal radiative exchange processes is essential for realistic modelling of the atmospheric boundary layer, especially with the urban boundary layer. These processes determine the energy budget of the surfaces and thus strongly affect boundary-layer dynamics as well as the spatio-temporal distribution of temperature, moisture and other scalar variables. In contrast to synoptic-scale and mesoscale atmospheric models, microscale and building-resolving models encounter considerable challenges to accurately model such processes due to their fine spatial resolution and the heterogeneity of urban environments.</p>
      <?pagebreak page3096?><p id="d1e180">Many urbanized mesoscale models consider the vertical and horizontal radiative exchange within the urban canopy layer, including shading and multiple reflections, by assuming a strongly simplified urban surface structure <xref ref-type="bibr" rid="bib1.bibx12" id="paren.1"/>. Urban surfaces are typically oriented in a quasi-two-dimensional street canyon <xref ref-type="bibr" rid="bib1.bibx29 bib1.bibx22 bib1.bibx28 bib1.bibx24 bib1.bibx37 bib1.bibx30" id="paren.2"><named-content content-type="pre">e.g.</named-content></xref> or regularly spaced single buildings of equal size <xref ref-type="bibr" rid="bib1.bibx18" id="paren.3"><named-content content-type="pre">e.g.</named-content></xref>. On the building-resolving microscale, such simplifications are not possible, and the complex shapes of obstacles (e.g. buildings, terrain or vegetation) need to be resolved. This, however, increases the complexity of the numerical solution and creates difficulties with respect to parallelization strategies via horizontal domain decomposition, which is commonly applied in atmospheric models <xref ref-type="bibr" rid="bib1.bibx41" id="paren.4"/>, as the direct horizontal exchange is no longer limited to neighbouring subdomains.</p>
      <p id="d1e199">Consequently, the method and the sophistication of modelling the radiative exchange within the urban boundary layer vary in microscale atmospheric models (<xref ref-type="bibr" rid="bib1.bibx20 bib1.bibx16 bib1.bibx15 bib1.bibx9 bib1.bibx13 bib1.bibx7 bib1.bibx44 bib1.bibx19 bib1.bibx35" id="altparen.5"/>; more recently<fn id="Ch1.Footn1"><p id="d1e205">After the original submission of this paper.</p></fn> <xref ref-type="bibr" rid="bib1.bibx17" id="altparen.6"/>, and <xref ref-type="bibr" rid="bib1.bibx23" id="altparen.7"/>).
They range from applying a simple parameterization of radiative transfer, or even neglecting these processes altogether, to more explicit methods of radiative modelling.</p>
      <p id="d1e215">However, some of the microscale models with more explicit radiative modelling have limitations in simulating realistic urban domains. For example, some models use only the Reynolds-averaged Navier–Stokes (RANS) method for simulating the airflow, which is not always suitable for the geometrically complex and highly heterogeneous urban environments. Also, some of the mentioned models are not suitably designed and parallelized to work on high-performance supercomputers (HPCs) with hundreds or thousands of CPU cores, which makes the design and implementation of the explicit 3-D radiative exchange easier, but it severely limits the size and resolution of the modelled domains.</p>
      <p id="d1e219">The RTM version 1.0 <xref ref-type="bibr" rid="bib1.bibx33" id="paren.8"/> was created in order to provide an open-source, HPC-enabled, fully 3-D model of radiative interactions inside the urban canopy integrated into an urban climate model based on the large-eddy simulation (LES) method. Version 3.0 described in this paper provides substantial improvement over version 1.0 by including a wider selection of simulated processes for better representativity. It also features a new method of discretization and improved algorithms as well as technical implementation for enhanced scalability and computational efficiency.</p>
</sec>
<sec id="Ch1.S1.SS2">
  <label>1.2</label><title>RTM role within the PALM model</title>
      <p id="d1e233">Radiation processes are traditionally modelled in PALM by a one-dimensional radiation model with simulation of vertical radiation exchange without any lateral interactions <xref ref-type="bibr" rid="bib1.bibx26" id="paren.9"/>. The particular type of  radiation model can be selected and configured based on the requirements of the modelled scenario. The Rapid Radiative Transfer Model for Global models <xref ref-type="bibr" rid="bib1.bibx4" id="paren.10"><named-content content-type="pre">RRTMG; see</named-content></xref> is available in addition to a simpler clear-sky model <xref ref-type="bibr" rid="bib1.bibx27" id="paren.11"/>. Alternatively, users can prescribe a constant net radiation at the surfaces or use an external radiation input, such as observation data or a meteorological model output, for a better representation of cloud cover.</p>
      <p id="d1e247">This one-column approach, however, is not sufficient to model the surface energy balance inside the urban canopy layer. This area is typically characterized by complex geometry of terrain, buildings and vegetation, for which the radiative transfer processes in all directions cannot be neglected. Therefore, the PALM modelling system includes the Radiative Transfer Model (RTM) as part of PALM-4U (PALM components for urban modelling). This model takes the radiation from the PALM radiation model, e.g. RRTMG, as input and calculates the radiation processes taking place inside the urban canopy layer explicitly in a fully 3-D geometry. Through this, RTM provides the radiative fluxes and the surface net radiation including its components on the 3-D geometry, which are then used to model the surface energy balance, evapotranspiration in the plant canopy, and biometeorological quantities (see Sect. <xref ref-type="sec" rid="Ch1.S4"/>).</p>
      <p id="d1e252">The main goals of the RTM development were to create a computationally efficient model which simulates all substantial radiative processes taking place inside the urban canopy and which is fully integrated with the rest of the PALM model and its components, in particular
<list list-type="bullet"><list-item>
      <p id="d1e257">the spatial discretization of the domain matches the discretization of other parts of the PALM model;</p></list-item><list-item>
      <p id="d1e261">RTM is executed as part of the PALM programme, and it utilizes its parallelization scheme; and</p></list-item><list-item>
      <p id="d1e265">RTM utilizes PALM data structures and subroutines as much as possible and provides its results directly back to PALM and its modules.</p></list-item></list></p>
</sec>
<sec id="Ch1.S1.SS3">
  <label>1.3</label><title>Changes since RTM version 1.0</title>
      <p id="d1e276">The paper describes version 3.0 of RTM, which is part of PALM version 6.0. This paper is a follow-up paper to <xref ref-type="bibr" rid="bib1.bibx33" id="text.12"/>, which describes RTM version 1.0 as part of the Urban Surface Model version 1.0 (PALM-USM) integrated into PALM version 4.0.</p>
      <p id="d1e282">RTM version 1.0, as part of the PALM-USM module, has been evaluated with respect to performance and accuracy on a small urban scenario in Prague–Holešovice <xref ref-type="bibr" rid="bib1.bibx33" id="paren.13"/>. The most important changes between RTM 1.0 and RTM 3.0 include the following.
<list list-type="bullet"><list-item>
      <p id="d1e290">New discretization schemes for direct solar irradiance and for the sky view, which includes diffuse solar irradiance, longwave irradiance from the sky and reflection as well as emissions from surfaces towards the sky (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS3"/>).</p></list-item><list-item>
      <p id="d1e296">A new discretization scheme for the reflected and emitted radiation between surfaces (Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS4"/>).</p></list-item><list-item>
      <p id="d1e302">The novel azimuthal ray-tracing algorithm (Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>).</p></list-item><list-item>
      <p id="d1e308">Plant canopy interaction with LW radiation (absorption and emission, Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS2"/>).</p></list-item><list-item>
      <p id="d1e314">Evapotranspiration and latent heat flux in the plant canopy (Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/>).</p></list-item><list-item>
      <p id="d1e320">Bidirectional integration with the radiation forcing model (e.g. RRTMG, Sect. <xref ref-type="sec" rid="Ch1.S4.SS1"/>).</p></list-item><list-item>
      <p id="d1e326">Calculation of mean radiant temperature for selected levels aboveground with provision of radiant fluxes for the biometeorology module (Sect. <xref ref-type="sec" rid="Ch1.S2.SS5"/>).</p></list-item><list-item>
      <p id="d1e332">Integration of RTM within the PALM radiation module and coupling to all surface modules (Sect. <xref ref-type="sec" rid="Ch1.S4.SS2"/>).</p></list-item><list-item>
      <p id="d1e338">Multiple improvements, bug fixes and changes in interfaces with other PALM modules.</p></list-item></list></p>
      <p id="d1e341">In order to quantify the differences brought by the new simulated processes and improved discretization schemes, a comparison study has been performed on the same scenario using PALM version 6.0 with RTM 3.0 with different sets of newly available simulated processes enabled. The results of this comparison are available in <xref ref-type="bibr" rid="bib1.bibx21" id="text.14"/>.</p>
      <p id="d1e347">The paper is organized as follows: Section <xref ref-type="sec" rid="Ch1.S2"/> describes the numerical approaches used in the RTM to consider the relevant physical radiation processes, while Sect. <xref ref-type="sec" rid="Ch1.S3"/> describes the implementation of the RTM in PALM. Section <xref ref-type="sec" rid="Ch1.S4"/> gives an overview of how the RTM interconnects with other PALM modules. An evaluation of the RTM and a discussion of computational performance issues are presented in Sect. <xref ref-type="sec" rid="Ch1.S5"/>. Finally, Section <xref ref-type="sec" rid="Ch1.S6"/> closes with a summary and ideas for further developments.</p>
</sec>
</sec>
<?pagebreak page3097?><sec id="Ch1.S2">
  <label>2</label><title>Numerical representation of radiative processes in RTM</title>
      <p id="d1e369">The PALM model discretizes the modelled domain using a regular three-dimensional grid. The model supports arbitrary rotation of the grid around the vertical axis, with the default having the <inline-formula><mml:math id="M1" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> dimension representing the east–west axis in the eastward direction and the <inline-formula><mml:math id="M2" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> dimension representing the south–north axis in the northward direction. The <inline-formula><mml:math id="M3" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula> dimension always represents the vertical axis in the upward direction. Considering that the modelled domains are relatively small within the order of kilometres, PALM uses an <inline-formula><mml:math id="M4" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula>-plane approximation (constant Coriolis parameters within the model domain) with equidistant horizontal grid spacing rather than any spherical or ellipsoid geodetic projection.</p>
      <p id="d1e400">The <inline-formula><mml:math id="M5" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M6" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> dimensions of the PALM grid are equidistant, so the grid is always regular, although the resolution of the <inline-formula><mml:math id="M7" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M8" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> dimensions may differ. The vertical axis may employ progressive <italic>stretching</italic>, which should only be applied well above the boundary layer; otherwise, a bias could be introduced to the vertical turbulent transport. Also, the RTM requires an equidistant grid inside the urban layer in which it operates.</p>
      <p id="d1e434">For each horizontal coordinate <inline-formula><mml:math id="M9" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, PALM specifies a terrain height, which is discretized according to the vertical grid spacing, meaning that each grid box is either completely above or below the surface. When representing urban areas, the obstacles include any permanent solid objects, e.g. buildings or terrain unevenness, while trees, shrubs and other resolved plant volumes are modelled separately as the <italic>plant canopy</italic>. Terrain and buildings in RTM are currently limited to a so-called 2.5-D geometry, which is able to represent radiative processes at upward-facing and horizontally facing surfaces and thus covers the majority of natural and large urban objects. Although PALM is also able to represent downward-oriented surfaces, e.g. bridges or overhanging parts of buildings for which its effect on the flow field is considered, RTM version 3.0 does not consider them in radiative interactions yet.<fn id="Ch1.Footn2"><p id="d1e456">This limitation was present at the time of the original submission of this paper, but since then the fully 3-D geometry has been implemented in RTM version 4.1 starting from r4671; <uri>http://palm-model.org/trac/changeset/4671</uri> (last access: 27 May 2021).</p></fn> The model grid divides the 2.5-D surface geometry into individual surface grid elements, which are referred to as <italic>faces</italic>. The 2.5-D geometry is plane-parallel, so a face can be oriented northward, southward, westward, eastward or upward.</p>
      <p id="d1e466">The RTM considers two spectral ranges of electromagnetic radiation independently: shortwave (SW) visible solar radiation and longwave (LW) thermal radiation. The modelled radiation originates from the sun, the atmosphere and all the modelled surfaces. The result of RTM is the amount of absorbed, reflected and emitted radiation for every face (both horizontal and vertical) and the amount of absorbed and emitted radiation for each grid box containing resolved plant canopy (plant canopy grid box, PCGB). The model follows the radiation as it spreads from sources and as it propagates through the urban canopy layer and reflects off individual faces, taking into account  model geometry, shading and mutual visibility between the faces, partial transparency and/or opacity of the plant canopy, and reflective properties of the individual faces. Figure <xref ref-type="fig" rid="Ch1.F1"/> gives an overview of the simulated processes. The detailed study of the contribution of the particular processes to the total simulated radiative fluxes is described in <xref ref-type="bibr" rid="bib1.bibx36" id="text.15"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Figure}?><label>Figure 1</label><caption><p id="d1e477">Radiative processes simulated by RTM version 3.0.</p></caption>
        <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f01.png"/>

      </fig>

      <p id="d1e486">To limit the computational effort to a reasonable level, some less important processes have to be simplified or disregarded. These are the following.
<list list-type="bullet"><list-item>
      <?pagebreak page3098?><p id="d1e491"><italic>Finite number of reflections.</italic> The model simulates a configured number of reflections, after which the residual radiation is considered to be fully absorbed by the respective face it hits. This amount of radiation absorbed after the last reflection is also available among the model outputs, allowing the model to be configured with an appropriate number of reflections so that the remaining amount is negligible. Depending on surface properties and model geometry, between three and five reflections are usually suitable for real-world urban scenarios (see Sect. <xref ref-type="sec" rid="Ch1.S5.SS3"/>). While <xref ref-type="bibr" rid="bib1.bibx44" id="text.16"/> consider an infinite number of reflections in their scheme by calculating the Gebhart factor <xref ref-type="bibr" rid="bib1.bibx10" id="paren.17"/>, they propose  limiting this number to greatly reduce the computational demand.</p></list-item><list-item>
      <p id="d1e505"><italic>Diffuse reflection only.</italic> The current version of the model only supports diffuse (non-directional) reflection; specifically, all surfaces are considered Lambertian reflectors. Modelling specular reflection is planned for later versions of the model to better simulate glass and polished surfaces, which are also present among typical urban surfaces. However, in order to simulate correct angles of reflection from surfaces that are not grid-aligned, this feature depends on the addition of arbitrarily oriented faces to PALM. Arbitrarily oriented faces are planned for the next major revision of PALM (see Sect. 6, Outlook).</p></list-item><list-item>
      <p id="d1e511"><italic>Fully transparent air.</italic> Neither absorption, scattering, nor thermal emission by air mass is modelled inside RTM, considering rather short ray paths in the urban canopy layer. In particular for fog, dense smog or heavy precipitation events, this may become relevant, making RTM less suitable for simulating such scenarios. However, RTM only concerns the urban layer. If RRTMG is configured as the radiation model in PALM, it simulates the air mass interaction for the full height of the PALM domain within a one-dimensional framework.</p></list-item><list-item>
      <p id="d1e517"><italic>Selected processes of plant canopy interaction.</italic> Modelling of plant canopy within RTM focuses mainly on its effects on other surfaces and on overall energy balance. In order to reduce computational complexity, it simplifies or disregards some processes which are more relevant to fluxes within the plant canopy itself: reflection from the plant canopy and internal interactions (emission and absorption among adjacent PCGBs). The reasons and impacts are discussed in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/> and internal interactions specifically in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS2"/>.</p></list-item><list-item>
      <p id="d1e527"><italic>Zero thermal capacity of plant leaves.</italic> Typical plant leaves are thin and lightweight, having a very small thermal capacity with respect to their surface area. This leads to rapid equalization of their temperature with the temperature of the surrounding air via sensible and latent heat flux. In RTM, the simulated thermal capacity of plant leaves is zero and their temperature is identical to that of the surrounding air. This means that the plant canopy heat flux (net radiative flux and also latent heat flux provided by the plant transpiration model; see Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/>) is directly applied to the air mass. This approach is common in the field of atmospheric modelling <xref ref-type="bibr" rid="bib1.bibx5" id="paren.18"><named-content content-type="pre">see e.g.</named-content></xref>. Furthermore, <xref ref-type="bibr" rid="bib1.bibx40" id="text.19"/> showed that for nonforested locations with low biomass amounts their parameterization of biomass heat storage provides similar results as simulations that lack a representation of vegetation heat storage.</p></list-item></list></p>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>Representing radiative interactions using view factors</title>
      <p id="d1e549">The discretization of RTM uses the same Cartesian grid as the rest of the PALM model. Each radiative quantity is modelled as a singular value per surface discretization unit (face), and the propagation of radiation is described as interactions between mutually visible faces.</p>
      <p id="d1e552">The model considers all reflections and emissions to be Lambertian (i.e. ideally diffuse), following Lambert's cosine law whereby the amount of radiation leaving the surface in one direction is proportional to the cosine of the angle <inline-formula><mml:math id="M10" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> between that direction and the surface normal. The interaction between faces can therefore be described similarly for reflection and for thermal emission.</p>
      <p id="d1e562">For any two mutually visible faces <inline-formula><mml:math id="M11" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M12" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, the view factor (VF) <inline-formula><mml:math id="M13" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the fraction between the radiant flux originating from face <inline-formula><mml:math id="M14" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> that strikes face <inline-formula><mml:math id="M15" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> and the total radiant flux leaving face <inline-formula><mml:math id="M16" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx14 bib1.bibx38" id="paren.20"><named-content content-type="pre">e.g.</named-content></xref>. In an enclosed system in which all radiative transfer happens between faces <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula>, the energy is conserved and the sum of all view factors from each particular face <inline-formula><mml:math id="M18" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> equals 1:
            <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M19" display="block"><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Figure}?><label>Figure 2</label><caption><p id="d1e681">Calculation of the view factor between surface <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> by integrating over <inline-formula><mml:math id="M22" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M24" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> are the respective normal vectors of the surface elements <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula>, which are <inline-formula><mml:math id="M28" display="inline"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> apart.</p></caption>
          <?xmltex \igopts{width=128.037402pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f02.png"/>

        </fig>

      <?pagebreak page3099?><p id="d1e815">The value of <inline-formula><mml:math id="M29" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is calculated by integrating over the areas <inline-formula><mml:math id="M30" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M31" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> (see Fig. <xref ref-type="fig" rid="Ch1.F2"/>):
            <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M32" display="block"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:munder><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          Here, <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the distance between the surface elements <inline-formula><mml:math id="M34" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M35" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula>. <inline-formula><mml:math id="M36" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M37" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> are the angles between the normal vectors of the respective surface element and their connection. Note that the integral is symmetrical for faces <inline-formula><mml:math id="M38" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M39" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, which leads to the reciprocity property <inline-formula><mml:math id="M40" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>.
Applying that to Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>), we get for each target face <inline-formula><mml:math id="M41" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>
            <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M42" display="block"><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e1162">This formula allows for the description of the face <inline-formula><mml:math id="M43" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, now being considered the target for incoming radiation, as an observer whose field of view is a sum of portions. Each portion <inline-formula><mml:math id="M44" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:math></inline-formula> represents the view in the direction of a specific source face <inline-formula><mml:math id="M45" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, while the size of that portion takes into account the respective solid angle and the cosine law. The fraction <inline-formula><mml:math id="M46" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:math></inline-formula> is further called the irradiance factor <inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula> because it can be used to calculate the total irradiance <inline-formula><mml:math id="M48" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of face <inline-formula><mml:math id="M49" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> using known radiosities of other faces and the irradiance factor values, which are equal to view factor values in the opposite direction:
            <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M50" display="block"><mml:mtable class="split" columnspacing="1em" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi>E</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>m</mml:mi><mml:mi>J</mml:mi></mml:msubsup><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:msub><mml:mi>J</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:msub><mml:mi>J</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          where <inline-formula><mml:math id="M51" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi>E</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the total radiant flux received by the target face <inline-formula><mml:math id="M52" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M53" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>m</mml:mi><mml:mi>J</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the radiant flux leaving the source face <inline-formula><mml:math id="M54" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:msub><mml:mi>J</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the radiosity of the face <inline-formula><mml:math id="M56" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>. It can be seen that the irradiance of face <inline-formula><mml:math id="M57" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> is the weighted average of radiosities of other faces for which the weights are equal to the irradiance factors.</p>
<sec id="Ch1.S2.SS1.SSSx1" specific-use="unnumbered">
  <title>Precalculated view factor values</title>
      <p id="d1e1492">The view factor values carry all the information about the geometry of the urban layer necessary for calculating propagation of reflected and emitted light among surfaces. Once they are known, calculation of the instantaneous fluxes can be reduced to simple vector multiplication. Determining the view factor values consists of multiple steps.
<list list-type="order"><list-item>
      <p id="d1e1497"><italic>Establishing mutual orientation and position</italic>. In the rectangular grid, this is a matter of performing multiple coordinate comparisons to find out whether, for each face, the other face lies in the half-space above the plane of the first face, i.e. whether its angle <inline-formula><mml:math id="M58" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> is less than <inline-formula><mml:math id="M59" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="italic">π</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:math></inline-formula>.</p></list-item><list-item>
      <p id="d1e1521"><italic>Determining obstacles on the ray path between the faces</italic>. The obstacles may be fully opaque (terrain, buildings) or partially transparent, in which case a fraction of the radiant flux between the faces is absorbed. In RTM, the only partially transparent obstacle is the grid-resolved plant canopy, which is represented as a 3-D field of leaf area density (LAD). The fraction of the radiant flux allowed to pass through the obstacle and the radiant flux carried by the ray upon striking the obstacle is called <italic>transmittance</italic>. For the plant canopy, it depends on the length of the ray's intersection with the respective PCGB, the LAD value at that PCGB and the extinction coefficient.</p></list-item><list-item>
      <p id="d1e1530"><italic>Calculating the actual view factor value</italic>. Although the exact value for two rectangular faces could be solved as a quadruple integral for each point of each of the faces as in Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>), RTM uses simplifications in order to avoid the exact calculation. Details and reasoning are presented below in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2"/>.</p></list-item></list></p>
      <p id="d1e1539">The second step is implemented in RTM using a <italic>ray-tracing</italic>
algorithm. This process is computationally complex, as it performs calculations involving each grid box that each traced ray intersects, and it can also cause very high demands on the interprocess communication (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/> and <xref ref-type="sec" rid="Ch1.S2.SS2.SSS6"/>). In PALM, each parallel process is responsible for modelling a horizontally divided subdomain within the modelled domain, and most of the data stored locally are limited to the extent of the subdomain. Depending on the provided interconnecting infrastructure and the Message-Passing Interface (MPI) implementation,  access to the values in other subdomains carried by MPI interprocess communication may be significantly slower than similar local memory access. Depending on the domain size and geometry, each traced ray may cross many subdomains. The complexity of this processing is further examined in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/> and <xref ref-type="sec" rid="Ch1.S2.SS2.SSS6"/>.</p>
      <p id="d1e1553">Due to this complexity, the ray-tracing task takes place during the model initialization phase before the actual simulation of time steps begins. The values representing the view factors and other relevant data are precomputed, exchanged among the parallel processes and stored in such a way that the number of calculations and MPI communications performed during computation of time steps is minimized.</p>
</sec>
</sec>
<?pagebreak page3100?><sec id="Ch1.S2.SS2">
  <label>2.2</label><title>Discretization of the view in RTM</title>
      <p id="d1e1565">RTM version 3.0 offers two selectable methods for simulation of the irradiance of each face by providing two different schemes for discretization of the view from each face, which is represented by a set of irradiance factors. The legacy discretization scheme (originally introduced in RTM version 1.0; see <xref ref-type="bibr" rid="bib1.bibx33" id="altparen.21"/>) simulates the view from each target face as a set of irradiance factors from the centre of each face that is visible from the target face's centre. This leads to the requirement of performing ray tracing between each pair of mutually visible faces and to the worst-case complexity of <inline-formula><mml:math id="M60" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> with respect to domain size, as is described later in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/>. Simulating radiative interactions using a set of view factors among discretized surfaces is an established technique. More specifically, using surfaces discretized by a regular grid can be found in e.g. <xref ref-type="bibr" rid="bib1.bibx20" id="text.22"/>.</p>
      <p id="d1e1593">The current angular discretization scheme uses a different simplification with a better trade-off between complexity and accuracy and a guaranteed worst-case total number of view factors of <inline-formula><mml:math id="M61" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS6"/>). It also uses a newly developed 2-D ray-tracing algorithm which is optimized with respect to CPU time, memory consumption and MPI interprocess communication by utilizing the geometric properties of the discretization scheme. This is a novel technique, and we have not found any reference to using angular discretization for view factors among surfaces. Also, the technique of 2-D ray tracing, which performs ray tracing for whole vertical columns by taking advantage of the specific data representation and parallelization scheme of the model, is novel.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Figure}?><label>Figure 3</label><caption><p id="d1e1617">Illustration of the legacy view discretization scheme. For the highlighted face, ray tracing is performed between its centre and the centres of its visible faces, creating a set of its view factors.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f03.png"/>

        </fig>

<sec id="Ch1.S2.SS2.SSS1">
  <label>2.2.1</label><title>Legacy discretization of the view</title>
      <p id="d1e1634">While establishing the mutual visibility between two faces, the path between the faces is represented by a single ray connecting their centres. This is in accordance with the general principle of discretization by a rectangular grid, on which the area or volume covered by each face or grid box is represented by a single scalar value and  the resolution can be increased for more spatial precision at the expense of computational resources (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/> and a related case study in Sect. <xref ref-type="sec" rid="Ch1.S5.SS1"/>). This way only one ray needs to be traced for every two faces oriented towards each other, and mutual visibility (absence of shading by an intermediate solid obstacle, i.e. building or terrain) becomes a binary relation. In reality, however, any face may be illuminated only on part of its area, and each target point illuminated by a non-point light source may lie in the penumbra of an obstacle. For the purpose of calculating the radiant flux absorbed by semi-opaque objects, it is assumed that the single ray between face centres carries the whole radiant flux leaving the source face towards the target face.</p>
      <p id="d1e1641">Together with simplifying the ray tracing, the view factor value calculation is also simplified. Instead of solving the full integral in Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>), the value of the integrand at the centres <inline-formula><mml:math id="M62" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M63" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of faces <inline-formula><mml:math id="M64" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M65" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, respectively, is used to estimate the full integral. With this, the approximate view factor <inline-formula><mml:math id="M66" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>→</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is given by
              <disp-formula id="Ch1.E5" content-type="numbered"><label>5</label><mml:math id="M67" display="block"><mml:mtable rowspacing="0.2ex" class="split" columnspacing="1em" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>≈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e1889">The induced error is smaller for very distant faces and larger for faces close to each other. This error is considered acceptable within the resolution of the model, as it can always be reduced by increasing the resolution. The more important issue of this approach is that the sum of the approximate view factor values is no longer guaranteed to equal 1. Because of this, the modelled system could artificially gain or lose energy and possibly even diverge exponentially in time. To guarantee the conservation of energy, the normalization of the approximate view factor values is used in order to maintain Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>), and the normalized view factor <inline-formula><mml:math id="M68" display="inline"><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:math></inline-formula> is thus calculated by
              <disp-formula id="Ch1.E6" content-type="numbered"><label>6</label><mml:math id="M69" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo mathvariant="normal" stretchy="false">̃</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mrow><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi>A</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<?pagebreak page3101?><sec id="Ch1.S2.SS2.SSS2">
  <label>2.2.2</label><title>Computational complexity of the legacy discretization</title>
      <p id="d1e2007">The asymptotic complexity and scalability of the RTM can be evaluated using two different approaches: considering either a domain growing in size horizontally, while the vertical size and typical shapes of obstacles are kept constant, or considering a gradually increasing resolution for the same domain, which increases the amount of discretized data in each dimension.</p>
      <p id="d1e2010">The complexity and scalability for the latter case can be determined exactly. The number of faces increases proportionally with the surface area. For a domain with a size of <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:mi>i</mml:mi><mml:mo>×</mml:mo><mml:mi>j</mml:mi><mml:mo>×</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:math></inline-formula> grid cells for which the resolution is increased by a factor <inline-formula><mml:math id="M71" display="inline"><mml:mi mathvariant="italic">φ</mml:mi></mml:math></inline-formula> to <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:mi mathvariant="italic">φ</mml:mi><mml:mi>i</mml:mi><mml:mo>×</mml:mo><mml:mi mathvariant="italic">φ</mml:mi><mml:mi>j</mml:mi><mml:mo>×</mml:mo><mml:mi mathvariant="italic">φ</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:math></inline-formula> grid cells, the number of faces grows exactly by <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> (because surfaces are two-dimensional) and the number of other faces, to which each face has direct visibility, also grows by <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>. Therefore, the number of view factors grows by <inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>. The separation distance in terms of the number of grid boxes between each pair of mutually visible faces, which determines the time needed to perform the ray tracing for such a ray, grows by <inline-formula><mml:math id="M76" display="inline"><mml:mi mathvariant="italic">φ</mml:mi></mml:math></inline-formula>; therefore, the total ray-tracing time grows by <inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e2110">In order to analyse the scalability of the algorithm, assume that the number of processes used for the calculation grows by the same factor as the size of the 3-D grid, i.e. by <inline-formula><mml:math id="M78" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>. In this situation, the computational demands of each process grow by <inline-formula><mml:math id="M79" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, and the proportion of interprocess MPI data exchange relative to the process local memory access also increases in both the ray-tracing and the time-stepping part of RTM, so the process does not scale well.</p>
      <p id="d1e2135">The situation is better in the first case in which the domain of size <inline-formula><mml:math id="M80" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>×</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula> grid points grows horizontally, and the average terrain height does not change. For typical terrain and building profiles, the average distance of the visible horizon does not increase with the horizontal scaling, or it increases much less than linearly. That also means that the average number of other faces, to which each face has direct visibility, does not increase significantly. This property also helps to keep the computation more localized for parallelism. However, these assumptions are valid for a typical scenario only, while the worst-case complexity is still of the order of <inline-formula><mml:math id="M81" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:mi>n</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for ray-tracing distance and <inline-formula><mml:math id="M82" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi>n</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for the total computational demands of ray tracing.</p>
</sec>
<sec id="Ch1.S2.SS2.SSS3">
  <label>2.2.3</label><title>Reducing the number of view factors in the legacy discretization</title>
      <p id="d1e2189">To reduce the high number of view factors with the legacy discretization scheme, RTM allows for the exclusion of some view factors that are considered less important. First, a minimum value <inline-formula><mml:math id="M83" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">min</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of the irradiance factor can be specified. When faces <inline-formula><mml:math id="M84" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M85" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> are mutually visible but the source face <inline-formula><mml:math id="M86" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> occupies so small a portion of the view from the target face <inline-formula><mml:math id="M87" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> that the value of the irradiance factor <inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is less than <inline-formula><mml:math id="M89" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">min</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, then this irradiance factor is disregarded. Thanks to the fact that the potential value of the irradiance factor <inline-formula><mml:math id="M90" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:math></inline-formula> can be established even before the ray tracing from face <inline-formula><mml:math id="M91" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> to face <inline-formula><mml:math id="M92" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> begins, the ray tracing is skipped altogether for such face pairs. In addition to the minimum irradiance factor value, a maximum ray-tracing distance <inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="normal">max</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> can also be specified. This limit avoids starting the computationally intensive ray-tracing routine for such face pairs for which the mutual distance is above the limit.</p>
      <p id="d1e2348">The normalization described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS1"/> ensures that the remaining irradiance factors are increased accordingly in order to maintain energy conservation by the condition
              <disp-formula id="Ch1.E7" content-type="numbered"><label>7</label><mml:math id="M94" display="block"><mml:mrow><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msubsup><mml:mi>F</mml:mi><mml:mi>j</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mrow><mml:mi>m</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the normalized irradiance factor from face <inline-formula><mml:math id="M96" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M97" display="inline"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mi>j</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is the sky-view factor representing the view towards the sky (described later in Sect. <xref ref-type="sec" rid="Ch1.S2.SS3"/>). Both <inline-formula><mml:math id="M98" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">min</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M99" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="normal">max</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> have to be chosen carefully considering the geometry of the modelled domain so that the impact on radiative energy balance in the model is not too high.</p>
</sec>
<sec id="Ch1.S2.SS2.SSS4">
  <label>2.2.4</label><title>Angular discretization of the view</title>
      <p id="d1e2485">The asymptotic complexity of the legacy scheme does not allow simulations of very large domains with horizontal sizes of the order of millions of grid boxes or more. Furthermore, if the view from some face is composed of both very close and very distant faces, the computational resources are used unevenly: proportionally fewer resources are spent on close faces, each of which represents a higher share of the face's view and also a potentially greater share of its irradiance, while more resources, often a majority, are spent on less relevant distant faces. Neglecting the smaller view factors as described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS3"/> and normalizing the result also represent a possible way to combat this disproportion. This approach, however, has to be used carefully because it can significantly alter the ratio between a face's irradiance from close and distant surfaces, which could introduce a systematic bias in radiant fluxes coming from the close and distant surfaces.</p>
      <p id="d1e2490">Thus, we introduce a novel angular discretization scheme for reflected and emitted radiation. The general motivation for this approach is based on the observation that the properties of most surfaces are smooth in space, and thus two faces next to each other tend to have similar properties and radiate similarly more often than two generic unrelated faces. This consideration leads to the idea of representing a target face's irradiation from multiple neighbouring distant faces by a single view factor that uses the radiation from one of them, but its view factor value represents all of them. This approach allows for the use of the computational resources more efficiently.</p>
      <?pagebreak page3102?><p id="d1e2493">The angular discretization scheme divides the view from each face into a fixed number of directions specified by uniformly distributed azimuth and elevation angles, as opposed to the uneven set of directions towards the centres of every other visible face in the legacy discretization scheme. Ray tracing is performed towards this fixed set of directions with considerable optimization due to the fact that multiple rays of this set share an identical horizontal direction (i.e. azimuth; see Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>). For each ray, the face that covers the first detected obstacle (terrain or building) is used to create a view factor entry. Its view factor value represents exactly the portion of the view corresponding to its direction segment (the section of azimuths and elevations instead of being determined by the other face's size and position). Figure <xref ref-type="fig" rid="Ch1.F4"/> depicts the geometry of the discretization and also demonstrates the Nusselt analogue, which can be used to visualize the relative sizes of the view factor values.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Figure}?><label>Figure 4</label><caption><p id="d1e2503">A 3-D representation of the angular discretization scheme for a horizontal face <bold>(a, c)</bold> and a vertical  face <bold>(b, d)</bold>. The top panels depict a view from the centre of a horizontal and a vertical face; the view has been divided regularly by a fixed number of azimuth and zenith angles, as shown by the half-spheres. The green arrow indicates the traced ray representing the selected angular section, which passes through the centre of that section. The bottom row demonstrates the Nusselt analogue, whereby the area of each angular section's intersection with the half-sphere, as projected in the orthographic projection to the face's plane (solid red area), is directly proportional to the corresponding view factor value as a portion of the whole view. From the relative sizes of the projected areas it is clear that the view is less uniformly divided for the vertical faces, yet the unified discretization has computational benefits.</p></caption>
            <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f04.png"/>

          </fig>

      <p id="d1e2518">This approach is equivalent to the ray-tracing algorithm used in computer graphics; the only difference is that the ray directions in computer graphics correspond to individual pixels of the simulated camera's sensor
and often some super-sampling is used for anti-aliasing. This similarity demonstrates that the result of this ray-tracing arrangement represents a reasonable simplification of view from the selected target and
also that the accuracy can be improved as needed by increasing
the angular resolution, i.e. the number of discretized azimuth and elevation angles.</p>
      <p id="d1e2521">An additional benefit of the angular discretization is the fact that the view factor values, if calculated analytically, always add up exactly to 1 and there is no need for normalization. A single face often represents an obstacle detected in more than one direction. In such cases, the respective view factors are aggregated to save resources. For faces very close to each other, the sum of the view factor values representing those directions is typically more precise than the normalized approximate value calculated using Eq. (<xref ref-type="disp-formula" rid="Ch1.E5"/>) just for the centres of the grid boxes.</p>
</sec>
<sec id="Ch1.S2.SS2.SSS5">
  <label>2.2.5</label><title>View factor values for angular discretization</title>
      <p id="d1e2534">With angular discretization, the view from the centre of each face is divided into sections, each of which is bounded by azimuth angles <inline-formula><mml:math id="M100" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> and zenith angles <inline-formula><mml:math id="M101" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> (see Fig. <xref ref-type="fig" rid="Ch1.F4"/>). The portion of view represented by such a section is calculated analytically by integration.</p>
      <p id="d1e2583">The section of view between <inline-formula><mml:math id="M102" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M103" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> can be viewed as an imaginary surface <inline-formula><mml:math id="M104" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> on a unit sphere. The calculation of the view factor value is based on the view factor integral Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>), where the sending surface <inline-formula><mml:math id="M105" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is replaced by the centre point <inline-formula><mml:math id="M106" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>; therefore, the integral <inline-formula><mml:math id="M107" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo>∫</mml:mo><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula>, which provides a spatial average over the surface <inline-formula><mml:math id="M108" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, is eliminated and only the integral over <inline-formula><mml:math id="M109" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> remains:
              <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M110" display="block"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub></mml:mrow><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            <inline-formula><mml:math id="M111" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is a section of a sphere with centre <inline-formula><mml:math id="M112" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and radius <inline-formula><mml:math id="M113" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> limited by <inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>. A ray from <inline-formula><mml:math id="M116" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> towards a surface element <inline-formula><mml:math id="M117" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula> is always perpendicular on it, giving <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>. With this and <inline-formula><mml:math id="M119" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:msub><mml:mi>A</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>=</mml:mo><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow></mml:math></inline-formula>, the view factor value equals
              <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M120" display="block"><mml:mtable rowspacing="0.2ex" columnspacing="1em" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo><mml:mo>,</mml:mo><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><?xmltex \hack{\hbox\bgroup\fontsize{9.2}{9.2}\selectfont$\displaystyle}?><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>=</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>=</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mi>r</mml:mi><mml:mrow><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mover accent="true"><mml:mi>j</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>=</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>=</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e3288">For a horizontal face, the normal angle <inline-formula><mml:math id="M121" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is independent of the azimuth angle <inline-formula><mml:math id="M122" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula> and equal to the zenith angle <inline-formula><mml:math id="M123" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula>:
              <disp-formula id="Ch1.E10" content-type="numbered"><label>10</label><mml:math id="M124" display="block"><mml:mtable rowspacing="0.2ex" columnspacing="1em" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo><mml:mo>,</mml:mo><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mi mathvariant="italic">π</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mi>sin⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>=</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:mi>cos⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e3610">In the case of a vertical face, the calculation depends on the orientation of the face. The calculation is presented for a northward-oriented face, for which the face normal <inline-formula><mml:math id="M125" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="italic">π</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>. Considering the spherical triangle
formed by the face normal, zenith and <inline-formula><mml:math id="M126" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, the central angle <inline-formula><mml:math id="M127" display="inline"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo mathvariant="normal" stretchy="false">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> between the face normal and <inline-formula><mml:math id="M128" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is calculated using the spherical law of cosines:
              <disp-formula id="Ch1.E11" content-type="numbered"><label>11</label><mml:math id="M129" display="block"><mml:mtable columnspacing="1em" class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mover accent="true"><mml:mi>i</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>cos⁡</mml:mi><mml:mo>|</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>N</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">α</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
            and the view factor value is
              <disp-formula id="Ch1.E12" content-type="numbered"><label>12</label><mml:math id="M130" display="block"><mml:mtable class="split" columnspacing="1em" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo><mml:mo>,</mml:mo><mml:mo>[</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">θ</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>=</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>=</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:munderover><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">α</mml:mi><mml:msup><mml:mi>sin⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="italic">θ</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">θ</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{7.8}{7.8}\selectfont$\displaystyle}?><mml:mo>(</mml:mo><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>)</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>)</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
</sec>
<?pagebreak page3103?><sec id="Ch1.S2.SS2.SSS6">
  <label>2.2.6</label><title>Computational complexity of the angular discretization</title>
      <p id="d1e4013">The angular discretization scheme greatly improves scalability, which can be demonstrated by following the two scaling approaches introduced in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/>. In the case of angular discretization, the number of view factors and the memory requirements are limited by a fixed number for each face, and thus the asymptotic order of their growth is <inline-formula><mml:math id="M131" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> even in the case of increasing the resolution of the domain (the second case from Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS2"/>).</p>
      <p id="d1e4037">The CPU time and interprocess communication demands for ray tracing are slightly higher than that because the average separation distance (i.e. ray-tracing length) grows with increasing resolution. For horizontal domain enlargement, only some ray-tracing directions will have greater distances, while for increasing resolution, all distances will be proportionally longer. In both cases, the demands are of the order of <inline-formula><mml:math id="M132" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> at worst, which is a great improvement from <inline-formula><mml:math id="M133" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">5</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. Furthermore, we have to consider that for any atmospheric model, the complexity of increasing resolution in the turbulent flow solver is between <inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (considering only the increased resolution in three dimensions) and <inline-formula><mml:math id="M135" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (also accounting for the shortened time step), so the radiative part can still theoretically scale better than the rest of the model.</p>
</sec>
</sec>
<sec id="Ch1.S2.SS3">
  <label>2.3</label><title>Discretization of the direct and diffuse solar radiation</title>
      <p id="d1e4117">The direct and diffuse components of the incoming solar radiation and the thermal radiation from the sky towards surfaces are represented using the sky-view factor (SVF). It represents the portion of view from individual faces towards the sky which is not occupied by other faces. If the sky is viewed as an imaginary face, SVF makes the system of faces enclosed as specified in Eq. (<xref ref-type="disp-formula" rid="Ch1.E1"/>), which can be expressed as
            <disp-formula id="Ch1.E13" content-type="numbered"><label>13</label><mml:math id="M136" display="block"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e4164">The radiant fluxes from the sky propagate through the urban layer similarly to the reflected and emitted radiation from the faces with the exception that the source lies outside the urban layer. As the intention of the design is to avoid ray<?pagebreak page3104?> tracing during model time stepping for the reasons explained in Sect. 2.1, all ray tracing representing these rays is also done in advance during the initialization phase of the model just like with the other rays.</p>
      <p id="d1e4167">RTM version 3.0 represents the sky by a single SVF. The value of <inline-formula><mml:math id="M137" display="inline"><mml:mrow><mml:msup><mml:mi>F</mml:mi><mml:mtext>s</mml:mtext></mml:msup></mml:mrow></mml:math></inline-formula> is calculated by 2-D ray tracing as described in Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>. For homogeneous diffuse solar radiation, this single value per face is sufficient to allow calculation of the diffuse solar irradiance. If the radiation inputs only provide total horizontal solar irradiance, this value is split into direct and diffuse components analytically <xref ref-type="bibr" rid="bib1.bibx2" id="paren.23"/>. It is also possible to consider diffuse solar radiation to be inhomogeneous by splitting the sky into multiple regions and storing such separate partial SVF values per face because the number of regions would not increase with domain size; the current RTM code is ready for addition of this option once such radiation data are available.</p>
      <p id="d1e4186">When plant canopy simulation is disabled, the only information necessary to calculate the SVF for a specific location is the horizon height in each discretized azimuth direction, as described in detail in Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>. When the semi-transparent plant canopy reduces transmittance from the sky (Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>), the vertical structure of this partial shading is calculated in the means of angular discretization by adding a fixed number of discretized elevation angles for which the transmittance of the path from the sky towards the target face is calculated.</p>
<sec id="Ch1.S2.SS3.SSSx1" specific-use="unnumbered">
  <title>Direct solar radiation</title>
      <p id="d1e4199">The calculation of direct solar radiation during the model initialization phase is complicated by the fact that the apparent position of its source, the sun, and therefore the geometry of all rays, changes throughout the day, while all the other radiation sources in the model have fixed positions and geometries and only the values of their radiant fluxes change in time. RTM solves this problem by discretization of the apparent solar positions and performing ray tracing between these predetermined apparent solar positions and corresponding faces during the model initialization.</p>
      <p id="d1e4202">For a typical simulation which spans times of the order of hours or days, there is a fixed number of apparent solar positions (at most the number of radiation time steps), which is further reduced by discretization of azimuth and elevation angles using the nearest discretized direction. RTM uses the discretized directions that are already used for calculation of <inline-formula><mml:math id="M138" display="inline"><mml:mrow><mml:msup><mml:mi>F</mml:mi><mml:mtext>s</mml:mtext></mml:msup></mml:mrow></mml:math></inline-formula> in order to optimize the computation time and the memory requirements as much as possible.</p>
      <p id="d1e4216">For each discretized direction <inline-formula><mml:math id="M139" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and face <inline-formula><mml:math id="M140" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, the total ray transmittance <inline-formula><mml:math id="M141" display="inline"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is stored. This value is zero if there is an opaque obstacle (building or terrain) in that direction, i.e. if face <inline-formula><mml:math id="M142" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> is fully shaded from direction <inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, and it is less than 1 if the ray intersects the semi-transparent plant canopy (Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>). By multiplying <inline-formula><mml:math id="M144" display="inline"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> by the current solar direct normal irradiance <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:msup><mml:mi>E</mml:mi><mml:mtext>d</mml:mtext></mml:msup></mml:mrow></mml:math></inline-formula> and by the cosine of the incident angle, the approximate direct irradiance <inline-formula><mml:math id="M146" display="inline"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>E</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mtext>d</mml:mtext></mml:msubsup></mml:mrow></mml:math></inline-formula> of face <inline-formula><mml:math id="M147" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> is obtained:
              <disp-formula id="Ch1.E14" content-type="numbered"><label>14</label><mml:math id="M148" display="block"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>E</mml:mi><mml:mo mathvariant="normal" stretchy="false">̃</mml:mo></mml:mover><mml:mi>i</mml:mi><mml:mtext>d</mml:mtext></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mi>E</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msup><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the angle between the normal to face <inline-formula><mml:math id="M150" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and the exact value of the current apparent solar position.</p>
</sec>
</sec>
<sec id="Ch1.S2.SS4">
  <label>2.4</label><title>Representing semi-transparent plant canopy</title>
      <p id="d1e4410">The resolved plant canopy in RTM is represented as a 3-D discretized field of leaf area density. RTM simulates the absorption of SW and LW radiation from the sun, the sky and modelled surfaces (i.e. shading by plants), as well as the thermal emission of LW radiation from the plant canopy towards the sky and the surfaces (see Fig. <xref ref-type="fig" rid="Ch1.F1"/>). The ray-tracing algorithm follows the ray from the source to the target and the attenuation is quantified for each PCGB that the ray intersects. Some other plant-canopy-related radiative processes are intentionally omitted for reasons of computational performance. These include the following.
<list list-type="order"><list-item>
      <p id="d1e4417"><italic>Radiative interaction within plant canopy itself by means of LW radiation: interaction among individual PCGBs</italic>. This simplification has two reasons. The number of PCGBs can be much higher than the total number of faces in certain scenarios, generating huge numbers of mutually visible pairs of PCGBs, and it would be too complex to simulate it with the available computational resources – not to mention the complexity of including the sub-grid part of this interaction. On the other hand, if the LAD is high, then most LW interaction takes place between neighbouring PCGBs, and because the structure of air temperature is usually very smooth, such PCGBs have a low temperature difference, making the net exchanged radiative flux negligible; if the LAD is low, then its emitted LW flux density is also low.</p></list-item><list-item>
      <p id="d1e4423"><italic>Reflection in both parts of the radiation spectrum</italic>. The structure and arrangement of plant leaves allows for multiple reflections, but most of these reflections occur between leaves that are close to each other, which is mostly a sub-grid process (in typical resolutions of units of metres). Moreover, the high emissivity of leaves (and therefore low reflectivity according to Kirchhoff's law) makes their LW reflections negligible. The impact of SW reflection at nearby surfaces depends on the amount of reflected radiation in comparison to the background radiation from the same direction. The irradiation of the surfaces behind the plant canopy (further in the direction of the incoming radiation, e.g. below trees) is determined by the attenuation in the plant canopy (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS1"/> below), and if the LAD and extinction coefficient are appropriate, it is not significantly biased. The reflection and scattering by plant leaves towards other directions are disregarded by the current version of the model. This limitation needs to be taken into account<?pagebreak page3105?> while designing a simulation and considering the applicability of the model. The magnitude of the induced error and possible improvements of the treatment of SW reflection in plant canopy are a matter of ongoing research.</p></list-item></list></p>
      <p id="d1e4430">The main objects of radiative modelling in RTM are surfaces; the plant canopy is part of the process, but the focus remains on its interaction with surfaces. The data structures are organized accordingly and the ray-tracing algorithm is adapted to that as well. This arrangement allowed for the additional modelling of LW plant canopy emission and absorption into RTM with no data overhead and a negligible increase in computational time.</p>
<sec id="Ch1.S2.SS4.SSS1">
  <label>2.4.1</label><title>Calculating plant canopy sinks</title>
      <p id="d1e4440">This section describes the attenuation by the plant canopy of all the rays that are simulated by the ray-tracing algorithm – it applies to rays between faces, but also to the rays representing the diffuse and partially the direct solar radiation; the absorption of direct solar radiation is described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS3"/>.</p>
      <p id="d1e4445">As the ray-tracing algorithm follows the ray from the source to the target, the attenuation is quantified for each PCGB that the ray intersects. Since the ray tracing is performed during the initialization phase of the simulation, the actual radiant flux carried by the ray is not yet known, but the attenuation can be expressed as the absorbed fraction of the flux that enters the PCGB. This fraction remains constant in time and independent of the absolute value of the radiant flux, as long as the leaf area density, on which the optical density of the plant canopy is based, remains constant. For this reason the RTM currently does not allow changing the LAD values during simulation time, which is usually not a problem for typical simulations lasting several days.</p>
      <p id="d1e4448">The plant canopy within the volume of each discrete PCGB is considered homogeneous, and the leaves are assumed to be randomly oriented. In reality the distribution of leaf orientation may be non-uniform, but this also depends on the tree species, the season, sun direction, and wind speed and direction. As some of these are non-constant during the simulation, and also the effect on absorption is less important than the distribution of LAD within the tree crown <xref ref-type="bibr" rid="bib1.bibx43" id="paren.24"/>, RTM uses isotropic absorption inside the discrete PCGBs.</p>
      <p id="d1e4454">The ratio of the flux <inline-formula><mml:math id="M151" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> passing through the grid box to the flux carried by the ray upon entering the box <inline-formula><mml:math id="M152" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> is called transmittance (<inline-formula><mml:math id="M153" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>), and it can be calculated as
              <disp-formula id="Ch1.E15" content-type="numbered"><label>15</label><mml:math id="M154" display="block"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mi>a</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M155" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> is the leaf area density, <inline-formula><mml:math id="M156" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula> is the length of ray's intersection with the box (depending on relative angle and position) and <inline-formula><mml:math id="M157" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula> is the extinction coefficient, which converts LAD of trees and shrubs to a corresponding average optical density. The absorbed fraction <inline-formula><mml:math id="M158" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> of the entering flux <inline-formula><mml:math id="M159" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> is then calculated as <inline-formula><mml:math id="M160" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup><mml:mo>)</mml:mo><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>. Equation (<xref ref-type="disp-formula" rid="Ch1.E15"/>) follows and extends the way the absorption of radiative flux in the plant canopy is calculated for the single-column case with aggregated leaf area index (LAI) in the PALM plant canopy module <xref ref-type="bibr" rid="bib1.bibx26" id="paren.25"><named-content content-type="pre">PCM; see</named-content></xref>.</p>
      <p id="d1e4618">The exponential attenuation with respect to depth matches the Beer–Lambert law. As a continuous model of a discrete sub-grid process, it would correspond to an idealized case with non-transparent and non-reflective leaves wherein all leaves are homogeneously and randomly distributed in the volume of the grid cell; in that case, the only radiative flux passing through the cell would be the free rays that intersect no leaves. In reality, the transmittance of the tree crown is higher than that – the leaves themselves are semi-transparent and some further light is transmitted due to multiple reflections at the surfaces of the leaves. However, the attenuation with semi-transparent leaves is still exponential with respect to depth, and even the measured attenuation in homogeneous LAD media is close to exponential <xref ref-type="bibr" rid="bib1.bibx3" id="paren.26"/>; therefore, a suitable extinction coefficient <inline-formula><mml:math id="M161" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula> can compensate for the fact that leaf transparency and reflectivity are not simulated explicitly, as was already assumed in the PALM PCM <xref ref-type="bibr" rid="bib1.bibx26" id="paren.27"/>.</p>
      <p id="d1e4634">For a ray that passes sequentially through PCGBs <inline-formula><mml:math id="M162" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mi>n</mml:mi></mml:mrow></mml:math></inline-formula> with transmittances <inline-formula><mml:math id="M163" display="inline"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msubsup><mml:mi>T</mml:mi><mml:mi>n</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>, the total transmittance equals <inline-formula><mml:math id="M164" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:msubsup><mml:mo>∏</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:msubsup><mml:msubsup><mml:mi>T</mml:mi><mml:mi>m</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>. The fraction of absorbed flux <inline-formula><mml:math id="M165" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> at grid box <inline-formula><mml:math id="M166" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> divided by the total radiant flux <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> carried by the ray at its origin can be expressed as
              <disp-formula id="Ch1.E16" content-type="numbered"><label>16</label><mml:math id="M168" display="block"><mml:mtable columnspacing="1em" class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">rc</mml:mi></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>⋅</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">i</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup><mml:mo>)</mml:mo><mml:munderover><mml:mo movablelimits="false">∏</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:msubsup><mml:mi>T</mml:mi><mml:mi>m</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup><mml:mo>)</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:munderover><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi>m</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
            This fraction, which will be further called the ray canopy sink factor (RCSF), is computed iteratively during the ray-tracing process, and it is stored for each intersection of a ray and a PCGB. The total transmittance <inline-formula><mml:math id="M169" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> of the whole ray from the source to the target face is stored alongside the respective view factor, and the computed irradiance of the target face from that ray is always reduced accordingly.</p>
      <?pagebreak page3106?><p id="d1e4932">The total flux <inline-formula><mml:math id="M170" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> carried by the ray from face <inline-formula><mml:math id="M171" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> to face <inline-formula><mml:math id="M172" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> is equal to
              <disp-formula id="Ch1.E17" content-type="numbered"><label>17</label><mml:math id="M173" display="block"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>J</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the area of the source face <inline-formula><mml:math id="M175" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>. The value of the absorbed flux can be obtained by multiplying this value by the RCSF. The flux absorbed at a PCGB does not depend on the ray's target, and only the total absorbed flux for each PCGB needs to be calculated:
              <disp-formula id="Ch1.E18" content-type="numbered"><label>18</label><mml:math id="M176" display="block"><mml:mtable columnspacing="1em" class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>m</mml:mi></mml:munder><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>m</mml:mi></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>m</mml:mi></mml:munder><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">rc</mml:mi></mml:msubsup><mml:msub><mml:mi>J</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
            Thanks to that, all RCSFs with the same source face and PCGB (i.e. those that differ only by the target face) can be aggregated.
They are multiplied by the appropriate view factors, and the resulting sum <inline-formula><mml:math id="M177" display="inline"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">c</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is called the canopy-view factor (CVF):
              <disp-formula id="Ch1.E19" content-type="numbered"><label>19</label><mml:math id="M178" display="block"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">c</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msub><mml:mi>J</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>m</mml:mi></mml:munder><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow><mml:mi mathvariant="normal">rc</mml:mi></mml:msubsup><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mo>→</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            This aggregation reduces storage and computation demands during
the post-initialization time-stepping part of the simulation. The CVF only needs to be multiplied by the area of the source face and source face's radiosity in order to obtain the radiant flux <inline-formula><mml:math id="M179" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> absorbed by PCGB <inline-formula><mml:math id="M180" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> originating from face <inline-formula><mml:math id="M181" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>. A similar aggregation is used for calculating the absorbed radiative flux that originates from the diffuse solar radiation (see Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>).</p>
</sec>
<sec id="Ch1.S2.SS4.SSS2">
  <label>2.4.2</label><title>Thermal emission from the plant canopy</title>
      <p id="d1e5319">Modelling of the plant canopy thermal emission follows the concept outlined earlier. The emission from the plant canopy is considered from the target face's point of view, while the internal LW radiation exchange inside the plant canopy (among individual PCGBs and intra-grid exchange) is omitted.</p>
      <p id="d1e5322">Due to the reciprocity property of view factors, the CVF actually represents the fraction of view from face <inline-formula><mml:math id="M182" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> that is covered by the plant canopy from PCGB <inline-formula><mml:math id="M183" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, taking into account the partial opacity, which is determined by the leaf area density in PCGB <inline-formula><mml:math id="M184" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>. Consider the sub-grid semi-transparency to be caused by randomly distributed, small, fully opaque leaves with fully transparent gaps in between them; then, the CVF is exactly equal to the view factor from face <inline-formula><mml:math id="M185" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> towards those leaves (i.e. their visible parts).</p>
      <p id="d1e5353">This enables straightforward modelling of the thermal emission originating from the leaves in PCGB <inline-formula><mml:math id="M186" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> that is absorbed by the face <inline-formula><mml:math id="M187" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>. Since reflection in the plant canopy is ignored, the emissivity of those leaves can be considered <inline-formula><mml:math id="M188" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula> according to Kirchhoff’s law, and using the Stefan–Boltzmann law, the emitted radiative flux from PCGB <inline-formula><mml:math id="M189" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> in the direction of the face <inline-formula><mml:math id="M190" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula> is equal to
              <disp-formula id="Ch1.E20" content-type="numbered"><label>20</label><mml:math id="M191" display="block"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">c</mml:mi></mml:msubsup><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msubsup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M192" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the temperature of the air and leaves inside the PCGB <inline-formula><mml:math id="M193" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e5452">Thermal emission from the plant canopy towards the sky has to geometrically match the absorbed LW radiative flux from the sky in order to avoid biases in the total energy budget of the modelled domain. It is computed in a similar manner using the special CVF entries, which have the sky as the source instead of a face (their calculation is described later in Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>).</p>
</sec>
<sec id="Ch1.S2.SS4.SSS3">
  <label>2.4.3</label><title>Direct irradiation of the plant canopy</title>
      <p id="d1e5466">As described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS1"/>, the canopy-view factors represent the partial absorption of radiation by the plant canopy only for the radiation that originates from surfaces and for the diffuse solar radiation and thermal emission from the sky directed towards the surfaces. The absorbed direct solar radiation, which accounts for the majority of absorbed radiative flux during clear-sky days, needs to be modelled separately.</p>
      <p id="d1e5471">In order to determine the direct radiative flux entering each PCGB with respect to shading by obstacles and partial shading by other PCGBs, RTM performs a separate ray-tracing procedure starting backwards from the centre of each PCGB towards the discretized apparent solar directions. For this ray-tracing process, no canopy-view factors are stored, and only the total ray transmittance is determined and stored for each PCGB <inline-formula><mml:math id="M194" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> and discretized direction <inline-formula><mml:math id="M195" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e5492">During time stepping, the transmittance of the corresponding ray <inline-formula><mml:math id="M196" display="inline"><mml:mrow><mml:msubsup><mml:mi>T</mml:mi><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>→</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mi mathvariant="normal">r</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> is multiplied by the direct normal solar
irradiance <inline-formula><mml:math id="M197" display="inline"><mml:mrow><mml:msup><mml:mi>E</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>, which provides the radiative flux density entering PCGB <inline-formula><mml:math id="M198" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>. The fraction of this flux which is absorbed by PCGB <inline-formula><mml:math id="M199" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> is dependent on the dimensions of the PCGB, on the direction of irradiation and on the LAD of PCGB <inline-formula><mml:math id="M200" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e5548">RTM uses a sub-grid discretization model which sends an array of <inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:mn mathvariant="normal">60</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">60</mml:mn></mml:mrow></mml:math></inline-formula> parallel rays (organized to fill a bounding rectangle that contains the projection of the grid box) and calculates the transmittance of each of the rays using Eq. (<xref ref-type="disp-formula" rid="Ch1.E15"/>). These transmittances together produce an approximation of the fraction of absorbed flux divided by the flux density of direct normal irradiance. This fraction is calculated at the beginning of each time step using the known apparent solar position. Thanks to the fact that the grid is regular and the solar rays are parallel, this fraction is applicable to all PCGBs with a specified LAD. This simulation is performed with a single LAD value <inline-formula><mml:math id="M202" display="inline"><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.9</mml:mn><mml:mo>max⁡</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:msub><mml:mi>a</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> for all PCGBs <inline-formula><mml:math id="M203" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> in the domain, and the result is linearized for all PCGBs using a factor <inline-formula><mml:math id="M204" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mi>m</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:math></inline-formula>. A technical description is available in Sect. S2.1 in the Supplement.</p>
</sec>
</sec>
<sec id="Ch1.S2.SS5">
  <label>2.5</label><title>Calculation of mean radiant temperature</title>
      <p id="d1e5627">Mean radiant temperature (MRT) at a certain point in space is defined as the temperature of an imaginary object for which that object would be in radiative equilibrium with it surroundings, which means that the absorbed irradiance would be equal to the emitted radiant exitance. Calculation of the MRT is closely related to the radiative processes in the RTM, and thus it is implemented with advantage inside this module. This allows for the use of a similar approach and reuse of existing routines; it also ensures that MRT is calculated with the same discretization scheme as the scheme used in RTM for the calculation of LW and SW radiation, which allows users to avoid utilization of some highly simplified yet common approaches. Calculated MRT values are available directly in RTM in the form of PALM output variables, and<?pagebreak page3107?> they are provided to the biometeorology module for calculation of biometeorological quantities related to human thermal comfort (see Sect. <xref ref-type="sec" rid="Ch1.S4.SS4"/>).</p>
      <p id="d1e5632">Considering both LW and SW radiant fluxes for a hypothetical object with emissivity <inline-formula><mml:math id="M205" display="inline"><mml:mi mathvariant="italic">ε</mml:mi></mml:math></inline-formula> and SW albedo <inline-formula><mml:math id="M206" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula>, the MRT value <inline-formula><mml:math id="M207" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">R</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> can be derived from its defining equivalence and from the Stefan–Boltzmann law:
            <disp-formula id="Ch1.E21" content-type="numbered"><label>21</label><mml:math id="M208" display="block"><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi>a</mml:mi><mml:mo>)</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mtext>S</mml:mtext></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ε</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mtext>L</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="italic">ε</mml:mi><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">R</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msubsup><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M209" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mtext>S</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is the average SW irradiance of the hypothetical object and <inline-formula><mml:math id="M210" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mtext>L</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is its average LW irradiance.</p>
      <p id="d1e5730">The calculation of the MRT utilizes a similar concept as the calculation of irradiance with angular discretization. For each point at which MRT would be simulated, the MRT factors are calculated during the initialization phase of the model run. MRT factors are the equivalent of the average irradiance factors for the whole surface of the hypothetical sphere, which means that there is no dependence on the direction of irradiance. For face <inline-formula><mml:math id="M211" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> and MRT point <inline-formula><mml:math id="M212" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>, the MRT factor is calculated as
            <disp-formula id="Ch1.E22" content-type="numbered"><label>22</label><mml:math id="M213" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi>F</mml:mi><mml:mo stretchy="false" mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">M</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mi mathvariant="italic">π</mml:mi><mml:msubsup><mml:mi>s</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M214" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is surface area of the sphere, <inline-formula><mml:math id="M215" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the angle between the connecting ray and the normal of face <inline-formula><mml:math id="M216" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M217" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is the length of the connecting ray. Equation (<xref ref-type="disp-formula" rid="Ch1.E22"/>) utilizes the fact that the ratio between surface of a sphere and its normal projected area (the area of a circle with the same diameter) is equal to 4.</p>
      <p id="d1e5871">The MRT factors are precalculated using the 2-D ray-tracing
algorithm with angular discretization of the whole view, together with MRT sky-view factors and direct solar irradiance transmissivities for each MRT point. Depending on configuration, the MRT can be calculated for the centre of every grid box in the first layer above a terrain or even in multiple vertical layers.</p>
      <p id="d1e5875">The pure physical MRT value is usually defined with respect to a spherical black-globe thermometer. On the other hand, the biometeorology applications require the MRT value related to a clothed human body, which is tall and narrow, and it is therefore affected by radiation from its sides proportionally more than by radiation directly from above. It is modelled in RTM as a configurable asymmetrical generic object with specified albedo, emissivity and aspect ratio. These MRT values for the hypothetical human body are then provided to the biometeorology module. Further details are described in Sect. <xref ref-type="sec" rid="Ch1.S4.SS4"/>.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Implementation of RTM</title>
      <?pagebreak page3108?><p id="d1e5889">The basic ray-tracing algorithm, which is used in RTM when the legacy discretization of view is enabled, was first implemented in RTM 1.0 as part of PALM-USM 1.0, and is it carried over from previous versions of RTM with minor changes like the addition of options <inline-formula><mml:math id="M218" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">min</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and  <inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="normal">max</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> to reduce the number of view factors (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS3"/>) and adaptations to changes in other parts of RTM. Its current implementation in RTM 3.0 is described in Sect. S1.1.<?xmltex \hack{\newpage}?></p>
<sec id="Ch1.S3.SS1">
  <label>3.1</label><title>Azimuthal ray-tracing algorithm</title>
      <p id="d1e5924">With the introduction of the angular discretization in RTM version 2.0, a new variant of the ray-tracing algorithm was developed, which was highly optimized for this angular discretization. This algorithm is further called 2-D ray tracing.</p>
      <p id="d1e5927">This is a novel algorithm which takes significant advantage of the specific data representation and parallelization of the PALM model. The 3-D fields in PALM are represented as arrays for which the <inline-formula><mml:math id="M220" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula> dimension is the fastest changing; therefore, vertical columns are memory-contiguous and quickly loaded. Moreover, the 2.5-D geometry enables such a representation of surfaces that allows fast access to all surfaces with a specific horizontal coordinate. Finally, the MPI parallelization of the PALM model splits the domain horizontally into individual subdomains, therefore each vertical column is contained within one subdomain and nearby columns have a high probability of being in the same subdomain.</p>
      <p id="d1e5937">The algorithm utilizes the following feature of the 2.5-D geometry: for every point of view and for every azimuth there is a distinct horizon (<inline-formula><mml:math id="M221" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula>), i.e. the elevation angle below which the view is completely obstructed by terrain and/or buildings and above which there is only sky. The extension of this algorithm to a full 3-D geometry is discussed in Sect. 6.</p>
      <p id="d1e5947">The core of the 2-D ray-tracing algorithm works by following a discrete set of azimuths from point <inline-formula><mml:math id="M222" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> (representing the centre of the target face) in the direction of the azimuth until it reaches the horizontal domain border. For each azimuth it tracks the monotonically increasing horizon angle; more specifically, it tracks <inline-formula><mml:math id="M223" display="inline"><mml:mrow><mml:mi>tan⁡</mml:mi><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>z</mml:mi></mml:mrow><mml:msqrt><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>x</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mi>y</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msqrt></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M224" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> represents coordinates of the obstacle representing the tracked highest horizon angle. The tracking itself works just like the basic ray-tracing algorithm (Sect. 1.1) except in just two dimensions – one step means one vertical column for which the terrain and building height is compared against the currently known horizon.</p>
      <p id="d1e6060">To determine partial shading by the plant canopy, RTM needs to track more than just the horizon angle for each traced azimuth. The plant canopy may have a diverse vertical structure; thus, an evenly discretized set of elevation (zenith) angles is tracked for each azimuth. This forms a uniform, regular set of directions, which is used for all types of radiative processes; it is used for calculation of the sky-view factors, direct irradiance transmittance and also for the angularly discretized view factors towards other surfaces. This way, a single 2-D ray-tracing routine computes all the respective values at once without any overhead.</p>
      <p id="d1e6063">During tracing of each ray, the information about LAD all along the ray path is needed. This information is distributed in particular MPI processes and needs to be obtained by means of MPI communication. In order to reduce fragmentation of one-sided MPI operations, the 2-D ray tracing requests all LAD data for all applicable PCGBs belonging to the whole half-plane cross section (one discrete azimuth) in all required vertical levels at once. When these data are retrieved from all involved MPI processes, the RCSFs are generated in a two-pass calculation for each discrete azimuth – from point <inline-formula><mml:math id="M225" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> towards the horizon and then back. Both of these directions are necessary: one for the absorbed fraction of incoming diffuse radiation from the sky and the other one for the absorbed fraction of the outgoing (reflected and emitted) radiative flux towards the sky. In addition to that, the total transmittance of each ray is saved. The generated RCSFs are sorted and aggregated continuously; after all ray tracing is done, they are redistributed among processes using MPI <monospace>alltoallv</monospace> similarly as with the basic ray-tracing algorithm.</p>
      <p id="d1e6089">The 2-D ray-tracing algorithm needs to determine the complete information for the time-stepping radiation calculation, including the index of the opposing face, the view factor value and the total transmittance of the connecting ray, for each discrete direction under the horizon angle. As specified in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS4"/>, the view factor value is determined solely by the regularly discretized fraction of view. For vertical faces, it is calculated using Eq. (<xref ref-type="disp-formula" rid="Ch1.E12"/>), where <inline-formula><mml:math id="M226" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M227" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> are the midpoints between the calculated discrete azimuth and the neighbouring discrete azimuths (or <inline-formula><mml:math id="M228" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="italic">π</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula> or <inline-formula><mml:math id="M229" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi mathvariant="italic">π</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:math></inline-formula>, where the calculated discrete zenith angle is the first or the last value, respectively), and <inline-formula><mml:math id="M230" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M231" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> are the midpoints between the calculated discrete zenith angle and the neighbouring discrete zenith angles (or <inline-formula><mml:math id="M232" display="inline"><mml:mn mathvariant="normal">0</mml:mn></mml:math></inline-formula> or <inline-formula><mml:math id="M233" display="inline"><mml:mi mathvariant="italic">π</mml:mi></mml:math></inline-formula> as boundaries). For horizontal faces, a similar approach is used with Eq. (<xref ref-type="disp-formula" rid="Ch1.E10"/>).</p>
      <p id="d1e6182">The index of the opposing face has to be determined using MPI one-sided communication request (MPI <monospace>get</monospace>) because the array with reverse indices (<inline-formula><mml:math id="M234" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M235" display="inline"><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M236" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M237" display="inline"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) <inline-formula><mml:math id="M238" display="inline"><mml:mrow><mml:mo>→</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula> (where <inline-formula><mml:math id="M239" display="inline"><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the face orientation – northward, eastward, southward, westward or upward) is once again a 3-D array for which each process can only hold its own subdomain in its local memory, as the array for the whole domain would be too large.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><?xmltex \currentcnt{5}?><?xmltex \def\figurename{Figure}?><label>Figure 5</label><caption><p id="d1e6256">Obstacle identification algorithm (vertical cross section).</p></caption>
          <?xmltex \igopts{width=142.26378pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f05.png"/>

        </fig>

      <?pagebreak page3109?><p id="d1e6266">For each new grid column processed during ray tracing, there may be at most one new horizontal face and zero or more vertical faces identified as new opposing faces. The identification algorithm can be demonstrated with an example shown in Fig. <xref ref-type="fig" rid="Ch1.F5"/>. The ray-tracing procedure, originating from face <inline-formula><mml:math id="M240" display="inline"><mml:mi>o</mml:mi></mml:math></inline-formula> which progresses in the azimuth direction corresponding to the cross section in the figure, enters column <inline-formula><mml:math id="M241" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> with the current horizon angle <inline-formula><mml:math id="M242" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, which was the result of column <inline-formula><mml:math id="M243" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> having terrain height <inline-formula><mml:math id="M244" display="inline"><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.5</mml:mn></mml:mrow></mml:math></inline-formula>. The column <inline-formula><mml:math id="M245" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> has terrain height <inline-formula><mml:math id="M246" display="inline"><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3.5</mml:mn></mml:mrow></mml:math></inline-formula>, which yields two new horizon angles <inline-formula><mml:math id="M247" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M248" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> for entry to the column (<inline-formula><mml:math id="M249" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2.5</mml:mn></mml:mrow></mml:math></inline-formula>) and exit from the column (<inline-formula><mml:math id="M250" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.5</mml:mn></mml:mrow></mml:math></inline-formula>), respectively. Because <inline-formula><mml:math id="M251" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>&gt;</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, there will be new vertical opposing faces for each discretized ray between <inline-formula><mml:math id="M252" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, in this case faces <inline-formula><mml:math id="M253" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M254" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>. The orientation of these faces is determined by the fact that the boundary between columns was decreasing in dimension <inline-formula><mml:math id="M255" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula>; i.e. they are eastward-oriented faces. Furthermore, because <inline-formula><mml:math id="M256" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub><mml:mo>&gt;</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,  as long as there is at least one discretized ray between <inline-formula><mml:math id="M257" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, there will also be a new opposing horizontal face <inline-formula><mml:math id="M258" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e6506">The generated VF entries for the opposing faces are sorted and aggregated for each ray-tracing origin (after ray tracing towards all discretized azimuth angles), creating at most a fixed number of entries that do not need to be normalized, as described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS4"/>. VF entries are always generated in the process of computing the subdomain where the target face lies; therefore, there is no need for their redistribution.</p>
</sec>
<sec id="Ch1.S3.SS2">
  <label>3.2</label><title>Radiation processing in time stepping</title>
      <p id="d1e6519">RTM radiation interaction is called in PALM after every call of the one-column radiation scheme (e.g. RRTMG), which is applied in regular configurable intervals. For each radiation step, the radiative fluxes on the top of the urban canopy layer are updated first, and then the RTM calculates the fluxes within the urban layer using inputs from its top border.</p>
      <p id="d1e6522">The implementation of the time-stepping part of RTM is straightforward, and its changes since RTM 1.0 are only related to the addition of newly simulated processes, like the plant canopy LW interaction and the calculation of MRT. The current implementation in RTM 3.0 is fully described in Sect. S1.2.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Integration of RTM with other PALM modules</title>
      <p id="d1e6535">This section presents the parts of the RTM module that are responsible for interaction with other modules in PALM, together with the respective parts in those modules that were added by the authors of this paper in order to enable the coupled simulation of the described processes.</p>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Radiation forcing model</title>
      <p id="d1e6545">As described in Sect. <xref ref-type="sec" rid="Ch1.S1.SS2"/>, the RTM simulates radiative fluxes inside the urban canopy layer by taking the radiation fluxes from the PALM one-column radiation model as input. As the result of this simulation, RTM calculates the radiation reflected from the surface to the atmosphere more realistically than the one-column model. In order to take advantage of that, the RTM results need to be considered back in the forcing radiation model. This forms a two-way coupling between the forcing radiation model and RTM. This section describes the implementation of the second backward direction of this coupling and follows one of the possible approaches used in mesoscale models <xref ref-type="bibr" rid="bib1.bibx37" id="paren.28"/>.</p>
      <p id="d1e6553">The implementation is based on calculating effective radiation surface parameters for the radiation model: an effective surface emissivity <inline-formula><mml:math id="M259" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>, surface temperature <inline-formula><mml:math id="M260" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mtext>eff</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and urban albedo <inline-formula><mml:math id="M261" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>eff</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>. These parameters are calculated so that they would, when applied to a simple single surface as assumed in the forcing one-column radiation model, give similar radiation fluxes as the complex 3-D urban area.</p>
      <p id="d1e6589">For LW radiation, the lower boundary condition of the forcing radiation model can be expressed as
            <disp-formula id="Ch1.E23" content-type="numbered"><label>23</label><mml:math id="M262" display="block"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↑</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi>T</mml:mi><mml:mtext>eff</mml:mtext><mml:mn mathvariant="normal">4</mml:mn></mml:msubsup><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M263" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↑</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is the upwelling LW radiation, which represents the total radiation emitted and reflected into the sky from the urban surfaces as calculated by the RTM. The downwelling LW radiation <inline-formula><mml:math id="M264" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is provided by the forcing radiation model as an input to the RTM.</p>
      <p id="d1e6665">Here, <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is selected as the average of the surface emissivities <inline-formula><mml:math id="M266" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> of the surface <inline-formula><mml:math id="M267" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> over the area <inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>:
            <disp-formula id="Ch1.E24" content-type="numbered"><label>24</label><mml:math id="M269" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>A</mml:mi></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mtext>with</mml:mtext><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi>A</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          With that, only <inline-formula><mml:math id="M270" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↑</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is needed to calculate <inline-formula><mml:math id="M271" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mtext>eff</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> with
Eq. (<xref ref-type="disp-formula" rid="Ch1.E23"/>). The straightforward way would be to sum up the emitted and reflected radiation from each surface, taking into account the corresponding sky-view factor. For efficiency reasons, the energy conservation for the total urban area is used instead:
            <disp-formula id="Ch1.E25" content-type="numbered"><label>25</label><mml:math id="M272" display="block"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mtext>emit</mml:mtext></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mtext>abs</mml:mtext></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mo>↑</mml:mo></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The terms on the left-hand side represent the total energy input from the sky and the total LW emission of the urban surfaces. The right-hand side stands for the total absorbed energy by the urban surfaces as well as the total energy emitted and reflected to the sky. This can be combined with Eq. (<xref ref-type="disp-formula" rid="Ch1.E23"/>), yielding
            <disp-formula id="Ch1.E26" content-type="numbered"><label>26</label><mml:math id="M273" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi>T</mml:mi><mml:mtext>eff</mml:mtext><mml:mn mathvariant="normal">4</mml:mn></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mtext>emit</mml:mtext></mml:msup><mml:mo>-</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mtext>abs</mml:mtext></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M274" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E27"><mml:mtd><mml:mtext>27</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E28"><mml:mtd><mml:mtext>28</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>L</mml:mi><mml:mtext>emit</mml:mtext></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:msubsup><mml:mi>T</mml:mi><mml:mi>i</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msubsup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E29"><mml:mtd><mml:mtext>29</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>L</mml:mi><mml:mtext>abs</mml:mtext></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Here, <inline-formula><mml:math id="M275" display="inline"><mml:mrow><mml:msubsup><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup></mml:mrow></mml:math></inline-formula> is the radiation received by a surface with
temperature <inline-formula><mml:math id="M276" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> from the sky, and <inline-formula><mml:math id="M277" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the respective total received LW radiation including reflections and LW emission from other surfaces.</p>
      <?pagebreak page3110?><p id="d1e7067">The standard choice that the normalizing area <inline-formula><mml:math id="M278" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> represents the horizontal modelling domain size <inline-formula><mml:math id="M279" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>horiz</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>l</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:msub><mml:mi>l</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> with domain size <inline-formula><mml:math id="M280" display="inline"><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M281" display="inline"><mml:mrow><mml:msub><mml:mi>l</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> in the <inline-formula><mml:math id="M282" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M283" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> direction, respectively, does not work here.  In order to receive a realistic amount of diffuse radiation from the sky, it is necessary to consider not only radiation from the sky area of size <inline-formula><mml:math id="M284" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>horiz</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> above the modelling domain but also radiation from the side areas of the domain. In general, however, this leads to <inline-formula><mml:math id="M285" display="inline"><mml:mrow><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup><mml:mo>≠</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mtext>horiz</mml:mtext></mml:msub><mml:mo>⋅</mml:mo><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, which is not unrealistic because higher (lower) received radiation within the domain would be compensated for by lower (higher) received radiation outside the domain. To tackle this issue, the approach is to receive <inline-formula><mml:math id="M286" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> from the sky but with a different reference area <inline-formula><mml:math id="M287" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> calculated as
            <disp-formula id="Ch1.E30" content-type="numbered"><label>30</label><mml:math id="M288" display="block"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mtext>horiz</mml:mtext></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup></mml:mrow><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>horiz</mml:mtext></mml:msub><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mo>∑</mml:mo><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup></mml:mrow><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e7292">For SW radiation, the lower boundary condition of the forcing radiation model can be expressed as
            <disp-formula id="Ch1.E31" content-type="numbered"><label>31</label><mml:math id="M289" display="block"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↑</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          with the downwelling SW radiation <inline-formula><mml:math id="M290" display="inline"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> as calculated by the forcing radiation model
and the total upwelling SW radiation <inline-formula><mml:math id="M291" display="inline"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↑</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>. Expressing <inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↑</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> in terms of absorbed SW radiation <inline-formula><mml:math id="M293" display="inline"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mtext>abs</mml:mtext></mml:msup></mml:mrow></mml:math></inline-formula> with
            <disp-formula id="Ch1.E32" content-type="numbered"><label>32</label><mml:math id="M294" display="block"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mo>↑</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mtext>abs</mml:mtext></mml:msup></mml:mrow></mml:math></disp-formula>
          yields
            <disp-formula id="Ch1.E33" content-type="numbered"><label>33</label><mml:math id="M295" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mtext>eff</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>-</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mtext>abs</mml:mtext></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M296" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E34"><mml:mtd><mml:mtext>34</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msubsup><mml:mi>K</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E35"><mml:mtd><mml:mtext>35</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>K</mml:mi><mml:mtext>abs</mml:mtext></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mtext>norm</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mi>i</mml:mi></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Here, <inline-formula><mml:math id="M297" display="inline"><mml:mrow><mml:msubsup><mml:mi>K</mml:mi><mml:mi>i</mml:mi><mml:mo>↓</mml:mo></mml:msubsup></mml:mrow></mml:math></inline-formula> is the SW radiation from the sky received by surface <inline-formula><mml:math id="M298" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> with albedo <inline-formula><mml:math id="M299" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M300" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the total
SW radiation received by the respective area including reflections from other surfaces.</p>
</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Building and land surface models</title>
      <p id="d1e7587">Radiative transfer between the atmosphere and surfaces as well as among surfaces themselves depends on the surface temperature, which is the result of the surface energy balance calculated in the surface modules. However, one of the components in the surface energy balance is the surface net radiation, which is calculated in the RTM. The exchange of information between the surface modules and the RTM is therefore mutual.</p>
      <p id="d1e7590">PALM includes two surface modules: the land surface module (LSM) for natural-like surfaces, such as vegetation-covered, water and pavement surfaces, and the building surface module (BSM) for building surfaces such as walls, windows and roofs. Both modules solve the energy balance for each surface, partitioning the available net radiation into ground–wall heat fluxes, as well as sensible and latent heat fluxes. For a detailed description of LSM and BSM see <xref ref-type="bibr" rid="bib1.bibx27" id="text.29"/>.</p>
      <p id="d1e7596">Each of the discrete surfaces may have distinct soil or wall material properties, such as heat capacity or conductivity, as well as distinct surface properties such as albedo, thermal emissivity and roughness length. In the LSM a face (i.e. surface element in LSM and BSM terminology) is assumed to be either vegetation, water or pavement, while in the BSM a surface element is further divided fractionally into walls, windows and green surfaces. Each fraction exhibits distinct radiative properties. For performance optimization reasons, the corresponding properties and state variables for the surfaces are stored within a dynamic data structure, which encompasses arrays for various surface variables. Each type of surface with different a spherical orientation has its own derived data structure defined; e.g. northward- and southward-facing BSM surfaces can be accessed individually without further if–else conditions necessary. This way of representing the surface allows for the execution of surface-energy-related code in a consecutive manner without hampering loop vectorization. However, RTM solves interactions between all surfaces and it thus needs, again for optimization reasons, one single array of surface properties and state variables. Hence, surface information from the respective arrays of the derived data structure is gathered into a single linear array before the RTM code is executed. This is done for the surface temperature, albedo and emissivity. For fractional surfaces, these values are calculated as the weighted average of the different fractions (wall, window and green fractions).</p>
      <p id="d1e7599">After the radiation interactions are performed in the RTM, the resulting LW and SW radiation fluxes at the surfaces are distributed back onto the surface-type data structure. Subsequently, the updated radiation fluxes at the surfaces are supplied to LSM and BSM.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <label>4.3</label><title>Evapotranspiration and latent heat in plant canopy model</title>
      <p id="d1e7610">An important process associated with plant canopies is transpiration of water vapour from the green parts of plants. It is actively controlled by plants by opening and closing stomata and thus changing the resistance of the leaf surface against the evaporation of the leaf water. This process is mainly affected by the incoming SW radiation, air temperature, air humidity and the soil water content <xref ref-type="bibr" rid="bib1.bibx39 bib1.bibx6" id="paren.30"><named-content content-type="pre">e.g.</named-content></xref>. The explicit 3-D simulation of SW radiation in RTM allows for the creation of the transpiration model for the resolved plant canopy within the 3-D grid of the model.<?pagebreak page3111?> This enables explicit interactions within the model resolution, such as partial shading in the LAD structure within a tree crown based on directions of incoming radiation from multiple sources. The transpiration model calculates humidity gradients and latent heat fluxes, completing the description of the atmospheric thermal energy processes in the plant canopy.</p>
      <p id="d1e7618">Calculation of the plant canopy transpiration rate is based on the Jarvis–Stewart model in the form described in <xref ref-type="bibr" rid="bib1.bibx6" id="text.31"/> and <xref ref-type="bibr" rid="bib1.bibx31" id="text.32"/>. Namely, the evaporation rate from the leaf surface <inline-formula><mml:math id="M301" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is computed as
            <disp-formula id="Ch1.E36" content-type="numbered"><label>36</label><mml:math id="M302" display="block"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">eq</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>)</mml:mo><mml:mi>L</mml:mi><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">imp</mml:mi></mml:msub><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M303" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">eq</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the equilibrium evaporation per leaf unit area, <inline-formula><mml:math id="M304" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">imp</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the imposed evaporation per leaf unit area and <inline-formula><mml:math id="M305" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> is the decoupling factor. These variables are modelled as

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M306" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E37"><mml:mtd><mml:mtext>37</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi>l</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">eq</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:msub><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="italic">γ</mml:mi></mml:mfrac></mml:mstyle></mml:mrow><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="italic">γ</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E38"><mml:mtd><mml:mtext>38</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>l</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:msub><mml:mi>E</mml:mi><mml:mi mathvariant="normal">imp</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:msub><mml:mi>c</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub><mml:msub><mml:mi>e</mml:mi><mml:mtext>p,d</mml:mtext></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E39"><mml:mtd><mml:mtext>39</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="italic">γ</mml:mi><mml:mi mathvariant="normal">Ω</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="italic">γ</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow><mml:mi mathvariant="italic">γ</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where <inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:msub><mml:mi>R</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the net radiation provided by the RTM for each PCGB, <inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mtext>p,d</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mtext>s</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mi>e</mml:mi></mml:mrow></mml:math></inline-formula> is the water vapour pressure deficit in the air (with <inline-formula><mml:math id="M309" display="inline"><mml:mrow><mml:msub><mml:mi>e</mml:mi><mml:mtext>s</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M310" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> being the water vapour pressure at saturation and the water vapour pressure, respectively), <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula> is the partial derivative of the water vapour saturation pressure with respect to temperature, <inline-formula><mml:math id="M312" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mi>p</mml:mi><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0.622</mml:mn><mml:msub><mml:mi>l</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is the psychrometric constant, <inline-formula><mml:math id="M313" display="inline"><mml:mrow><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the leaf boundary-layer conductance and <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the stomatal conductance. The stomatal conductance is computed as
            <disp-formula id="Ch1.E40" content-type="numbered"><label>40</label><mml:math id="M315" display="block"><mml:mrow><mml:msub><mml:mi>g</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi mathvariant="normal">s</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">max</mml:mi></mml:mrow></mml:msub><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:msup><mml:mi>K</mml:mi><mml:mo>↓</mml:mo></mml:msup><mml:mo>)</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>)</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mtext>p,d</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="normal">RSWC</mml:mi><mml:mo>)</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M316" display="inline"><mml:mrow><mml:msub><mml:mi>g</mml:mi><mml:mrow><mml:mi mathvariant="normal">s</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">max</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> is an empirical maximum conductivity value and <inline-formula><mml:math id="M317" display="inline"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> are empirical functions, which depend on the incident SW radiation, the temperature, the water pressure deficit and the residual soil water content (RSWC) <xref ref-type="bibr" rid="bib1.bibx42" id="paren.33"/>. The empirical functions are adapted from <xref ref-type="bibr" rid="bib1.bibx39" id="text.34"/> and <xref ref-type="bibr" rid="bib1.bibx42" id="text.35"/>.</p>
      <p id="d1e8147">The resulting latent heat fluxes and humidity gradients then enter the prognostic equations of humidity and potential temperature <xref ref-type="bibr" rid="bib1.bibx27" id="paren.36"><named-content content-type="pre">see Eqs. 3 and 4 in</named-content></xref> as additional sources terms.</p>
</sec>
<sec id="Ch1.S4.SS4">
  <label>4.4</label><title>Biometeorology module</title>
      <p id="d1e8164">The biometeorology module in PALM <xref ref-type="bibr" rid="bib1.bibx8" id="paren.37"><named-content content-type="pre">BIO; see</named-content></xref> provides spatial and temporal information on human thermal comfort. This is expressed in the form of biometeorology indices, such as physiologically equivalent temperature (PET), universal thermal climate index (UTCI) and perceived temperature (PT). All these indices require the mean radiant temperature (MRT) with respect to a simulated human body.</p>
      <p id="d1e8172">The calculation of MRT is closely related to the RTM radiative processes. This fact allows for the calculation of MRT inside RTM with little additional effort and overhead utilizing the existing RTM routines (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS5"/>). It also ensures that MRT is simulated similarly to other radiative fluxes (i.e. using the same discretization and numerical methods), which allows users to avoid substantial simplifications often used in other models <xref ref-type="bibr" rid="bib1.bibx8" id="paren.38"><named-content content-type="pre">a review is in e.g. </named-content></xref>. However, this approach requires the interconnection and collaboration of the RTM and BIO modules.</p>
      <p id="d1e8182">The RTM provides the MRT values for the BIO module in the form of separate SW and LW mean irradiance for each simulated MRT box. This approach allows the BIO module to process the incoming fluxes independently and to apply the radiative properties of the human body (albedo and emissivity) inside the BIO module. The shape of the simulated body, however, affects the MRT factors, and thus it needs to be defined inside the RTM. The current version of RTM contains three selectable types of MRT body geometries: sphere (simulated globe thermometer), ellipsoid and a simple human body parameterization, with the possibility to supplement other arbitrary geometries. The ratio of the major and minor axes of the elongated shapes is configurable in RTM with the default of <inline-formula><mml:math id="M318" display="inline"><mml:mn mathvariant="normal">7.3</mml:mn></mml:math></inline-formula>. More details about the currently implemented shapes are available in <xref ref-type="bibr" rid="bib1.bibx11" id="text.39"/>.</p>
</sec>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Model evaluation</title>
      <p id="d1e8204">This section presents an evaluation of the convergence and computational performance of the current RTM implementation. A validation of the whole PALM model with RTM in a realistic urban environment against a comprehensive set of observations for a large scenario in Prague–Dejvice is presented by <xref ref-type="bibr" rid="bib1.bibx34" id="text.40"/>. There are also further validation studies (e.g. Berlin) in preparation. A detailed study on the relative importance of individual radiative transfer processes is presented in <xref ref-type="bibr" rid="bib1.bibx36" id="text.41"/>. Tests of the sensitivity of the PALM model to specific RTM input parameters are included in <xref ref-type="bibr" rid="bib1.bibx1" id="text.42"/>.</p>
      <p id="d1e8216">The simulations presented in Sect. <xref ref-type="sec" rid="Ch1.S5.SS1"/>, <xref ref-type="sec" rid="Ch1.S5.SS2"/>, <xref ref-type="sec" rid="Ch1.S5.SS3"/>, <xref ref-type="sec" rid="Ch1.S5.SS4"/> and <xref ref-type="sec" rid="Ch1.S5.SS5"/> are based on a small urban scenario in the Prague–Holešovice crossroads of Dejvická and Komunardů streets, similar to the tiled base scenario used for the sensitivity study in <xref ref-type="bibr" rid="bib1.bibx1" id="text.43"/>, which itself is based on the scenario used for validation of the PALM-USM model <xref ref-type="bibr" rid="bib1.bibx33" id="paren.44"/>.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>Convergence with respect to model resolution</title>
      <p id="d1e8243">The surface geometry and properties used in RTM are available with a certain level of detail and discretized by a regular grid. Hence, a natural expectation would be that decreasing the grid spacing below a certain level would not introduce new information and that the RTM would converge to one<?pagebreak page3112?> solution. With RTM, increased model resolution leads to a higher number of finer faces and PCGBs. In order to investigate how sensitive the resulting radiative fluxes are to model resolution, multiple simulations have been performed for the small urban scenario with resolution halved iteratively from 8 m down to 0.5 m. Because only radiative fluxes are of concern in this experiment, only one daytime time step was compared.</p>
      <p id="d1e8246">The finest simulation with a resolution of 0.5 m is taken as the base case, and other scenarios are compared to it by radiative fluxes at the matching surfaces. Finer resolutions mean increased detail in the 3-D structure of model surfaces; therefore, not all surfaces represented in the finer-resolution scenario correspond to the coarser-resolution scenario. In this experiment, around 70 %–80 % of fine-resolution faces could be matched to respective coarse-resolution faces. The results are shown in Fig. <xref ref-type="fig" rid="Ch1.F6"/>.</p>
      <p id="d1e8251">On double-logarithmic scales the radiant flux errors decrease almost linearly. The largest errors can be observed in the SW fluxes, with deviations to the reference case of almost <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:mn mathvariant="normal">100</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mrow></mml:math></inline-formula>, while errors in the LW fluxes are smaller by about 1 order of magnitude. Extrapolating to even finer spatial  resolution would imply that the mean error made for the LW fluxes becomes negligible, while the mean error for SW fluxes is still of the order of a few Watts per square metre (<inline-formula><mml:math id="M320" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>). However, we emphasize that this is not related to the RTM itself but to the edged representation of sloped surface geometry on the Cartesian grid, which successively approaches the “real-world” surface geometry with increasing spatial model resolution so that mutual surface reflections become more realistic.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6"><?xmltex \currentcnt{6}?><?xmltex \def\figurename{Figure}?><label>Figure 6</label><caption><p id="d1e8292">Double-logarithmic presentation of mean deviations of surface SW and LW irradiance as well as net radiant flux against the finest-resolution case of 0.5 m.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f06.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>Convergence of angular discretization</title>
      <p id="d1e8309">The angular resolution of the angular discretization scheme (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS4"/>) can be controlled by setting the number of horizontal (azimuth) and vertical (elevation) directions. The default values are 80 and 40 steps respectively, i.e. 4.5<inline-formula><mml:math id="M321" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> steps. This section explores the convergence of increasing angular resolution on the small urban scenario.</p>
      <p id="d1e8323">The angular discretization resolution also controls the discretization of direct solar irradiance; therefore, different angular resolutions also lead to a different number of discrete apparent solar positions throughout the day. For this experiment, a 1 d long simulation was performed with five different angular resolutions: 18<inline-formula><mml:math id="M322" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>, 9<inline-formula><mml:math id="M323" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>, 4.5<inline-formula><mml:math id="M324" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>, 2.25<inline-formula><mml:math id="M325" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> and 1.125<inline-formula><mml:math id="M326" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>.</p>
      <p id="d1e8371">Table <xref ref-type="table" rid="Ch1.T1"/> lists parameters of the experiment. With doubling the angular resolution the number of discrete directions quadruples, while the number of view factors grows more slowly. This is a result of the aggregation of view factors with an identical source and target face in the angular discretization scheme, as the increased angular resolution would surpass grid spacing for increasingly distant mutually visible surfaces. For the target faces for which the angular resolution is already finer than the grid spacing of the faces in its point of view, the increased number of rays traced from each visible face brings improved precision of the VF values without increasing the number of VFs.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1" specific-use="star"><?xmltex \currentcnt{1}?><label>Table 1</label><caption><p id="d1e8380">Scaling of angular resolution.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="7">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:colspec colnum="7" colname="col7" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Angular resolution (azimuth and zenith) </oasis:entry>
         <oasis:entry colname="col3">18<inline-formula><mml:math id="M327" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">9<inline-formula><mml:math id="M328" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">4.5<inline-formula><mml:math id="M329" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6">2.25<inline-formula><mml:math id="M330" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col7">1.125<inline-formula><mml:math id="M331" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Total discrete directions (hemisphere) </oasis:entry>
         <oasis:entry colname="col3">100</oasis:entry>
         <oasis:entry colname="col4">400</oasis:entry>
         <oasis:entry colname="col5">1600</oasis:entry>
         <oasis:entry colname="col6">6400</oasis:entry>
         <oasis:entry colname="col7">25 600</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Daily discrete solar  positions </oasis:entry>
         <oasis:entry colname="col3">22</oasis:entry>
         <oasis:entry colname="col4">42</oasis:entry>
         <oasis:entry colname="col5">84</oasis:entry>
         <oasis:entry colname="col6">163</oasis:entry>
         <oasis:entry colname="col7">323</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">VF entries</oasis:entry>
         <oasis:entry colname="col2">absolute (millions)</oasis:entry>
         <oasis:entry colname="col3">1.8</oasis:entry>
         <oasis:entry colname="col4">5.3</oasis:entry>
         <oasis:entry colname="col5">13.4</oasis:entry>
         <oasis:entry colname="col6">26.2</oasis:entry>
         <oasis:entry colname="col7">40.2</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2">per direction</oasis:entry>
         <oasis:entry colname="col3">17 670</oasis:entry>
         <oasis:entry colname="col4">13 194</oasis:entry>
         <oasis:entry colname="col5">8374</oasis:entry>
         <oasis:entry colname="col6">4099</oasis:entry>
         <oasis:entry colname="col7">1569</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">CVF entries</oasis:entry>
         <oasis:entry colname="col2">absolute (millions)</oasis:entry>
         <oasis:entry colname="col3">3.6</oasis:entry>
         <oasis:entry colname="col4">12.2</oasis:entry>
         <oasis:entry colname="col5">35.9</oasis:entry>
         <oasis:entry colname="col6">92.7</oasis:entry>
         <oasis:entry colname="col7">199.8</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2">per direction</oasis:entry>
         <oasis:entry colname="col3">35 971</oasis:entry>
         <oasis:entry colname="col4">30 523</oasis:entry>
         <oasis:entry colname="col5">22 409</oasis:entry>
         <oasis:entry colname="col6">14 482</oasis:entry>
         <oasis:entry colname="col7">7804</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Ray-tracing calculation</oasis:entry>
         <oasis:entry colname="col2">[s]</oasis:entry>
         <oasis:entry colname="col3">3</oasis:entry>
         <oasis:entry colname="col4">9</oasis:entry>
         <oasis:entry colname="col5">28</oasis:entry>
         <oasis:entry colname="col6">80</oasis:entry>
         <oasis:entry colname="col7">274</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">RTM time-stepping calculation</oasis:entry>
         <oasis:entry colname="col2">[s]</oasis:entry>
         <oasis:entry colname="col3">50</oasis:entry>
         <oasis:entry colname="col4">139</oasis:entry>
         <oasis:entry colname="col5">378</oasis:entry>
         <oasis:entry colname="col6">812</oasis:entry>
         <oasis:entry colname="col7">1545</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d1e8664">The results for the convergence are shown in Fig. <xref ref-type="fig" rid="Ch1.F7"/>, which shows mean absolute differences relative to the reference case with the finest angular resolution (1.125<inline-formula><mml:math id="M332" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>) for the selected radiative fluxes for each face throughout the 24 h long experiment. On double-logarithmic scales the mean deviation in the radiative fluxes are almost linear, with the largest deviation again observed in the SW fluxes. However, compared to the grid resolution, the error made by an overly coarse angular discretization is significantly smaller. Although increasing the angular resolution has relatively low demands on computational resources in comparison to increasing the spatial resolution of the model, the default value of 4.5<inline-formula><mml:math id="M333" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula> provides a reasonable trade-off.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7"><?xmltex \currentcnt{7}?><?xmltex \def\figurename{Figure}?><label>Figure 7</label><caption><p id="d1e8689">Double-logarithmic presentation of mean deviations of surface SW and LW irradiance as well as net radiant flux for different angular resolutions. Mean deviations are shown relative to the finest angular resolution of 1.125<inline-formula><mml:math id="M334" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f07.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Convergence of multiple reflections</title>
      <p id="d1e8716">In order to quantify the appropriate number of reflections for typical urban scenarios, a simulation of the small urban scenario was performed for one time step of a summer daytime simulation with a different number of reflection steps. To evaluate deviations in net radiant flux values, the reference scenario was simulated with an excessive 300 reflection steps, for which all remaining unreflected flux values are almost zero, i.e. below the lowest positive value of the floating-point numerical representation.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8" specific-use="star"><?xmltex \currentcnt{8}?><?xmltex \def\figurename{Figure}?><label>Figure 8</label><caption><p id="d1e8721">A double-logarithmic presentation of potential and actual errors in SW and LW radiation caused by an insufficient number of reflections. The maximum and mean of the remainder of unreflected radiation per surface are shown as lines; the absolute discrepancies of net radiant flux compared to a perfectly reflected scenario are shown by individual points (maximum, 95th percentile and mean). The net flux errors above 15 reflections are zero (below the floating-point resolution), and so are the 95th percentiles of LW error above 8 reflections.</p></caption>
          <?xmltex \igopts{width=455.244094pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f08.png"/>

        </fig>

      <?pagebreak page3113?><p id="d1e8730">The results are shown in Fig. <xref ref-type="fig" rid="Ch1.F8"/>. For SW radiation, the mean net radiant flux error is below 1 <inline-formula><mml:math id="M335" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> after three reflections, and the 95 % quantile of the net flux error and the mean unreflected radiant flux are below 1 <inline-formula><mml:math id="M336" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> after four reflections. For LW radiation, which reflects less in typical scenarios, these respective limits are reached one reflection earlier.<?xmltex \hack{\newpage}?></p>
      <p id="d1e8771">These results support the recommendation to use the default RTM configuration value of three reflection steps for most scenarios. Considering that with the default radiation update interval of 60 s, the RTM uses only a small fraction of time-stepping computational time, the number of reflection steps can be increased to e.g. five with negligible computational costs.</p>
</sec>
<sec id="Ch1.S5.SS4">
  <label>5.4</label><title>Model scalability in large scenarios</title>
      <p id="d1e8782">To verify model scalability, a horizontal scaling experiment was performed on the Salomon supercomputer at IT4Innovations National Supercomputing Centre<fn id="Ch1.Footn3"><p id="d1e8785"><uri>https://www.it4i.cz</uri> (last access: 27 May 2021)</p></fn>. The experiment was based on the small urban scenario of Prague–Holešovice.</p>
      <p id="d1e8791">The original model domain was doubled iteratively in both the <inline-formula><mml:math id="M337" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M338" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> direction, creating a tiled scenario with <inline-formula><mml:math id="M339" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">2</mml:mn><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> rows and <inline-formula><mml:math id="M340" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">2</mml:mn><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> columns (<inline-formula><mml:math id="M341" display="inline"><mml:mrow><mml:msup><mml:mn mathvariant="normal">2</mml:mn><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>n</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> copies) of the original domain for <inline-formula><mml:math id="M342" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo><mml:mi mathvariant="normal">…</mml:mi><mml:mo>,</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula>. Each scenario was simulated using a proportional number of parallel processes, having 32 processes per tile and the total number quadrupling with each iteration. The Salomon supercomputer is composed of individual nodes with 24 CPU cores per node interconnected using the InfiniBand FDR fabric; therefore, the scaling test used multiple nodes, also testing the scalability of remote data exchange.</p>
      <p id="d1e8865">For each domain size, a short 10 min simulation was performed, and the durations of individual tasks from model initialization and model time stepping were recorded together with the number of view factor data entries as a measure of memory complexity. The radiation update interval was 60 s.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2" specific-use="star"><?xmltex \currentcnt{2}?><label>Table 2</label><caption><p id="d1e8872">Scaling of the number of view factor entries.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="7">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="right"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:colspec colnum="7" colname="col7" align="right"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Horizontal grid size (repeated tiles) </oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M343" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M344" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><inline-formula><mml:math id="M345" display="inline"><mml:mrow><mml:mn mathvariant="normal">4</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6"><inline-formula><mml:math id="M346" display="inline"><mml:mrow><mml:mn mathvariant="normal">8</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col7"><inline-formula><mml:math id="M347" display="inline"><mml:mrow><mml:mn mathvariant="normal">16</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">16</mml:mn></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Horizontal grid cells</oasis:entry>
         <oasis:entry colname="col2">thousands</oasis:entry>
         <oasis:entry colname="col3">26</oasis:entry>
         <oasis:entry colname="col4">102</oasis:entry>
         <oasis:entry colname="col5">410</oasis:entry>
         <oasis:entry colname="col6">1638</oasis:entry>
         <oasis:entry colname="col7">6554</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">VF entries</oasis:entry>
         <oasis:entry colname="col2">absolute (millions)</oasis:entry>
         <oasis:entry colname="col3">13</oasis:entry>
         <oasis:entry colname="col4">59</oasis:entry>
         <oasis:entry colname="col5">250</oasis:entry>
         <oasis:entry colname="col6">1025</oasis:entry>
         <oasis:entry colname="col7">4152</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2">per horizontal grid cell</oasis:entry>
         <oasis:entry colname="col3">523</oasis:entry>
         <oasis:entry colname="col4">580</oasis:entry>
         <oasis:entry colname="col5">610</oasis:entry>
         <oasis:entry colname="col6">626</oasis:entry>
         <oasis:entry colname="col7">634</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">CVF entries</oasis:entry>
         <oasis:entry colname="col2">absolute (millions)</oasis:entry>
         <oasis:entry colname="col3">36</oasis:entry>
         <oasis:entry colname="col4">187</oasis:entry>
         <oasis:entry colname="col5">870</oasis:entry>
         <oasis:entry colname="col6">3754</oasis:entry>
         <oasis:entry colname="col7">15 587</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"/>
         <oasis:entry colname="col2">per horizontal grid cell</oasis:entry>
         <oasis:entry colname="col3">1401</oasis:entry>
         <oasis:entry colname="col4">1825</oasis:entry>
         <oasis:entry colname="col5">2125</oasis:entry>
         <oasis:entry colname="col6">2291</oasis:entry>
         <oasis:entry colname="col7">2378</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d1e9096">Table <xref ref-type="table" rid="Ch1.T2"/> lists the number of view factor entries for the horizontally tiled domains. Thanks to the constant maximum number of view factor entries in the angular discretization scheme, the actual number of entries per horizontal grid cell grows only slightly due to mutual visibility among the tiles, allowing less aggregation in more complex scenarios. The number of plant canopy-view factor entries per face could grow proportionally to the mean ray length in the worst case, but the real case shows that, due to shading, the actual number of entries per face only increases moderately with exponentially larger domains.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9"><?xmltex \currentcnt{9}?><?xmltex \def\figurename{Figure}?><label>Figure 9</label><caption><p id="d1e9103">A double-logarithmic presentation of the computation time spent for different sub-tasks while simulating progressively larger domains (by the means of horizontal quadruplication). Each simulation uses a constant number of processes per horizontal tile. The sub-tasks shown are RTM initialization and time stepping along with time stepping of the rest of the model as a reference. Time-stepping time is shown for a 1 d long simulation as extrapolated from the 10 min test simulations.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f09.png"/>

        </fig>

      <p id="d1e9112">The computational time measured by the scalability test is presented in Fig. <xref ref-type="fig" rid="Ch1.F9"/>, split into the initialization phase (which is independent of the length of the simulation) and the actual time-stepping phase.
As can be seen in the log–log plot, the RTM initialization time (ray tracing and data aggregation) is mostly proportional to the horizontal domain size, as expected from the increase in ray-tracing lengths and the amount of interprocess data exchange (see theoretical complexity in Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>). Ray tracing is the most data-exchange-intensive process in model initialization.</p>
      <p id="d1e9119">The temporal scaling of the time-stepping phase of RTM is shown together with the time stepping of the rest of the model as a reference. RTM calculation takes between 2 %–5 % of the time-stepping phase. The largest simulated domain with 8192 parallel processes running on 342 individual nodes displays slight worsening of the scaling curve for both RTM<?pagebreak page3114?> and for the rest of the model, probably due to the growing complexity of interprocess data exchange. Future versions of RTM may be improved for the largest domains thanks to planned optimization of the amount of exchanged radiative flux data (see Sect. 6).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10"><?xmltex \currentcnt{10}?><?xmltex \def\figurename{Figure}?><label>Figure 10</label><caption><p id="d1e9125">A double-logarithmic presentation of computational time versus the number of processes for a small scenario, typically suitable for 16–32 processes.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f10.png"/>

        </fig>

</sec>
<?pagebreak page3115?><sec id="Ch1.S5.SS5">
  <label>5.5</label><title>Efficiency of parallelization</title>
      <p id="d1e9142">Figure <xref ref-type="fig" rid="Ch1.F10"/> shows the efficiency of parallelization for a small domain composed of a single tile of the scaling test domain. A domain of this size should be computed with up to 64 processors for reasonable simulation times, yet we explore an approximately exponential sequence starting with 1 process up to 320 processes, at which point each subdomain has only <inline-formula><mml:math id="M348" display="inline"><mml:mrow><mml:mn mathvariant="normal">10</mml:mn><mml:mo>×</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:math></inline-formula> horizontal grid cells.</p>
      <p id="d1e9159">We can see that between 1–16 processes the parallelization of both the initialization and time-stepping phases is very good, even though the radiative interactions have very strong spatial interdependency, meaning significant mutual data exchange between subdomains. For further increasing the number of processes, both the RTM initialization and the RTM time stepping become less efficient. This is attributed to the relative increase in costs for MPI communication compared to the cost of computations performed on each process, which is in accordance with Amdahl's law of strong scaling. In other words, when the subdomains become too small the speed-up with an increasing number of processes becomes less efficient.</p>
</sec>
<sec id="Ch1.S5.SS6">
  <label>5.6</label><title>Performance in a large realistic urban scenario</title>
      <p id="d1e9170"><xref ref-type="bibr" rid="bib1.bibx34" id="text.45"/> focus on validation of the PALM model on a large urban scenario, which is composed of two nested domains. The outer domain covers an area of 4 km <inline-formula><mml:math id="M349" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 4 km with a resolution of 10 m, and the inner domain has an extent of 1440 m <inline-formula><mml:math id="M350" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> 1440 m and a resolution of 2 m. An example of the simulated radiation for the inner domain is shown in Fig. <xref ref-type="fig" rid="Ch1.F11"/>. The simulation was performed on a cluster with Infiniband EDR interconnection on 880 MPI processes. In this simulation, the RTM initialization took 10 min, and within the 72 h time stepping, the RTM calculation took between 0.5 % and 1.5 % of the time of computation depending on meteorological conditions.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11" specific-use="star"><?xmltex \currentcnt{11}?><?xmltex \def\figurename{Figure}?><label>Figure 11</label><caption><p id="d1e9193">A 3-D representation of instantaneous net SW <inline-formula><mml:math id="M351" display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula> LW radiative fluxes in a large urban scenario. A north-oriented view of the inner domain of the Prague–Dejvice validation scenario.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/3095/2021/gmd-14-3095-2021-f11.png"/>

        </fig>

</sec>
</sec>
<sec id="Ch1.S6" sec-type="conclusions">
  <label>6</label><title>Conclusions</title>
      <p id="d1e9218">This paper gives a description of the significantly updated and extended model RTM 3.0 in PALM. It focuses on new and redesigned features in comparison with RTM 1.0, which was described in <xref ref-type="bibr" rid="bib1.bibx33" id="text.46"/>. Several of the presented methods and algorithms, namely the angular discretization method (Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS4"/>) and the 2-D ray-tracing algorithm (Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>), are novel in the field of microscale atmospheric modelling. All the new features of the model have been designed and implemented as fully integrated in the PALM model, taking into account the specific features and properties of the atmospheric model.</p>
      <p id="d1e9228">Also, sensitivity tests on performance-affecting configuration options (spatial model resolution, resolution of angular discretization and the number of reflection steps) are presented in this study, supporting their recommended configuration for typical urban scenarios. Finally, the applicability of RTM to large real-life scenarios is presented, demonstrating that the computational demands of RTM are in line with other components of the PALM model with respect to domain size.</p>
<sec id="Ch1.S6.SSx1" specific-use="unnumbered">
  <title>Outlook</title>
      <p id="d1e9236">Model validation on large scenarios and long-term experience with various realistic simulations have also identified specific weak points in model representativity and RTM's potential for further improvements <xref ref-type="bibr" rid="bib1.bibx34" id="paren.47"><named-content content-type="pre">see</named-content></xref>. New or improved simulated processes, different representation of model elements, and possibilities for further improvements in computational efficiency and scalability are all included in upcoming development plans for the RTM.</p>
<sec id="Ch1.S6.SSx1.SSSx1" specific-use="unnumbered">
  <title>Fully three-dimensional buildings</title>
      <p id="d1e9249">Several modules in the PALM model, as well as the model core, now support fully 3-D structures with downward-facing faces e.g. at bridges or lateral openings to courtyards. However, in many real-world scenarios overhanging structures are infrequent and only occur at a minor number of grid points. The current ray-tracing algorithms takes advantage of the 2.5-D geometry to improve computational efficiency. Hence, the proposed update will still use the simplifications made for the 2.5-D geometry while enabling the fully 3-D support only at grid points where required.<fn id="Ch1.Footn4"><p id="d1e9252">This feature was not available at the time of the original submission of this paper, but since then it has been implemented as described in RTM version 4.1 starting from r4671: <uri>http://palm-model.org/trac/changeset/4671</uri> (last access: 27 May 2021).</p></fn></p>
</sec>
<sec id="Ch1.S6.SSx1.SSSx2" specific-use="unnumbered">
  <title>Immersed boundary method</title>
      <p id="d1e9264">For now, the representation of obstacles in PALM is fully based on the Cartesian grid; i.e. a grid box is either fully obstacle or fully atmosphere. As a consequence, surfaces that are actually slanted in reality, such as roofs and natural slopes, are represented as step-like surfaces. Beside  implications for microscale flow biasing e.g. the surface friction, such step-like representation increases the total surface area in the model, which affects the amount of radiative flux and adds artificial shading and reflections. Future developments of PALM include the implementation of the immersed boundary method (IBM) <xref ref-type="bibr" rid="bib1.bibx32" id="paren.48"/> that also allows for the representation of slanted surfaces. This will allow us e.g. to represent slanted roofs instead of step-wise roof shapes and allow for a better representation of vertical building walls that are not perfectly aligned with the horizontal numerical grid. The implementation of IBM will thus also include changes in the ray-tracing algorithm in RTM wherein the surfaces may not necessarily be aligned parallel to the numerical grid axes.</p>
</sec>
<?pagebreak page3116?><sec id="Ch1.S6.SSx1.SSSx3" specific-use="unnumbered">
  <title>Specular reflections</title>
      <p id="d1e9276">All reflections are treated as Lambertian, i.e. fully diffuse, in the current version of RTM. Surfaces with mainly specular reflections, such as glass and polished metal surfaces, thus cannot be represented realistically. Multiple ways to implement specular reflections in RTM have been considered, but the feature would be of limited use with a strictly Cartesian grid; therefore, the decision on how to implement specular reflections is being postponed after the implementation of immersed boundary conditions.</p>
</sec>
<sec id="Ch1.S6.SSx1.SSSx4" specific-use="unnumbered">
  <title>Localized ray tracing</title>
      <p id="d1e9286">In the current parallelization of ray tracing, the rays are traced as a whole in the process which owns the subdomain of the ray's target. This has many computational advantages (see Sect. <xref ref-type="sec" rid="Ch1.S3"/>), but for very large domains with a lot of plant canopy it leads to a large number of MPI calls, which can slow down ray tracing substantially. Also, a proposed change for very large domains wherein the global terrain elevation would not be copied to each process would further increase MPI communication in ray tracing.</p>
      <p id="d1e9291">A substantial change in the ray-tracing algorithm is being considered, whereby each ray would be divided among segments belonging to individual subdomains. The process owning the subdomain of the ray's target would successively ask the respective processes that own other segments of the ray to perform the ray tracing of those segments, and it would aggregate the results. However, this algorithm could be significantly slower for small domains. The advantages and disadvantages need to be verified, and the new algorithm can be implemented as an optional alternative to the current ray-tracing algorithm, possibly with automatic switching.</p>
</sec>
<sec id="Ch1.S6.SSx1.SSSx5" specific-use="unnumbered">
  <title>Improved absorption of radiation in the plant canopy</title>
      <p id="d1e9300">In the current implementation, the leaves in the plant canopy are considered randomly oriented, as discussed in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS1"/>. A non-spherical leaf orientation distribution could be used, provided that such information is available with sufficient resolution. Yet the temporal variability related mostly to wind speed and direction would still not be available due to the fact that ray tracing is done in advance.</p>
      <p id="d1e9305">Another considered change is related to absorption of direct solar radiation. In the current implementation, the radiative fluxes absorbed in the plant canopy are discretized differently for the direct solar radiation and for other radiative fluxes (diffuse, reflected and emitted radiation). A separate ray-tracing cycle is performed to calculate ray transmittances for the discretized apparent solar positions for each PCGB and a sub-grid model used for the direct solar irradiance (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS3"/>), while for other fluxes, only the attenuation of the rays to and from faces is considered; therefore, no extra ray tracing is necessary.</p>
      <p id="d1e9310">The proposed change also uses a similar approach for the direct irradiance of the plant canopy – using only the attenuation of the rays to and from faces. This approach has multiple benefits: it avoids extra ray tracing, which can take a significant amount of time for large domains with a lot of plant canopy; it unifies the discretization for all radiative fluxes in the plant canopy, and it guarantees that the total plant canopy heat flux from direct solar irradiance equals the sum of the irradiance deficit at surfaces caused by partial shading from<?pagebreak page3117?> the plant canopy. However, it neglects the absorbed fluxes from rays that would pass the domain without striking any surface. This is only relevant for plant canopy near domain boundaries; on the other hand, such areas always suffer from a lack of simulated radiative interaction with elements outside the domain, and they cannot be considered representative anyway. Another potential problem is a risk of the Moiré effect in the spatial distribution of plant canopy heat flux, which needs to be examined in realistic scenarios.</p>
      <p id="d1e9313">In addition to that, the magnitude of the error induced by neglecting SW radiation scattered by plant leaves towards directions other than the direction of the incoming radiation is being studied. The actual significance of this is strongly dependent on the structure of the plant canopy and its surroundings. Possible improvements of the model in this regard are being considered, and the impact on model performance versus the significance of the error is being evaluated.</p>
</sec>
<sec id="Ch1.S6.SSx1.SSSx6" specific-use="unnumbered">
  <title>Optimized data exchange in time stepping</title>
      <p id="d1e9322">Current implementation of interprocess data exchange in time stepping uses the MPI <monospace>gather</monospace> operation, which distributes radiosities of all surfaces among all MPI processes. The <monospace>gather</monospace> operation takes advantage of tree topology exchange patterns in modern MPI implementations (e.g. MVAPICH, Intel MPI), which makes it efficient and avoids complex data routing. The downside is increased memory complexity for very large scenarios (each process needs to hold arrays for all faces).</p>
      <p id="d1e9331">Two different approaches are currently being considered to improve the scalability of this particular code. The first one takes advantage of the fact that typical simulations are performed on clusters with many CPU cores per node; selected arrays can be allocated in shared memory with local access for all MPI processes running on the particular node, avoiding the need to allocate identical global arrays for each process and reducing intra-node communication.</p>
      <p id="d1e9334">The other considered approach involves creating a face visibility mapping among MPI processes; each process allocates an array of visible faces from other subdomains that are grouped and ordered by MPI process rank and exchange a minimum amount radiosity data using the MPI <monospace>alltoall</monospace> operation. The disadvantage of this approach is more complex data mapping and routing. The two proposed approaches need to be evaluated on different-sized domains and compared with the current implementation.</p><?xmltex \hack{\clearpage}?>
</sec>
</sec>
</sec>

      
      </body>
    <back><app-group>

<?pagebreak page3118?><app id="App1.Ch1.S1">
  <?xmltex \currentcnt{A}?><label>Appendix A</label><title>List of quantities</title>

<?xmltex \floatpos{h!}?><table-wrap id="App1.Ch1.S1.T3"><oasis:table frame="topbot"><oasis:tgroup cols="4">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="left"/>
     <oasis:colspec colnum="4" colname="col4" align="justify" colwidth="10.5cm"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col2">Quantity </oasis:entry>
         <oasis:entry colname="col3">Unit</oasis:entry>
         <oasis:entry colname="col4">Description</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M352" display="inline"><mml:mi mathvariant="normal">Φ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Radiant flux</oasis:entry>
         <oasis:entry colname="col3">W</oasis:entry>
         <oasis:entry colname="col4">Radiant power (energy per unit of time) of the respective process (emitted, reflected or absorbed by the described surface or object)</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M353" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Radiosity</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M354" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Radiant flux leaving a surface per unit of area</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M355" display="inline"><mml:mi>E</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Irradiance</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M356" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Radiant flux received by a surface per unit of area</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M357" display="inline"><mml:mi>M</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Radiant exitance</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M358" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Thermal radiant flux emitted by a surface per unit of area</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M359" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>→</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">VF</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M360" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">View factor from face <inline-formula><mml:math id="M361" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> towards face <inline-formula><mml:math id="M362" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>. See definition in Sect. <xref ref-type="sec" rid="Ch1.S2.SS1"/></oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M363" display="inline"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">SVF</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M364" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Sky-view factor at face <inline-formula><mml:math id="M365" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>; see definition in Sect. <xref ref-type="sec" rid="Ch1.S2.SS3"/></oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M366" display="inline"><mml:mrow><mml:msubsup><mml:mi>F</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow><mml:mi mathvariant="normal">c</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">CVF</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M367" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Canopy-view factor for PCGB <inline-formula><mml:math id="M368" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> from face <inline-formula><mml:math id="M369" display="inline"><mml:mi>j</mml:mi></mml:math></inline-formula>; see definition in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4.SSS1"/></oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M370" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Ray transmittance</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M371" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">The ratio of the radiant flux transmitted (passed through) a partially transparent object to the radiant flux carried by the ray at the point at which it enters the object</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M372" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">LAD</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M373" display="inline"><mml:mrow class="unit"><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">Leaf area density; the ratio of total (one-sided) area of all plant leaves per unit of occupied volume</oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M374" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Area</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M375" display="inline"><mml:mrow class="unit"><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M376" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Absolute temperature</oasis:entry>
         <oasis:entry colname="col3">K</oasis:entry>
         <oasis:entry colname="col4"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1"><inline-formula><mml:math id="M377" display="inline"><mml:mi mathvariant="italic">ε</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Emissivity</oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M378" display="inline"><mml:mn mathvariant="normal">1</mml:mn></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4">The ratio of LW radiation emitted or absorbed by a surface to that of an ideal black body</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M379" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry namest="col2" nameend="col3">Stefan–Boltzmann constant </oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M380" display="inline"><mml:mrow><mml:mo>≈</mml:mo><mml:mn mathvariant="normal">5.67037</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">8</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M381" display="inline"><mml:mrow class="unit"><mml:mi mathvariant="normal">W</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msup><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:msup><mml:mi mathvariant="normal">K</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \hack{\clearpage}?>
</app>
  </app-group><notes notes-type="codeavailability"><title>Code availability</title>

      <p id="d1e9861">RTM 3.0, as part of the PALM model, is free software. Its source code is distributed under the GNU General Public License version 3 (<uri>https://www.gnu.org/licenses/gpl-3.0.html</uri>, last access: 27 May 2021), and it can be downloaded from the PALM website (<uri>http://palm-model.org</uri>, last access: 27 May 2021, <xref ref-type="bibr" rid="bib1.bibx25" id="altparen.49"/>). The code is managed in an SVN repository. The simulations presented in Sect. <xref ref-type="sec" rid="Ch1.S5"/> were performed with SVN revision 4285, and the code for the RTM, LSM, BSM, PCM and BIO modules is available in the Supplement.</p>
  </notes><app-group>
        <supplementary-material position="anchor"><p id="d1e9875">The supplement related to this article is available online at: <inline-supplementary-material xlink:href="https://doi.org/10.5194/gmd-14-3095-2021-supplement" xlink:title="zip">https://doi.org/10.5194/gmd-14-3095-2021-supplement</inline-supplementary-material>.</p></supplementary-material>
        </app-group><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e9884">PK and JR are the core authors of the methods, algorithms and implementation of the RTM, including the coupling to the BSM, PCM and BIO modules. MS is the author of RTM integration to the PALM radiation module as well as the coupling to the BSM and LSM modules. SeS and MHS created and validated the RTM coupling with the forcing radiation model. VF is the author of the evapotranspiration and latent heat flux model. All authors contributed to the text of the article, as well as to debugging, validation and maintenance related to the RTM.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e9890">The authors declare no competing interests.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e9897">The simulations were performed on the HPC infrastructure of the Institute of Computer Science of the Czech Academy of Sciences (ICS) supported by the long-term strategic development financing of the ICS (RVO:67985807) and partly in the IT4I supercomputing centre, which was supported by the Ministry of Education, Youth and Sports from the Large Infrastructures for Research, Experimental Development and Innovations under project “IT4Innovations National Supercomputing Center – LM2015070”.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e9902">Financial support was provided by the Operational Program Prague – Growth Pole of the Czech Republic under the project “Urbanization of weather forecast, air-quality prediction and climate scenarios for Prague” (CZ.07.1.02/0.0/0.0/16_040/0000383), which is co-financed by the EU. The co-authors Matthias Sühring, Sebastian Schubert and Mohamed H. Salim were supported by the Federal German Ministry of Education and Research (BMBF) under grant 01LP1601 within the framework of Research for Sustainable Development (FONA; <uri>https://www.fona.de/de/</uri>, last access: 27 May 2021).
Financial support was also provided by the Norway Grants and Technology Agency of the Czech Republic project TO01000219: “Turbulent-resolving urban modeling of air quality and thermal comfort”.</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e9911">This paper was edited by Leena Järvi and reviewed by two anonymous referees.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><?xmltex \def\ref@label{{Belda et~al.(2020)}}?><label>Belda et al.(2020)</label><?label Belda2020?><mixed-citation>Belda, M., Resler, J., Geletič, J., Krč, P., Maronga, B., Sühring, M., Kurppa, M., Kanani-Sühring, F., Fuka, V., Eben, K., Benešová, N., and Auvinen, M.: Sensitivity analysis of the PALM model system 6.0 in the urban environment, Geosci. Model Dev. Discuss. [preprint], <ext-link xlink:href="https://doi.org/10.5194/gmd-2020-126" ext-link-type="DOI">10.5194/gmd-2020-126</ext-link>, in review, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Boland et~al.(2008)}}?><label>Boland et al.(2008)</label><?label Boland&al2008?><mixed-citation>
Boland, J., Ridley, B., and Brown, B.: Models of diffuse solar radiation,
Renew. Energy, 33, 575–584, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx3"><?xmltex \def\ref@label{{Brown and Covey(1966)}}?><label>Brown and Covey(1966)</label><?label brown1966energy?><mixed-citation>
Brown, K. W. and Covey, W.: The energy-budget evaluation of the
micrometeorological transfer processes within a cornfield, Agr.
Meteorol., 3, 73–96, 1966.</mixed-citation></ref>
      <ref id="bib1.bibx4"><?xmltex \def\ref@label{{Clough et~al.(2005)}}?><label>Clough et al.(2005)</label><?label Clough&al2005?><mixed-citation>Clough, S., Shephard, M., Mlawer, E., Delamere, J., Iacono, M., Cady-Pereira,
K., Boukabara, S., and Brown, P.: Atmospheric radiative transfer modeling: a
summary of the AER codes, J. Quant. Spectrosc. Ra., 91, 233–244,
<ext-link xlink:href="https://doi.org/10.1016/j.jqsrt.2004.05.058" ext-link-type="DOI">10.1016/j.jqsrt.2004.05.058</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx5"><?xmltex \def\ref@label{{Dai et~al.(2003)}}?><label>Dai et al.(2003)</label><?label dai2003common?><mixed-citation>
Dai, Y., Zeng, X., Dickinson, R. E., Baker, I., Bonan, G. B., Bosilovich,
M. G., Denning, A. S., Dirmeyer, P. A., Houser, P. R., Niu, G., Oleson, K. W., Schlosser, C. A., and Yang, Z.-L.: The
common land model, B. Am. Meteorol. Soc., 84,
1013–1024, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx6"><?xmltex \def\ref@label{{Daudet et~al.(1999)}}?><label>Daudet et al.(1999)</label><?label daudet1999wind?><mixed-citation>
Daudet, F., Le Roux, X., Sinoquet, H., and Adam, B.: Wind speed and leaf
boundary layer conductance variation within tree crown: consequences on
leaf-to-atmosphere coupling and tree functions, Agr. Forest
Meteorol., 97, 171–185, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx7"><?xmltex \def\ref@label{{Franke et~al.(2012)}}?><label>Franke et al.(2012)</label><?label franke2012?><mixed-citation>
Franke, J., Sturm, M., and Kalmbach, C.: Validation of OpenFOAM 1.6. x with the German VDI guideline for obstacle resolving micro-scale models, J. Wind Eng. Ind. Aerod., 104, 350–359, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx8"><?xmltex \def\ref@label{{Fr\"{o}hlich and Matzarakis(2019)}}?><label>Fröhlich and Matzarakis(2019)</label><?label Frolich2019?><mixed-citation>Fröhlich, D. and Matzarakis, A.: Calculating human thermal comfort and thermal stress in the PALM model system 6.0, Geosci. Model Dev., 13, 3055–3065, <ext-link xlink:href="https://doi.org/10.5194/gmd-13-3055-2020" ext-link-type="DOI">10.5194/gmd-13-3055-2020</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx9"><?xmltex \def\ref@label{{Fr{\"{u}}h et~al.(2011)}}?><label>Früh et al.(2011)</label><?label fruh2011?><mixed-citation>
Früh, B., Becker, P., Deutschländer, T., Hessel, J.-D., Kossmann, M.,
Mieskes, I., Namyslo, J., Roos, M., Sievers, U., Steigerwald, T., Turau, H., and Wienert, U.:
Estimation of climate-change impacts on the urban heat load using an urban
climate model and regional climate projections, J. Appl.
Meteorol. Climatol., 50, 167–184, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx10"><?xmltex \def\ref@label{{Gebhart(1971)}}?><label>Gebhart(1971)</label><?label Gebhart1971?><mixed-citation>
Gebhart, B.: Heat transfer, McGraw Hill, New York, 2 edn., 1971.</mixed-citation></ref>
      <ref id="bib1.bibx11"><?xmltex \def\ref@label{{Geleti{\v{c}} et~al.(2021)}}?><label>Geletič et al.(2021)</label><?label geletic2021?><mixed-citation>Geletič, J., Lehnert, M., Krč, P., Resler, J., and Krayenhoff,
E. S.: High-Resolution Modelling of Thermal Exposure during a Hot Spell: A
Case Study Using PALM-4U in Prague, Czech Republic, Atmosphere, 12, 175,
<ext-link xlink:href="https://doi.org/10.3390/atmos12020175" ext-link-type="DOI">10.3390/atmos12020175</ext-link>, 2021.</mixed-citation></ref>
      <ref id="bib1.bibx12"><?xmltex \def\ref@label{{Grimmond et~al.(2010)}}?><label>Grimmond et al.(2010)</label><?label Grimmond2010?><mixed-citation>Grimmond, C. S. B., Blackett, M., Best, M. J., Barlow, J., Baik, J.-J.,
Belcher, S. E., Bohnenstengel, S. I., Calmet, I., Chen, F., Dandou, A.,
Fortuniak, K., Gouvea, M. L., Hamdi, R., Hendry, M., Kawai, T., Kawamoto, Y.,
Kondo, H., Krayenhoff, E. S., Lee, S.-H., Loridan, T., Martilli, A., Masson,
V., Miao, S., Oleson, K., Pigeon, G., Porson, A., Ryu, Y.-H., Salamanca, F.,
Shashua-Bar, L., Steeneveld, G.-J., Tombrou, M., Voogt,<?pagebreak page3120?> J. A., Young, D., and
Zhang, N.: The International Urban Energy Balance Models Comparison Project:
First results from Phase 1, J. Appl.
Meteorol. Climatol., 49, 1268–1292, <ext-link xlink:href="https://doi.org/10.1175/2010JAMC2354.1" ext-link-type="DOI">10.1175/2010JAMC2354.1</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx13"><?xmltex \def\ref@label{{Gross(2012)}}?><label>Gross(2012)</label><?label gross2012?><mixed-citation>
Gross, G.: Effects of different vegetation on temperature in an urban building
environment. Micro-scale numerical experiments, Meteorol. Z., 21, 399–412, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx14"><?xmltex \def\ref@label{{Hamilton and Morgan(1952)}}?><label>Hamilton and Morgan(1952)</label><?label Hamilton1952?><mixed-citation>
Hamilton, D. C. and Morgan, W. R.: Radiant-interchange configuration factors,
Tech. rep., National Advisory Committee For Aeronautics, 1952.</mixed-citation></ref>
      <ref id="bib1.bibx15"><?xmltex \def\ref@label{{Heus et~al.(2010)}}?><label>Heus et al.(2010)</label><?label Heus&al2010?><mixed-citation>Heus, T., van Heerwaarden, C. C., Jonker, H. J. J., Pier Siebesma, A., Axelsen, S., van den Dries, K., Geoffroy, O., Moene, A. F., Pino, D., de Roode, S. R., and Vilà-Guerau de Arellano, J.: Formulation of the Dutch Atmospheric Large-Eddy Simulation (DALES) and overview of its applications, Geosci. Model Dev., 3, 415–444, <ext-link xlink:href="https://doi.org/10.5194/gmd-3-415-2010" ext-link-type="DOI">10.5194/gmd-3-415-2010</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx16"><?xmltex \def\ref@label{{Huttner and Bruse(2009)}}?><label>Huttner and Bruse(2009)</label><?label huttner2009?><mixed-citation>
Huttner, S. and Bruse, M.: Numerical modeling of the urban climate–a preview
on ENVI-met 4.0, in: 7th international conference on urban climate ICUC-7,
Yokohama, Japan, vol. 29, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx17"><?xmltex \def\ref@label{{Kim et~al.(2020)Kim, Lee, Kim, Park, and Lee}}?><label>Kim et al.(2020)Kim, Lee, Kim, Park, and Lee</label><?label kim2020?><mixed-citation>Kim, D.-J., Lee, D.-I., Kim, J.-J., Park, M.-S., and Lee, S.-H.: Development of a Building-Scale Meteorological Prediction System Including a Realistic
Surface Heating, Atmosphere, 11, 67, <ext-link xlink:href="https://doi.org/10.3390/atmos11010067" ext-link-type="DOI">10.3390/atmos11010067</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx18"><?xmltex \def\ref@label{{Kondo et~al.(2005)}}?><label>Kondo et al.(2005)</label><?label Kondo2005?><mixed-citation>Kondo, H., Genchi, Y., Kikegawa, Y., Ohashi, Y., Yoshikado, H., and Komiyama,
H.: Development of a Multi-Layer Urban Canopy Model for the Analysis of
Energy Consumption in a Big City: Structure of the Urban Canopy Model and its
Basic Performance, Bound.-Lay. Meteorol., 116, 395–421,
<ext-link xlink:href="https://doi.org/10.1007/s10546-005-0905-5" ext-link-type="DOI">10.1007/s10546-005-0905-5</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{{Krayenhoff et~al.(2014)}}?><label>Krayenhoff et al.(2014)</label><?label krayenhoff2014?><mixed-citation>
Krayenhoff, E., Christen, A., Martilli, A., and Oke, T.: A multi-layer
radiation model for urban neighbourhoods with trees, Bound.-Lay. Meteorol., 151, 139–178, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx20"><?xmltex \def\ref@label{{Krayenhoff and Voogt(2007)}}?><label>Krayenhoff and Voogt(2007)</label><?label Krayenhoff&Voogt2007?><mixed-citation>Krayenhoff, E. S. and Voogt, J. A.: A microscale three-dimensional urban energy balance model for studying surface temperatures, Bound.-Lay. Meteorol., 123, 433–461, <ext-link xlink:href="https://doi.org/10.1007/s10546-006-9153-6" ext-link-type="DOI">10.1007/s10546-006-9153-6</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx21"><?xmltex \def\ref@label{{Kr\v{c}(2019)}}?><label>Krč(2019)</label><?label krc2019thesis?><mixed-citation>
Krč, P.: Improved methods of weather forecasting applied in transportation, PhD thesis, Czech Technical University in Prague, Faculty of Transportation Sciences, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx22"><?xmltex \def\ref@label{{Kusaka et~al.(2001)}}?><label>Kusaka et al.(2001)</label><?label Kusaka2001?><mixed-citation>Kusaka, H., Kondo, H., Kikegawa, Y., and Kimura, F.: A Simple Single-Layer
Urban Canopy Model For Atmospheric Models: Comparison With Multi-Layer And
Slab Models, Bound.-Lay. Meteorol., 101, 329–358,
<ext-link xlink:href="https://doi.org/10.1023/A:1019207923078" ext-link-type="DOI">10.1023/A:1019207923078</ext-link>, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx23"><?xmltex \def\ref@label{{Lee and Lee(2020)}}?><label>Lee and Lee(2020)</label><?label Lee2020?><mixed-citation>Lee, D.-I. and Lee, S.-H.: The Microscale Urban Surface Energy (MUSE) Model
for Real Urban Application, Atmosphere, 11, 1347,
<ext-link xlink:href="https://doi.org/10.3390/atmos11121347" ext-link-type="DOI">10.3390/atmos11121347</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx24"><?xmltex \def\ref@label{{Lee and Park(2008)}}?><label>Lee and Park(2008)</label><?label Lee2008?><mixed-citation>Lee, S.-H. and Park, S.-U.: A Vegetated Urban Canopy Model for Meteorological
and Environmental Modelling, Bound.-Lay. Meteorol., 126, 73–102,
<ext-link xlink:href="https://doi.org/10.1007/s10546-007-9221-6" ext-link-type="DOI">10.1007/s10546-007-9221-6</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx25"><?xmltex \def\ref@label{{Leibniz University Hannover and other PALM co-creators(2021)}}?><label>Leibniz University Hannover and other PALM co-creators(2021)</label><?label PALM2021?><mixed-citation>Leibniz University Hannover and other PALM co-creators: The PALM model system website, available at: <uri>http://palm-model.org</uri>,
last access: 27 May 2021.</mixed-citation></ref>
      <ref id="bib1.bibx26"><?xmltex \def\ref@label{{Maronga et~al.(2015)}}?><label>Maronga et al.(2015)</label><?label Maronga&al2015?><mixed-citation>Maronga, B., Gryschka, M., Heinze, R., Hoffmann, F., Kanani-Sühring, F., Keck, M., Ketelsen, K., Letzel, M. O., Sühring, M., and Raasch, S.: The Parallelized Large-Eddy Simulation Model (PALM) version 4.0 for atmospheric and oceanic flows: model formulation, recent developments, and future perspectives, Geosci. Model Dev., 8, 2515–2551, <ext-link xlink:href="https://doi.org/10.5194/gmd-8-2515-2015" ext-link-type="DOI">10.5194/gmd-8-2515-2015</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx27"><?xmltex \def\ref@label{{Maronga et~al.(2020)}}?><label>Maronga et al.(2020)</label><?label Maronga2020?><mixed-citation>Maronga, B., Banzhaf, S., Burmeister, C., Esch, T., Forkel, R., Fröhlich, D., Fuka, V., Gehrke, K. F., Geletič, J., Giersch, S., Gronemeier, T., Groß, G., Heldens, W., Hellsten, A., Hoffmann, F., Inagaki, A., Kadasch, E., Kanani-Sühring, F., Ketelsen, K., Khan, B. A., Knigge, C., Knoop, H., Krč, P., Kurppa, M., Maamari, H., Matzarakis, A., Mauder, M., Pallasch, M., Pavlik, D., Pfafferott, J., Resler, J., Rissmann, S., Russo, E., Salim, M., Schrempf, M., Schwenkel, J., Seckmeyer, G., Schubert, S., Sühring, M., von Tils, R., Vollmer, L., Ward, S., Witha, B., Wurps, H., Zeidler, J., and Raasch, S.: Overview of the PALM model system 6.0, Geosci. Model Dev., 13, 1335–1372, <ext-link xlink:href="https://doi.org/10.5194/gmd-13-1335-2020" ext-link-type="DOI">10.5194/gmd-13-1335-2020</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx28"><?xmltex \def\ref@label{{Martilli et~al.(2002)}}?><label>Martilli et al.(2002)</label><?label Martilli2002?><mixed-citation>Martilli, A., Clappier, A., and Rotach, M. W.: An urban surface exchange
parameterisation for mesoscale models, Bound.-Lay. Meteorol., 104,
261–304, <ext-link xlink:href="https://doi.org/10.1023/A:1016099921195" ext-link-type="DOI">10.1023/A:1016099921195</ext-link>, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx29"><?xmltex \def\ref@label{{Masson(2000)}}?><label>Masson(2000)</label><?label Masson2000?><mixed-citation>Masson, V.: A Physically-Based Scheme For The Urban Energy Budget In
Atmospheric Models, Bound.-Lay. Meteorol., 94, 357–397,
<ext-link xlink:href="https://doi.org/10.1023/A:1002463829265" ext-link-type="DOI">10.1023/A:1002463829265</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx30"><?xmltex \def\ref@label{{Mussetti et~al.(2020)}}?><label>Mussetti et al.(2020)</label><?label Mussetti2019b?><mixed-citation>Mussetti, G., Brunner, D., Henne, S., Allegrini, J., Krayenhoff, E. S., Schubert, S., Feigenwinter, C., Vogt, R., Wicki, A., and Carmeliet, J.: COSMO-BEP-Tree v1.0: a coupled urban climate model with explicit representation of street trees, Geosci. Model Dev., 13, 1685–1710, <ext-link xlink:href="https://doi.org/10.5194/gmd-13-1685-2020" ext-link-type="DOI">10.5194/gmd-13-1685-2020</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx31"><?xmltex \def\ref@label{{Ngao et~al.(2017)}}?><label>Ngao et al.(2017)</label><?label ngao2017intra?><mixed-citation>
Ngao, J., Adam, B., and Saudreau, M.: Intra-crown spatial variability of leaf
temperature and stomatal conductance enhanced by drought in apple tree as
assessed by the RATP model, Agr. Forest Meteorol., 237,
340–354, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx32"><?xmltex \def\ref@label{{Peskin(1972)}}?><label>Peskin(1972)</label><?label Peskin1972?><mixed-citation>Peskin, C. S.: Flow patterns around heart valves: A numerical method, J. Comput. Phys., 10, 252–271, <ext-link xlink:href="https://doi.org/10.1016/0021-9991(72)90065-4" ext-link-type="DOI">10.1016/0021-9991(72)90065-4</ext-link>,
1972.</mixed-citation></ref>
      <ref id="bib1.bibx33"><?xmltex \def\ref@label{{Resler et~al.(2017)}}?><label>Resler et al.(2017)</label><?label Resler2017?><mixed-citation>Resler, J., Krč, P., Belda, M., Juruš, P., Benešová, N., Lopata, J., Vlček, O., Damašková, D., Eben, K., Derbek, P., Maronga, B., and Kanani-Sühring, F.: PALM-USM v1.0: A new urban surface model integrated into the PALM large-eddy simulation model, Geosci. Model Dev., 10, 3635–3659, <ext-link xlink:href="https://doi.org/10.5194/gmd-10-3635-2017" ext-link-type="DOI">10.5194/gmd-10-3635-2017</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{{Resler et~al.(2020)}}?><label>Resler et al.(2020)</label><?label Resler2020?><mixed-citation>Resler, J., Eben, K., Geletič, J., Krč, P., Rosecký, M., Sühring, M., Belda, M., Fuka, V., Halenka, T., Huszár, P., Karlický, J., Benešová, N., Ďoubalová, J., Honzáková, K., Keder, J., Nápravníková, Š., and Vlček, O.: Validation of the PALM model system 6.0 in real urban environment; case study of Prague-Dejvice, Czech Republic, Geosci. Model Dev. Discuss. [preprint], <ext-link xlink:href="https://doi.org/10.5194/gmd-2020-175" ext-link-type="DOI">10.5194/gmd-2020-175</ext-link>, in review, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{Salim et~al.(2018)}}?><label>Salim et al.(2018)</label><?label Salim2017?><mixed-citation>Salim, M. H., Schlünzen, K. H., Grawe, D., Boettcher, M., Gierisch, A. M. U., and Fock, B. H.: The microscale obstacle-resolving meteorological model MITRAS v2.0: model theory, Geosci. Model Dev., 11, 3427–3445, <ext-link xlink:href="https://doi.org/10.5194/gmd-11-3427-2018" ext-link-type="DOI">10.5194/gmd-11-3427-2018</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{{Salim et~al.(2020)Salim, Schubert, Resler, Kr\v{c}, Maronga,
Kanani-S\"{u}hring, S\"{u}hring, and Schneider}}?><label>Salim et al.(2020)Salim, Schubert, Resler, Krč, Maronga,
Kanani-Sühring, Sühring, and Schneider</label><?label Salim2020?><mixed-citation>Salim, M. H., Schubert, S., Resler, J., Krč, P., Maronga, B., Kanani-Sühring, F., Sühring, M., and Schneider, C.: Importance of radiative transfer processes in urban climate models: A study based on the PALM model system 6.0, Geosci. Model Dev. Discuss. [preprint], <ext-link xlink:href="https://doi.org/10.5194/gmd-2020-94" ext-link-type="DOI">10.5194/gmd-2020-94</ext-link>, in review, 2020.</mixed-citation></ref>
      <?pagebreak page3121?><ref id="bib1.bibx37"><?xmltex \def\ref@label{{Schubert et~al.(2012)}}?><label>Schubert et al.(2012)</label><?label Schubert2012?><mixed-citation>Schubert, S., Grossman-Clarke, S., and Martilli, A.: A Double-Canyon Radiation Scheme for Multi-Layer Urban Canopy Models, Bound.-Lay. Meteorol., 145, 439–468, <ext-link xlink:href="https://doi.org/10.1007/s10546-012-9728-3" ext-link-type="DOI">10.1007/s10546-012-9728-3</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx38"><?xmltex \def\ref@label{{Sparrow and Cess(1978)}}?><label>Sparrow and Cess(1978)</label><?label Sparrow1978?><mixed-citation>
Sparrow, E. M. and Cess, R. D.: Radiation heat transfer, Hemisphere Publishing Corporation, augmented edition, 1978.</mixed-citation></ref>
      <ref id="bib1.bibx39"><?xmltex \def\ref@label{{Stewart(1988)}}?><label>Stewart(1988)</label><?label stewart1988modelling?><mixed-citation>
Stewart, J.: Modelling surface conductance of pine forest, Agr.
Forest Meteorol., 43, 19–35, 1988.</mixed-citation></ref>
      <ref id="bib1.bibx40"><?xmltex \def\ref@label{{Swenson et~al.(2019)}}?><label>Swenson et al.(2019)</label><?label Swenson2019?><mixed-citation>Swenson, S. C., Burns, S. P., and Lawrence, D. M.: The Impact of Biomass Heat
Storage on the Canopy Energy Balance and Atmospheric Stability in the
Community Land Model, J. Adv. Model. Earth Sy., 11,
83–98, <ext-link xlink:href="https://doi.org/10.1029/2018ms001476" ext-link-type="DOI">10.1029/2018ms001476</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{{Tang et~al.(2020)}}?><label>Tang et al.(2020)</label><?label tang2020review?><mixed-citation>Tang, H., Haynes, R., and Houzeaux, G.: A Review of Domain Decomposition
Methods for Simulation of Fluid Flows: Concepts, Algorithms, and
Applications, Arch. Computat. Method. E., <ext-link xlink:href="https://doi.org/10.1007/s11831-019-09394-0" ext-link-type="DOI">10.1007/s11831-019-09394-0</ext-link>, 2020.</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx42"><?xmltex \def\ref@label{{Van~Wijk et~al.(2000)}}?><label>Van Wijk et al.(2000)</label><?label van2000modeling?><mixed-citation>
Van Wijk, M., Dekker, S., Bouten, W., Bosveld, F., Kohsiek, W., Kramer, K., and Mohren, G.: Modeling daily gas exchange of a Douglas-fir forest: comparison of three stomatal conductance models with and without a soil water stress function, Tree Physiol., 20, 115–122, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx43"><?xmltex \def\ref@label{{Wang and Jarvis(1990)}}?><label>Wang and Jarvis(1990)</label><?label wang1990influence?><mixed-citation>
Wang, Y. and Jarvis, P.: Influence of crown structural properties on PAR
absorption, photosynthesis, and transpiration in Sitka spruce: application of
a model (MAESTRO), Tree Physiol., 7, 297–316, 1990.</mixed-citation></ref>
      <ref id="bib1.bibx44"><?xmltex \def\ref@label{{Yang and Li(2013)}}?><label>Yang and Li(2013)</label><?label yang2013?><mixed-citation>
Yang, X. and Li, Y.: Development of a three-dimensional urban energy model for predicting and understanding surface temperature distribution, Bound.-Lay. Meteorol., 149, 303–321, 2013.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Radiative Transfer Model 3.0 integrated into the PALM model system 6.0</article-title-html>
<abstract-html><p>The Radiative Transfer Model (RTM) is an explicitly resolved three-dimensional multi-reflection radiation model integrated into the PALM modelling system. It is responsible for modelling complex radiative interactions within the urban canopy. It represents a key component in modelling energy transfer inside the urban layer and consequently PALM's ability to provide explicit simulations of the urban canopy at metre-scale resolution. This paper presents RTM version 3.0, which is integrated into the PALM modelling system version 6.0. This version of RTM has been substantially improved over previous versions. A more realistic representation is enabled by the newly simulated processes, e.g. the interaction of longwave radiation with the plant canopy, evapotranspiration and latent heat flux, calculation of mean radiant temperature, and bidirectional interaction with the radiation forcing model. The new version also features novel discretization schemes and algorithms, namely the angular discretization and the azimuthal ray tracing, which offer significantly improved scalability and computational efficiency, enabling larger parallel simulations. It has been successfully tested on a realistic urban scenario with a horizontal size of over 6 million grid points using 8192 parallel processes.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Belda et al.(2020)</label><mixed-citation>
Belda, M., Resler, J., Geletič, J., Krč, P., Maronga, B., Sühring, M., Kurppa, M., Kanani-Sühring, F., Fuka, V., Eben, K., Benešová, N., and Auvinen, M.: Sensitivity analysis of the PALM model system 6.0 in the urban environment, Geosci. Model Dev. Discuss. [preprint], <a href="https://doi.org/10.5194/gmd-2020-126" target="_blank">https://doi.org/10.5194/gmd-2020-126</a>, in review, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Boland et al.(2008)</label><mixed-citation>
Boland, J., Ridley, B., and Brown, B.: Models of diffuse solar radiation,
Renew. Energy, 33, 575–584, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Brown and Covey(1966)</label><mixed-citation>
Brown, K. W. and Covey, W.: The energy-budget evaluation of the
micrometeorological transfer processes within a cornfield, Agr.
Meteorol., 3, 73–96, 1966.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Clough et al.(2005)</label><mixed-citation>
Clough, S., Shephard, M., Mlawer, E., Delamere, J., Iacono, M., Cady-Pereira,
K., Boukabara, S., and Brown, P.: Atmospheric radiative transfer modeling: a
summary of the AER codes, J. Quant. Spectrosc. Ra., 91, 233–244,
<a href="https://doi.org/10.1016/j.jqsrt.2004.05.058" target="_blank">https://doi.org/10.1016/j.jqsrt.2004.05.058</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Dai et al.(2003)</label><mixed-citation>
Dai, Y., Zeng, X., Dickinson, R. E., Baker, I., Bonan, G. B., Bosilovich,
M. G., Denning, A. S., Dirmeyer, P. A., Houser, P. R., Niu, G., Oleson, K. W., Schlosser, C. A., and Yang, Z.-L.: The
common land model, B. Am. Meteorol. Soc., 84,
1013–1024, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Daudet et al.(1999)</label><mixed-citation>
Daudet, F., Le Roux, X., Sinoquet, H., and Adam, B.: Wind speed and leaf
boundary layer conductance variation within tree crown: consequences on
leaf-to-atmosphere coupling and tree functions, Agr. Forest
Meteorol., 97, 171–185, 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Franke et al.(2012)</label><mixed-citation>
Franke, J., Sturm, M., and Kalmbach, C.: Validation of OpenFOAM 1.6. x with the German VDI guideline for obstacle resolving micro-scale models, J. Wind Eng. Ind. Aerod., 104, 350–359, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Fröhlich and Matzarakis(2019)</label><mixed-citation>
Fröhlich, D. and Matzarakis, A.: Calculating human thermal comfort and thermal stress in the PALM model system 6.0, Geosci. Model Dev., 13, 3055–3065, <a href="https://doi.org/10.5194/gmd-13-3055-2020" target="_blank">https://doi.org/10.5194/gmd-13-3055-2020</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Früh et al.(2011)</label><mixed-citation>
Früh, B., Becker, P., Deutschländer, T., Hessel, J.-D., Kossmann, M.,
Mieskes, I., Namyslo, J., Roos, M., Sievers, U., Steigerwald, T., Turau, H., and Wienert, U.:
Estimation of climate-change impacts on the urban heat load using an urban
climate model and regional climate projections, J. Appl.
Meteorol. Climatol., 50, 167–184, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Gebhart(1971)</label><mixed-citation>
Gebhart, B.: Heat transfer, McGraw Hill, New York, 2 edn., 1971.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Geletič et al.(2021)</label><mixed-citation>
Geletič, J., Lehnert, M., Krč, P., Resler, J., and Krayenhoff,
E. S.: High-Resolution Modelling of Thermal Exposure during a Hot Spell: A
Case Study Using PALM-4U in Prague, Czech Republic, Atmosphere, 12, 175,
<a href="https://doi.org/10.3390/atmos12020175" target="_blank">https://doi.org/10.3390/atmos12020175</a>, 2021.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Grimmond et al.(2010)</label><mixed-citation>
Grimmond, C. S. B., Blackett, M., Best, M. J., Barlow, J., Baik, J.-J.,
Belcher, S. E., Bohnenstengel, S. I., Calmet, I., Chen, F., Dandou, A.,
Fortuniak, K., Gouvea, M. L., Hamdi, R., Hendry, M., Kawai, T., Kawamoto, Y.,
Kondo, H., Krayenhoff, E. S., Lee, S.-H., Loridan, T., Martilli, A., Masson,
V., Miao, S., Oleson, K., Pigeon, G., Porson, A., Ryu, Y.-H., Salamanca, F.,
Shashua-Bar, L., Steeneveld, G.-J., Tombrou, M., Voogt, J. A., Young, D., and
Zhang, N.: The International Urban Energy Balance Models Comparison Project:
First results from Phase 1, J. Appl.
Meteorol. Climatol., 49, 1268–1292, <a href="https://doi.org/10.1175/2010JAMC2354.1" target="_blank">https://doi.org/10.1175/2010JAMC2354.1</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Gross(2012)</label><mixed-citation>
Gross, G.: Effects of different vegetation on temperature in an urban building
environment. Micro-scale numerical experiments, Meteorol. Z., 21, 399–412, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Hamilton and Morgan(1952)</label><mixed-citation>
Hamilton, D. C. and Morgan, W. R.: Radiant-interchange configuration factors,
Tech. rep., National Advisory Committee For Aeronautics, 1952.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Heus et al.(2010)</label><mixed-citation>
Heus, T., van Heerwaarden, C. C., Jonker, H. J. J., Pier Siebesma, A., Axelsen, S., van den Dries, K., Geoffroy, O., Moene, A. F., Pino, D., de Roode, S. R., and Vilà-Guerau de Arellano, J.: Formulation of the Dutch Atmospheric Large-Eddy Simulation (DALES) and overview of its applications, Geosci. Model Dev., 3, 415–444, <a href="https://doi.org/10.5194/gmd-3-415-2010" target="_blank">https://doi.org/10.5194/gmd-3-415-2010</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Huttner and Bruse(2009)</label><mixed-citation>
Huttner, S. and Bruse, M.: Numerical modeling of the urban climate–a preview
on ENVI-met 4.0, in: 7th international conference on urban climate ICUC-7,
Yokohama, Japan, vol. 29, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Kim et al.(2020)Kim, Lee, Kim, Park, and Lee</label><mixed-citation>
Kim, D.-J., Lee, D.-I., Kim, J.-J., Park, M.-S., and Lee, S.-H.: Development of a Building-Scale Meteorological Prediction System Including a Realistic
Surface Heating, Atmosphere, 11, 67, <a href="https://doi.org/10.3390/atmos11010067" target="_blank">https://doi.org/10.3390/atmos11010067</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Kondo et al.(2005)</label><mixed-citation>
Kondo, H., Genchi, Y., Kikegawa, Y., Ohashi, Y., Yoshikado, H., and Komiyama,
H.: Development of a Multi-Layer Urban Canopy Model for the Analysis of
Energy Consumption in a Big City: Structure of the Urban Canopy Model and its
Basic Performance, Bound.-Lay. Meteorol., 116, 395–421,
<a href="https://doi.org/10.1007/s10546-005-0905-5" target="_blank">https://doi.org/10.1007/s10546-005-0905-5</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Krayenhoff et al.(2014)</label><mixed-citation>
Krayenhoff, E., Christen, A., Martilli, A., and Oke, T.: A multi-layer
radiation model for urban neighbourhoods with trees, Bound.-Lay. Meteorol., 151, 139–178, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Krayenhoff and Voogt(2007)</label><mixed-citation>
Krayenhoff, E. S. and Voogt, J. A.: A microscale three-dimensional urban energy balance model for studying surface temperatures, Bound.-Lay. Meteorol., 123, 433–461, <a href="https://doi.org/10.1007/s10546-006-9153-6" target="_blank">https://doi.org/10.1007/s10546-006-9153-6</a>, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Krč(2019)</label><mixed-citation>
Krč, P.: Improved methods of weather forecasting applied in transportation, PhD thesis, Czech Technical University in Prague, Faculty of Transportation Sciences, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Kusaka et al.(2001)</label><mixed-citation>
Kusaka, H., Kondo, H., Kikegawa, Y., and Kimura, F.: A Simple Single-Layer
Urban Canopy Model For Atmospheric Models: Comparison With Multi-Layer And
Slab Models, Bound.-Lay. Meteorol., 101, 329–358,
<a href="https://doi.org/10.1023/A:1019207923078" target="_blank">https://doi.org/10.1023/A:1019207923078</a>, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Lee and Lee(2020)</label><mixed-citation>
Lee, D.-I. and Lee, S.-H.: The Microscale Urban Surface Energy (MUSE) Model
for Real Urban Application, Atmosphere, 11, 1347,
<a href="https://doi.org/10.3390/atmos11121347" target="_blank">https://doi.org/10.3390/atmos11121347</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Lee and Park(2008)</label><mixed-citation>
Lee, S.-H. and Park, S.-U.: A Vegetated Urban Canopy Model for Meteorological
and Environmental Modelling, Bound.-Lay. Meteorol., 126, 73–102,
<a href="https://doi.org/10.1007/s10546-007-9221-6" target="_blank">https://doi.org/10.1007/s10546-007-9221-6</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Leibniz University Hannover and other PALM co-creators(2021)</label><mixed-citation>
Leibniz University Hannover and other PALM co-creators: The PALM model system website, available at: <a href="http://palm-model.org" target="_blank"/>,
last access: 27 May 2021.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Maronga et al.(2015)</label><mixed-citation>
Maronga, B., Gryschka, M., Heinze, R., Hoffmann, F., Kanani-Sühring, F., Keck, M., Ketelsen, K., Letzel, M. O., Sühring, M., and Raasch, S.: The Parallelized Large-Eddy Simulation Model (PALM) version 4.0 for atmospheric and oceanic flows: model formulation, recent developments, and future perspectives, Geosci. Model Dev., 8, 2515–2551, <a href="https://doi.org/10.5194/gmd-8-2515-2015" target="_blank">https://doi.org/10.5194/gmd-8-2515-2015</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Maronga et al.(2020)</label><mixed-citation>
Maronga, B., Banzhaf, S., Burmeister, C., Esch, T., Forkel, R., Fröhlich, D., Fuka, V., Gehrke, K. F., Geletič, J., Giersch, S., Gronemeier, T., Groß, G., Heldens, W., Hellsten, A., Hoffmann, F., Inagaki, A., Kadasch, E., Kanani-Sühring, F., Ketelsen, K., Khan, B. A., Knigge, C., Knoop, H., Krč, P., Kurppa, M., Maamari, H., Matzarakis, A., Mauder, M., Pallasch, M., Pavlik, D., Pfafferott, J., Resler, J., Rissmann, S., Russo, E., Salim, M., Schrempf, M., Schwenkel, J., Seckmeyer, G., Schubert, S., Sühring, M., von Tils, R., Vollmer, L., Ward, S., Witha, B., Wurps, H., Zeidler, J., and Raasch, S.: Overview of the PALM model system 6.0, Geosci. Model Dev., 13, 1335–1372, <a href="https://doi.org/10.5194/gmd-13-1335-2020" target="_blank">https://doi.org/10.5194/gmd-13-1335-2020</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Martilli et al.(2002)</label><mixed-citation>
Martilli, A., Clappier, A., and Rotach, M. W.: An urban surface exchange
parameterisation for mesoscale models, Bound.-Lay. Meteorol., 104,
261–304, <a href="https://doi.org/10.1023/A:1016099921195" target="_blank">https://doi.org/10.1023/A:1016099921195</a>, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Masson(2000)</label><mixed-citation>
Masson, V.: A Physically-Based Scheme For The Urban Energy Budget In
Atmospheric Models, Bound.-Lay. Meteorol., 94, 357–397,
<a href="https://doi.org/10.1023/A:1002463829265" target="_blank">https://doi.org/10.1023/A:1002463829265</a>, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Mussetti et al.(2020)</label><mixed-citation>
Mussetti, G., Brunner, D., Henne, S., Allegrini, J., Krayenhoff, E. S., Schubert, S., Feigenwinter, C., Vogt, R., Wicki, A., and Carmeliet, J.: COSMO-BEP-Tree v1.0: a coupled urban climate model with explicit representation of street trees, Geosci. Model Dev., 13, 1685–1710, <a href="https://doi.org/10.5194/gmd-13-1685-2020" target="_blank">https://doi.org/10.5194/gmd-13-1685-2020</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Ngao et al.(2017)</label><mixed-citation>
Ngao, J., Adam, B., and Saudreau, M.: Intra-crown spatial variability of leaf
temperature and stomatal conductance enhanced by drought in apple tree as
assessed by the RATP model, Agr. Forest Meteorol., 237,
340–354, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Peskin(1972)</label><mixed-citation>
Peskin, C. S.: Flow patterns around heart valves: A numerical method, J. Comput. Phys., 10, 252–271, <a href="https://doi.org/10.1016/0021-9991(72)90065-4" target="_blank">https://doi.org/10.1016/0021-9991(72)90065-4</a>,
1972.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Resler et al.(2017)</label><mixed-citation>
Resler, J., Krč, P., Belda, M., Juruš, P., Benešová, N., Lopata, J., Vlček, O., Damašková, D., Eben, K., Derbek, P., Maronga, B., and Kanani-Sühring, F.: PALM-USM v1.0: A new urban surface model integrated into the PALM large-eddy simulation model, Geosci. Model Dev., 10, 3635–3659, <a href="https://doi.org/10.5194/gmd-10-3635-2017" target="_blank">https://doi.org/10.5194/gmd-10-3635-2017</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Resler et al.(2020)</label><mixed-citation>
Resler, J., Eben, K., Geletič, J., Krč, P., Rosecký, M., Sühring, M., Belda, M., Fuka, V., Halenka, T., Huszár, P., Karlický, J., Benešová, N., Ďoubalová, J., Honzáková, K., Keder, J., Nápravníková, Š., and Vlček, O.: Validation of the PALM model system 6.0 in real urban environment; case study of Prague-Dejvice, Czech Republic, Geosci. Model Dev. Discuss. [preprint], <a href="https://doi.org/10.5194/gmd-2020-175" target="_blank">https://doi.org/10.5194/gmd-2020-175</a>, in review, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Salim et al.(2018)</label><mixed-citation>
Salim, M. H., Schlünzen, K. H., Grawe, D., Boettcher, M., Gierisch, A. M. U., and Fock, B. H.: The microscale obstacle-resolving meteorological model MITRAS v2.0: model theory, Geosci. Model Dev., 11, 3427–3445, <a href="https://doi.org/10.5194/gmd-11-3427-2018" target="_blank">https://doi.org/10.5194/gmd-11-3427-2018</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Salim et al.(2020)Salim, Schubert, Resler, Krč, Maronga,
Kanani-Sühring, Sühring, and Schneider</label><mixed-citation>
Salim, M. H., Schubert, S., Resler, J., Krč, P., Maronga, B., Kanani-Sühring, F., Sühring, M., and Schneider, C.: Importance of radiative transfer processes in urban climate models: A study based on the PALM model system 6.0, Geosci. Model Dev. Discuss. [preprint], <a href="https://doi.org/10.5194/gmd-2020-94" target="_blank">https://doi.org/10.5194/gmd-2020-94</a>, in review, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Schubert et al.(2012)</label><mixed-citation>
Schubert, S., Grossman-Clarke, S., and Martilli, A.: A Double-Canyon Radiation Scheme for Multi-Layer Urban Canopy Models, Bound.-Lay. Meteorol., 145, 439–468, <a href="https://doi.org/10.1007/s10546-012-9728-3" target="_blank">https://doi.org/10.1007/s10546-012-9728-3</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Sparrow and Cess(1978)</label><mixed-citation>
Sparrow, E. M. and Cess, R. D.: Radiation heat transfer, Hemisphere Publishing Corporation, augmented edition, 1978.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Stewart(1988)</label><mixed-citation>
Stewart, J.: Modelling surface conductance of pine forest, Agr.
Forest Meteorol., 43, 19–35, 1988.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Swenson et al.(2019)</label><mixed-citation>
Swenson, S. C., Burns, S. P., and Lawrence, D. M.: The Impact of Biomass Heat
Storage on the Canopy Energy Balance and Atmospheric Stability in the
Community Land Model, J. Adv. Model. Earth Sy., 11,
83–98, <a href="https://doi.org/10.1029/2018ms001476" target="_blank">https://doi.org/10.1029/2018ms001476</a>, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Tang et al.(2020)</label><mixed-citation>
Tang, H., Haynes, R., and Houzeaux, G.: A Review of Domain Decomposition
Methods for Simulation of Fluid Flows: Concepts, Algorithms, and
Applications, Arch. Computat. Method. E., <a href="https://doi.org/10.1007/s11831-019-09394-0" target="_blank">https://doi.org/10.1007/s11831-019-09394-0</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Van Wijk et al.(2000)</label><mixed-citation>
Van Wijk, M., Dekker, S., Bouten, W., Bosveld, F., Kohsiek, W., Kramer, K., and Mohren, G.: Modeling daily gas exchange of a Douglas-fir forest: comparison of three stomatal conductance models with and without a soil water stress function, Tree Physiol., 20, 115–122, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Wang and Jarvis(1990)</label><mixed-citation>
Wang, Y. and Jarvis, P.: Influence of crown structural properties on PAR
absorption, photosynthesis, and transpiration in Sitka spruce: application of
a model (MAESTRO), Tree Physiol., 7, 297–316, 1990.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Yang and Li(2013)</label><mixed-citation>
Yang, X. and Li, Y.: Development of a three-dimensional urban energy model for predicting and understanding surface temperature distribution, Bound.-Lay. Meteorol., 149, 303–321, 2013.
</mixed-citation></ref-html>--></article>
