Reference

Contents

Index

UrbanTethysChloris.incoming_longwaveMethod
incoming_longwave(Ta::FT, ea::FT, N::FT) where {FT<:AbstractFloat}

Calculate incoming longwave radiation.

Arguments

  • Ta: Air temperature [°C]
  • ea: Vapor pressure [Pa]
  • N: Cloudiness [0-1] or incoming longwave radiation if N > 1 [W/m²]

Returns

  • Latm: Incoming longwave radiation [W/m²]
source
UrbanTethysChloris.set_sun_variablesMethod
set_sun_variables(datam, deltagmt, lon, lat, t_bef, t_aft)

Calculate solar position variables.

Returns tuple of (hS, zetaS, Tsunrise, Tsunset) where:

  • h_S: solar altitude [rad]
  • zeta_S: Sun's azimuth [rad]
  • T_sunrise: sunrise time [h]
  • T_sunset: sunset time [h]
source

Building Energy Model

UrbanTethysChloris.BuildingEnergyModel.ac_heating_moduleMethod
ac_heating_module(
    AC_on::Bool,
    Heat_on::Bool,
    AC_onCool::Bool,
    AC_onDehum::Bool,
    ParHVAC::NamedTuple,
    HbuildIn::FT,
    Hvent::FT,
    Hequip::FT,
    Hpeople::FT,
    dSH_air::FT,
    LEvent::FT,
    LEequip::FT,
    LEpeople::FT,
    dSLE_air::FT
) where {FT<:AbstractFloat}

AC & heating module that removes or adds sensible and latent heat as needed to maintain air temperature and humidity. For AC, both temperature and humidity are controlled. For heating, only temperature is controlled.

Arguments

  • AC_on: Master AC switch (on/off)
  • Heat_on: Heating switch (on/off)
  • AC_onCool: AC cooling switch (on/off)
  • AC_onDehum: AC dehumidification switch (on/off)
  • ParHVAC: HVAC parameters
  • HbuildIn: Building internal sensible heat [W]
  • Hvent: Ventilation sensible heat [W]
  • Hequip: Equipment sensible heat [W]
  • Hpeople: People sensible heat [W]
  • dSH_air: Change in sensible heat storage [W]
  • LEvent: Ventilation latent heat [W]
  • LEequip: Equipment latent heat [W]
  • LEpeople: People latent heat [W]
  • dSLE_air: Change in latent heat storage [W]

Returns

  • AC_on::Bool: Master AC switch status
  • AC_onCool::Bool: AC cooling switch status
  • AC_onDehum::Bool: AC dehumidification switch status
  • Heat_on::Bool: Heating switch status
  • H_AC_Heat::FT: Sensible heat removed/added by HVAC [W]
  • LE_AC_Heat::FT: Latent heat removed/added by HVAC [W]
source
UrbanTethysChloris.BuildingEnergyModel.ac_heating_turn_on_offMethod
ac_heating_turn_on_off(
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    TempVecB_ittm::NamedTuple,
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Geometry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    BEM_on::Bool
) where {FT<:AbstractFloat}

Turn AC and heating on/off based on temperature and humidity conditions.

Arguments

  • ParHVAC: HVAC parameters
  • TempVecB_ittm: Building temperature vectors at previous time step
  • TempVec_ittm: Temperature vectors at previous time step
  • Humidity_ittm: Humidity parameters
  • MeteoData: Meteorological data
  • Geometry_m: Urban geometry parameters
  • BEM_on: Building Energy Model switch

Returns

  • ParHVAC::ModelComponents.Parameters.HVACParameters{FT}: Updated HVAC parameters
  • ParHVACorig::ModelComponents.Parameters.HVACParameters{FT}: Original HVAC parameters
source
UrbanTethysChloris.BuildingEnergyModel.conductive_heat_flux_building_floorMethod
conductive_heat_flux_building_floor(
    Tinground::FT,
    TingroundDamptm1::FT,
    Tingroundtm1::FT,
    ParCalculation::NamedTuple,
    ParThermalBuildFloor::ModelComponents.Parameters.ThermalBuilding{FT}
) where {FT<:AbstractFloat}

Calculate conductive heat flux through building floor.

Arguments

  • Tinground: Ground temperature [K]
  • TingroundDamptm1: Damped ground temperature at previous timestep [K]
  • Tingroundtm1: Ground temperature at previous timestep [K]
  • ParCalculation: Calculation parameters
  • ParThermalBuildFloor: Thermal parameters for building floor

Returns

  • G::FT: Heat flux through building floor [W/m²]
  • Tdp::FT: Updated damped temperature [K]
source
UrbanTethysChloris.BuildingEnergyModel.eb_solver_buildingMethod
eb_solver_building(
    TemperatureC::Vector{FT},
    TemperatureB::Vector{FT},
    TempVecB_ittm::NamedTuple,
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    SWRinWsun::FT,
    SWRinWshd::FT,
    G2Roof::FT,
    G2WallSun::FT,
    G2WallShade::FT,
    TempDamp_ittm::NamedTuple,
    SWRabs_t::NamedTuple,
    Geometry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParCalculation::NamedTuple,
    ParThermalBuildingInt::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    HVACSchedule::NamedTuple,
) where {FT<:AbstractFloat}

Simple Building energy model.

Arguments

  • TemperatureC: Outdoor temperatures of buildings and air and humidity [K]
  • TemperatureB: Building internal temperature and air and humidity [K]
  • TempVecB_ittm: Building internal temperature and humidity from previous time step
  • TempVec_ittm: Temperature vectors at previous time step
  • Humidity_ittm: Humidity at previous time step
  • MeteoData: Atmospheric forcing conditions
  • SWRinWsun: Incoming shortwave radiation on sunlit wall [W/m²]
  • SWRinWshd: Incoming shortwave radiation on shaded wall [W/m²]
  • G2Roof: Conductive heat flux through roof [W/m²]
  • G2WallSun: Conductive heat flux through sunlit wall [W/m²]
  • G2WallShade: Conductive heat flux through shaded wall [W/m²]
  • TempDamp_ittm: Ground dampening temperature from previous time step
  • SWRabs_t: Absorbed shortwave radiation [W/m²]
  • Geometry_m: Urban geometry parameters
  • PropOpticalIndoors: Building internal albedo/emissivities
  • ParHVAC: HVAC parameters
  • ParCalculation: Calculation parameters
  • ParThermalBuildingInt: Thermal parameters for building interior
  • ParWindows: Window parameters
  • BEM_on: Building Energy Model switch
  • HVACSchedule: HVAC operation schedule

Returns

  • YBuildInt::Vector{FT}: Building internal energy balance residuals
  • WasteHeat::NamedTuple: Waste heat emissions from AC and ventilation
source
UrbanTethysChloris.BuildingEnergyModel.eb_solver_building_outputMethod
eb_solver_building_output(
    TemperatureC::Vector{FT},
    TemperatureB::Vector{FT},
    TempVecB_ittm::NamedTuple,
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    SWRinWsun::FT,
    SWRinWshd::FT,
    G2Roof::FT,
    G2WallSun::FT,
    G2WallShade::FT,
    TempDamp_ittm::NamedTuple,
    SWRabs_t::NamedTuple,
    Geometry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParCalculation::NamedTuple,
    ParThermalBuildingInt::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    HVACSchedule::NamedTuple,
) where {FT<:AbstractFloat}

Simple Building energy model.

Arguments

  • TemperatureC: Outdoor temperatures of buildings and air and humidity [K]
  • TemperatureB: Building internal temperature and air and humidity [K]
  • TempVecB_ittm: Building internal temperature and humidity from previous time step
  • TempVec_ittm: Temperature vectors at previous time step
  • Humidity_ittm: Humidity at previous time step
  • MeteoData: Atmospheric forcing conditions
  • SWRinWsun: Incoming shortwave radiation on sunlit wall [W/m²]
  • SWRinWshd: Incoming shortwave radiation on shaded wall [W/m²]
  • G2Roof: Conductive heat flux through roof [W/m²]
  • G2WallSun: Conductive heat flux through sunlit wall [W/m²]
  • G2WallShade: Conductive heat flux through shaded wall [W/m²]
  • TempDamp_ittm: Ground dampening temperature from previous time step
  • SWRabs_t: Absorbed shortwave radiation [W/m²]
  • Geometry_m: Urban geometry parameters
  • PropOpticalIndoors: Building internal albedo/emissivities
  • ParHVAC: HVAC parameters
  • ParCalculation: Calculation parameters
  • ParThermalBuildingInt: Thermal parameters for building interior
  • ParWindows: Window parameters
  • BEM_on: Building Energy Model switch
  • HVACSchedule: HVAC operation schedule

Returns

  • HbuildInt::NamedTuple: Internal sensible heat fluxes [W/m²]
  • LEbuildInt::NamedTuple: Internal latent heat fluxes [W/m²]
  • GbuildInt::NamedTuple: Internal conductive heat fluxes [W/m²]
  • SWRabsB::NamedTuple: Absorbed shortwave radiation [W/m²]
  • LWRabsB::NamedTuple: Absorbed longwave radiation [W/m²]
  • Tdpfloor: Floor dampening temperature [K]
  • WasteHeat: Waste heat emissions [W/m²]
  • EnergyUse: Energy consumption [W*h]
  • HumidityBuilding: Building humidity parameters
  • ParACHeat: HVAC system operation parameters
  • YBuildInt::Vector{FT}: Building internal energy balance residuals [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.heat_storage_change_internal_massMethod
heat_storage_change_internal_mass(
    Tintmass::FT,
    Tintmasstm1::FT,
    ParThermalBuildFloor::NamedTuple,
    Geometry_m::NamedTuple,
    ParCalculation::NamedTuple
) where {FT<:AbstractFloat}

Calculate heat storage change in building internal mass.

Arguments

  • Tintmass: Internal mass temperature [K]
  • Tintmasstm1: Internal mass temperature at previous timestep [K]
  • ParThermalBuildFloor: Thermal parameters for building floor
  • Geometry_m: Building geometry parameters
  • ParCalculation: Calculation parameters

Returns

  • dS::Vector{FT}: Energy storage change in internal mass [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.lwr_abs_building_halfMethod
lwr_abs_building_half(
    Tceiling::FT,
    Tinwall::FT,
    Tintmass::FT,
    Tground::FT,
    A_c::FT,
    A_g::FT,
    A_h::FT,
    F_gc::FT,
    F_gw::FT,
    F_ww::FT,
    F_wg::FT,
    F_wc::FT,
    F_cg::FT,
    F_cw::FT,
    ec::FT,
    eg::FT,
    ew::FT,
    em::FT
) where {FT<:AbstractFloat}

Calculate longwave radiation absorption in building for half of the building.

Arguments

  • Tceiling: Ceiling temperature [K]
  • Tinwall: Interior wall temperature [K]
  • Tintmass: Internal mass temperature [K]
  • Tground: Ground temperature [K]
  • A_c: Ceiling area [m²]
  • A_g: Ground area [m²]
  • A_h: Wall area [m²]
  • F_gc: View factor ground to ceiling
  • F_gw: View factor ground to wall
  • F_ww: View factor wall to wall
  • F_wg: View factor wall to ground
  • F_wc: View factor wall to ceiling
  • F_cg: View factor ceiling to ground
  • F_cw: View factor ceiling to wall
  • ec: Ceiling emissivity
  • eg: Ground emissivity
  • ew: Wall emissivity
  • em: Internal mass emissivity

Returns

  • LWRinB::NamedTuple: Incoming longwave radiation for each surface [W/m²]
  • LWRoutB::NamedTuple: Outgoing longwave radiation for each surface [W/m²]
  • LWRabsB::NamedTuple: Absorbed longwave radiation for each surface [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.lwr_abs_indoorsMethod
lwr_abs_indoors(
    Tinwallsun::FT,
    Tinwallshd::FT,
    Tceiling::FT,
    Tground::FT,
    Tintmass::FT,
    Hbuild::FT,
    Wroof::FT,
    ec::FT,
    eg::FT,
    em::FT,
    ew::FT
) where {FT<:AbstractFloat}

Calculate longwave radiation absorption inside building considering both sunlit and shaded walls.

Arguments

  • Tinwallsun: Temperature of sunlit wall [K]
  • Tinwallshd: Temperature of shaded wall [K]
  • Tceiling: Ceiling temperature [K]
  • Tground: Ground temperature [K]
  • Tintmass: Internal mass temperature [K]
  • Hbuild: Building height [m]
  • Wroof: Roof width [m]
  • ec: Ceiling emissivity
  • eg: Ground emissivity
  • em: Internal mass emissivity
  • ew: Wall emissivity

Returns

  • LWRinB::NamedTuple: Incoming longwave radiation for each surface [W/m²]
  • LWRoutB::NamedTuple: Outgoing longwave radiation for each surface [W/m²]
  • LWRabsB::NamedTuple: Absorbed longwave radiation for each surface [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.lwr_abs_indoors_no_int_massMethod
lwr_abs_indoors_no_int_mass(
    Tinwallsun::FT,
    Tinwallshd::FT,
    Tceiling::FT,
    Tground::FT,
    Hbuild::FT,
    Wroof::FT,
    ec::FT,
    eg::FT,
    ew::FT
) where {FT<:AbstractFloat}

Calculate longwave radiation absorption inside building without internal mass.

Arguments

  • Tinwallsun: Temperature of sunlit wall [K]
  • Tinwallshd: Temperature of shaded wall [K]
  • Tceiling: Ceiling temperature [K]
  • Tground: Ground temperature [K]
  • Hbuild: Building height [m]
  • Wroof: Roof width [m]
  • ec: Ceiling emissivity
  • eg: Ground emissivity
  • ew: Wall emissivity

Returns

  • LWRinB::NamedTuple: Incoming longwave radiation for each surface [W/m²]
  • LWRoutB::NamedTuple: Outgoing longwave radiation for each surface [W/m²]
  • LWRabsB::NamedTuple: Absorbed longwave radiation for each surface [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.sensible_heat_flux_building_interiorMethod
sensible_heat_flux_building_interior(
    Tbin::FT,
    Tinwallsun::FT,
    Tinwallshd::FT,
    Tceiling::FT,
    Tinground::FT,
    Tintmass::FT,
    Twindow::FT
) where {FT<:AbstractFloat}

Calculate sensible heat flux from building surfaces to interior air.

Arguments

  • Tbin: Building interior air temperature [K]
  • Tinwallsun: Interior sunlit wall temperature [K]
  • Tinwallshd: Interior shaded wall temperature [K]
  • Tceiling: Ceiling temperature [K]
  • Tinground: Interior ground temperature [K]
  • Tintmass: Internal mass temperature [K]
  • Twindow: Window temperature [K]

Returns

  • HbinWallSun::FT: Sensible heat flux from sunlit wall [W/m²]
  • HbinWallshd::FT: Sensible heat flux from shaded wall [W/m²]
  • HBinRoof::FT: Sensible heat flux from roof [W/m²]
  • HBinGround::FT: Sensible heat flux from ground [W/m²]
  • HbinIntMass::FT: Sensible heat flux from internal mass [W/m²]
  • HbinWindow::FT: Sensible heat flux from window [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.swr_abs_building_halfMethod
swr_abs_building_half(
    A_c::FT,
    A_g::FT,
    A_h::FT,
    SWRinW::FT,
    F_gc::FT,
    F_gw::FT,
    F_ww::FT,
    F_wg::FT,
    F_wc::FT,
    F_cg::FT,
    F_cw::FT,
    abc::FT,
    abw::FT,
    abm::FT,
    abg::FT
) where {FT<:AbstractFloat}

Calculate shortwave radiation absorption in building for half of the building.

Arguments

  • A_c: Ceiling area [m²]
  • A_g: Ground area [m²]
  • A_h: Wall area [m²]
  • SWRinW: Incoming shortwave radiation on wall [W/m²]
  • F_gc: View factor ground to ceiling
  • F_gw: View factor ground to wall
  • F_ww: View factor wall to wall
  • F_wg: View factor wall to ground
  • F_wc: View factor wall to ceiling
  • F_cg: View factor ceiling to ground
  • F_cw: View factor ceiling to wall
  • abc: Ceiling albedo
  • abw: Wall albedo
  • abm: Internal mass albedo
  • abg: Ground albedo

Returns

  • SWRinB::NamedTuple: Incoming shortwave radiation for each surface [W/m²]
  • SWRoutB::NamedTuple: Outgoing shortwave radiation for each surface [W/m²]
  • SWRabsB::NamedTuple: Absorbed shortwave radiation for each surface [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.swr_abs_indoorsMethod
swr_abs_indoors(
    SWRinWsun::FT,
    SWRinWshd::FT,
    Hbuild::FT,
    Wroof::FT,
    abc::FT,
    abw::FT,
    abg::FT,
    abm::FT
) where {FT<:AbstractFloat}

Calculate shortwave radiation absorption inside building.

Arguments

  • SWRinWsun: Incoming shortwave radiation on sunlit wall [W/m²]
  • SWRinWshd: Incoming shortwave radiation on shaded wall [W/m²]
  • Hbuild: Building height [m]
  • Wroof: Roof width [m]
  • abc: Ceiling albedo
  • abw: Wall albedo
  • abg: Ground albedo
  • abm: Internal mass albedo

Returns

  • SWRinB::NamedTuple: Incoming shortwave radiation for each surface [W/m²]
  • SWRoutB::NamedTuple: Outgoing shortwave radiation for each surface [W/m²]
  • SWRabsB::NamedTuple: Absorbed shortwave radiation for each surface [W/m²]
source
UrbanTethysChloris.BuildingEnergyModel.swr_abs_indoors_no_int_massMethod
swr_abs_indoors_no_int_mass(
    SWRinWsun::FT,
    SWRinWshd::FT,
    Hbuild::FT,
    Wroof::FT,
    abc::FT,
    abw::FT,
    abg::FT
) where {FT<:AbstractFloat}

Calculate shortwave radiation absorption inside building without internal mass.

Arguments

  • SWRinWsun: Incoming shortwave radiation on sunlit wall [W/m²]
  • SWRinWshd: Incoming shortwave radiation on shaded wall [W/m²]
  • Hbuild: Building height [m]
  • Wroof: Roof width [m]
  • abc: Ceiling albedo [-]
  • abw: Wall albedo [-]
  • abg: Ground albedo [-]

Returns

  • SWRinB::NamedTuple: Incoming shortwave radiation for each surface [W/m²]
  • SWRoutB::NamedTuple: Outgoing shortwave radiation for each surface [W/m²]
  • SWRabsB::NamedTuple: Absorbed shortwave radiation for each surface [W/m²]
  • SWREBB::NamedTuple: Energy balance for each surface [W/m²]
source

Conductive Heat

UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_green_roofMethod
conductive_heat_flux_green_roof(
    TemperatureR::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    Anthropogenic::NamedTuple,
    Owater::NamedTuple,
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParCalculation::NamedTuple,
    BEM_on::Bool
) where {FT<:AbstractFloat}

Calculate conductive heat flux through a green roof.

Arguments

  • temperature_r: Surface temperature of roof [K]
  • temperature_b: Interior temperature in the building [K]
  • temp_vec_ittm: Temperature vectors at previous time step
  • anthropogenic: Anthropogenic parameters
  • owater: Water content parameters
  • par_veg_roof: Vegetation parameters for roof
  • par_soil_roof: Soil parameters for roof
  • par_thermal_roof: Thermal parameters for roof
  • par_calculation: Calculation parameters
  • bem_on: Building Energy Model switch (0/1)

Returns

  • G1::FT: Heat flux from surface to concrete interior [W/m²]
  • G2::FT: Heat flux from concrete interior to building interior [W/m²]
  • dS::FT: Energy storage in the roof [J/m²]
source
UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_ground_frMethod
conductive_heat_flux_ground_fr(
    TemperatureC::Vector{FT},
    TempDamp_ittm::NamedTuple,
    TempVec_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    ParCalculation::NamedTuple,
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT}
) where {FT<:AbstractFloat}

Calculate conductive heat flux for ground with fraction-resolved temperature.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TempDamp_ittm: Temperature damping vectors at previous time step
  • TempVec_ittm: Temperature vectors at previous time step
  • Owater_ittm: Water content vectors at previous time step
  • ParCalculation: Calculation parameters
  • ParThermalGround: Ground thermal parameters
  • FractionsGround: Ground surface fractions
  • ParSoilGround: Ground soil parameters
  • ParVegTree: Tree vegetation parameters
  • ParVegGround: Ground vegetation parameters

Returns

  • G::FT: Ground heat flux [W/m²]
  • Tdp::FT: Damping temperature [K]
source
UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_ground_impMethod
conductive_heat_flux_ground_imp(
    TemperatureC::Vector{FT},
    TempVec_ittm::NamedTuple,
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParCalculation::NamedTuple
) where {FT<:AbstractFloat}

Calculate conductive heat flux through impervious ground.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TempVec_ittm: Temperature vectors at previous time step
  • ParThermalGround: Thermal parameters for ground
  • ParSoilGround: Soil parameters for ground
  • ParCalculation: Calculation parameters

Returns

  • G1::FT: Heat flux from surface to concrete interior [W/m²]
  • G2::FT: Heat flux from concrete interior to deep soil [W/m²]
  • dS::FT: Energy storage in the ground [J/m²]
source
UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_ground_vbMethod
conductive_heat_flux_ground_vb(
    TemperatureC::Vector{FT},
    TempDamp_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    TempVec_ittm::NamedTuple,
    ParCalculation::NamedTuple,
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    type::Int
) where {FT<:AbstractFloat}

Calculate conductive heat flux for bare/vegetated ground fractions.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TempDamp_ittm: Temperature damping vectors at previous time step
  • Owater_ittm: Water content vectors at previous time step
  • TempVec_ittm: Temperature vectors at previous time step
  • ParCalculation: Calculation parameters
  • ParSoilGround: Ground soil parameters
  • ParVegGround: Ground vegetation parameters
  • ParVegTree: Tree vegetation parameters
  • FractionsGround: Ground surface fractions
  • type: 0 for bare ground, 1 for vegetated ground

Returns

  • G::FT: Ground heat flux [W/m²]
  • Tdp::FT: Damping temperature [K]
source
UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_roof_impMethod
conductive_heat_flux_roof_imp(
    TemperatureR::Vector{FT},
    TemperatureB::Union{FT, Vector{FT}},
    TempVec_ittm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParCalculation::NamedTuple,
    BEM_on::Bool
) where {FT<:AbstractFloat}

Calculate conductive heat flux through an impervious roof.

Arguments

  • TemperatureR: Surface temperature of roof [K]
  • TemperatureB: Interior temperature in the building [K]
  • TempVec_ittm: Temperature vectors at previous time step
  • Anthropogenic: Anthropogenic parameters
  • ParThermalRoof: Thermal parameters for roof
  • ParSoilRoof: Soil parameters for roof
  • ParCalculation: Calculation parameters
  • BEM_on: Building Energy Model switch (true/false)

Returns

  • G1: Heat flux from surface to concrete interior [W/m²]
  • G2: Heat flux from concrete interior to building interior [W/m²]
  • dS: Energy storage in the roof [J/m²]
source
UrbanTethysChloris.ConductiveHeat.conductive_heat_flux_wallsMethod
conductive_heat_flux_walls(
    TemperatureC::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    TempVecB_ittm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParThermalWall::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    WallLayers::NamedTuple,
    ParCalculation::NamedTuple,
    type::Bool,
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool
) where {FT<:AbstractFloat}

Calculate conductive heat flux through walls.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TemperatureB: Building temperatures vector
  • TempVec_ittm: Temperature vectors at previous time step
  • TempVecB_ittm: Building temperature vectors at previous time step
  • Anthropogenic: Anthropogenic parameters
  • ParThermalWall: Thermal parameters for wall
  • WallLayers: Wall layer parameters
  • ParCalculation: Calculation parameters
  • type: 1 for sunlit wall, 0 for shaded wall
  • ParWindows: Window parameters
  • BEM_on: Building Energy Model switch

Returns

  • G1::FT: Heat flux from surface to concrete interior [W/m²]
  • G2::FT: Heat flux from concrete interior to building interior [W/m²]
  • dS::FT: Energy storage in the wall [J/m²]
source
UrbanTethysChloris.ConductiveHeat.soil_heatMethod
soil_heat(dt::Int, Ts::FT, Tstm1::FT, Tdptm1::FT, CTt::FT)

Compute soil heat flux and depth temperature using force-restore method.

Arguments

  • dt: time step [s]
  • Ts: surface temperature [°C]
  • Tstm1: surface temperature at previous step [°C]
  • Tdptm1: depth temperature at previous step [°C]
  • CTt: total thermal capacity of soil or water [K m²/J]

Returns

  • G::FT: soil heat flux [W/m²]
  • Tdp::FT: depth temperature [°C]
source

Mean Radiant Temperature

UrbanTethysChloris.MeanRadiantTemperature.mean_radiant_temperatureMethod
mean_radiant_temperature(
    SWRout_t::NamedTuple,
    LWRout_t::NamedTuple,
    MeteoData::NamedTuple,
    ViewFactorPoint::ModelComponents.Parameters.ViewFactorPoint{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    Geometry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    SunPosition::NamedTuple,
    Person::NamedTuple,
) where {FT<:AbstractFloat}

Calculate mean radiant temperature for a person in an urban canyon.

Arguments

  • SWRout_t: Outgoing shortwave radiation
  • LWRout_t: Outgoing longwave radiation
  • MeteoData: Meteorological data
  • ViewFactorPoint: View factors from point to surfaces
  • ParTree: Tree presence parameters
  • ParVegTree: Tree vegetation parameters
  • Geometry_m: Urban geometry parameters
  • SunPosition: Solar position parameters
  • Person: Person position parameters

Returns

  • Tmrt::FT: Mean radiant temperature [°C]
  • BooleanInSun::FT: Factor indicating if person is in sun [0-1]
  • SWRdir_Person::FT: Direct shortwave radiation on person [W/m²]
  • SWRdir_in_top::FT: Direct radiation on top surface [W/m²]
  • SWRdir_in_bottom::FT: Direct radiation on bottom surface [W/m²]
  • SWRdir_in_east::FT: Direct radiation on east surface [W/m²]
  • SWRdir_in_south::FT: Direct radiation on south surface [W/m²]
  • SWRdir_in_west::FT: Direct radiation on west surface [W/m²]
  • SWRdir_in_north::FT: Direct radiation on north surface [W/m²]
  • SWRdiff_Person::FT: Diffuse shortwave radiation on person [W/m²]
  • LWR_Person::FT: Longwave radiation on person [W/m²]
source
UrbanTethysChloris.MeanRadiantTemperature.person_in_shadeMethod
person_in_shade(
    trees::Bool,
    h_can::FT,
    w_can::FT,
    d_tree::FT,
    h_tree::FT,
    r_tree::FT,
    theta_Z::FT,
    theta_n::FT,
    h_P::FT,
    x_P::FT,
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    Wcan::FT,
    TimeOfMaxSolAlt::FT,
    TimeHr::FT,
) where {FT<:AbstractFloat}

Determine if a person is in shade.

Arguments

  • trees: Trees present in canyon
  • h_can: Normalized building height [-]
  • w_can: Normalized street width [-]
  • d_tree: Location of trees in canyon (tree-wall distance) [-]
  • h_tree: Height of trees (vertical level at crown center) [-]
  • r_tree: Size of tree crown (crown radius) [-]
  • theta_Z: Solar zenith angle [rad]
  • theta_n: Difference between solar azimuth angle and canyon orientation [rad]
  • h_P: Vertical position of person Hp[m]/Wcan[m] [-]
  • x_P: Relative position within canyon (0=left edge, 1=right edge) [-]
  • ParVegTree: Tree vegetation parameters
  • Wcan: Canyon width [m]
  • TimeOfMaxSolAlt: Time of maximum solar altitude [h]
  • TimeHr: Current time [h]

Returns

  • BooleanInSun::FT: Factor indicating if person is in sun (0=shade, 1=sun, 0-1=partial)
source
UrbanTethysChloris.MeanRadiantTemperature.swr_diff_personMethod
swr_diff_person(
    SWRout_t::NamedTuple,
    LWRout_t::NamedTuple,
    MeteoData::NamedTuple,
    ViewFactorPoint::RayTracing.ViewFactorPoint{FT},
    TimeOfMaxSolAlt::FT,
    TimeHr::FT,
) where {FT<:AbstractFloat}

Calculate diffuse shortwave and longwave radiation onto point.

Arguments

  • SWRout_t: Outgoing shortwave radiation from surfaces [W/m²]
  • LWRout_t: Outgoing longwave radiation from surfaces [W/m²]
  • MeteoData: Meteorological data
  • ViewFactorPoint: View factors from point to surfaces
  • TimeOfMaxSolAlt: Time of maximum solar altitude [h]
  • TimeHr: Current time [h]

Returns

  • SWRdiff_Person::FT: Diffuse shortwave radiation at point [W/m²]
  • LWR_Person::FT: Longwave radiation at point [W/m²]
source
UrbanTethysChloris.MeanRadiantTemperature.swr_dir_personMethod
swr_dir_person(
    SWR_dir::FT,
    zeta_S::FT,
    theta_Z::FT,
    BooleanInSun::FT,
) where {FT<:AbstractFloat}

Calculate direct shortwave radiation onto person.

Arguments

  • SWR_dir: Direct shortwave radiation [W/m²]
  • zeta_S: Solar azimuth angle [rad]
  • theta_Z: Solar zenith angle [rad]
  • BooleanInSun: Person is in sun, partially, or in shade (0=shade, 1=sun, 0-1=partial)

Returns

  • SWRdir_Person::FT: Direct shortwave radiation on person [W/m²]
  • SWRdir_in_top::FT: Direct radiation on top surface [W/m²]
  • SWRdir_in_bottom::FT: Direct radiation on bottom surface [W/m²]
  • SWRdir_in_east::FT: Direct radiation on east surface [W/m²]
  • SWRdir_in_south::FT: Direct radiation on south surface [W/m²]
  • SWRdir_in_west::FT: Direct radiation on west surface [W/m²]
  • SWRdir_in_north::FT: Direct radiation on north surface [W/m²]
source

Outdoor Thermal Comfort

UrbanTethysChloris.OutdoorThermalComfort.utci_approxMethod
utci_approx(
    Ta::FT,
    RH::FT,
    Tmrt::FT,
    va::FT
) where {FT<:AbstractFloat}

Calculate Universal Thermal Climate Index (UTCI) using polynomial approximation.

Arguments

  • Ta: Air temperature [°C]
  • RH: Relative humidity [%]
  • Tmrt: Mean radiant temperature [°C]
  • va: Wind speed at 10m height [m/s]

Returns

  • UTCI::FT: Universal Thermal Climate Index [°C]
source

Radiation

UrbanTethysChloris.Radiation.RadiationFluxesType
RadiationFluxes{FT<:AbstractFloat}

Structure representing radiation flux components in an urban canyon.

Fields

  • GroundImp: Radiation for impervious ground surface [W/m²]
  • GroundBare: Radiation for bare ground surface [W/m²]
  • GroundVeg: Radiation for vegetated ground surface [W/m²]
  • Tree: Radiation for tree surface [W/m²]
  • WallSun: Radiation for sunlit wall surface [W/m²]
  • WallShade: Radiation for shaded wall surface [W/m²]
  • TotalGround: Total radiation for all ground surfaces [W/m²]
  • TotalCanyon: Total radiation for entire canyon [W/m²]
source
UrbanTethysChloris.Radiation.create_longwave_radiationMethod
create_longwave_radiation(
    A_i::Vector{FT}, fgveg::FT, fgbare::FT, fgimp::FT,
    h_can::FT, w_can::FT, A_t::Union{FT,Nothing},
    Cimp::Bool, Cbare::Bool, Cveg::Bool
) where {FT<:AbstractFloat}

Helper function to create RadiationFluxes objects

source
UrbanTethysChloris.Radiation.direct_shortwave_surfacesMethod
direct_shortwave_surfaces(
    h_can::FT, w_can::FT, d_tree::FT, h_tree::FT, r_tree::FT,
    theta_Z::FT, theta_n::FT, SWR_dir::FT, LAIt::FT, trees::Bool,
    ParVegTree::NamedTuple
) where {FT<:AbstractFloat}

Calculate direct shortwave radiation received by different urban canyon surfaces.

Arguments

  • h_can: normalized building height [-]
  • w_can: normalized street width [-]
  • d_tree: location of trees in the canyon, tree-wall distance [-]
  • h_tree: height of trees, vertical level at the crown center [-]
  • r_tree: size of the tree crown, crown radius [-]
  • theta_Z: solar zenith angle [rad]
  • theta_n: difference between solar azimuth angle and canyon orientation [rad]
  • SWR_dir: direct shortwave radiation W/m^2 of horizontal surfaces [W/m^2]
  • LAIt: leaf area index of the tree [-]
  • trees: boolean indicating if trees are present
  • ParVegTree: named tuple containing vegetation parameters, including Kopt

Returns

  • SWRdir_g: direct shortwave radiation received by the ground [W/m^2]
  • SWRdir_wsun: direct shortwave radiation received by the sunlit wall [W/m^2]
  • SWRdir_wshd: direct shortwave radiation received by the shaded wall [W/m^2]
  • SWRdir_t: direct shortwave radiation received by the tree [W/m^2]
source
UrbanTethysChloris.Radiation.direct_shortwave_treesMethod
direct_shortwave_trees(h_can::FT, d_tree::FT, h_tree::FT, r_tree::FT, theta_Z::FT, theta_n::FT, SWR_dir::FT) where {FT<:AbstractFloat}

Calculate direct shortwave radiation received by two trees in an urban canyon.

Arguments

  • h_can: normalized building height [-]
  • d_tree: location of trees in the canyon, tree-wall distance [-]
  • h_tree: height of trees, vertical level at the crown center [-]
  • r_tree: size of the tree crown, crown radius [-]
  • theta_Z: solar zenith angle [rad]
  • theta_n: difference between solar azimuth angle and canyon orientation [rad]
  • SWR_dir: direct shortwave radiation W/m^2 of horizontal surfaces [W/m^2]

Returns

  • SWR_tree1: direct shortwave radiation received by tree 1 per m^2 tree surface [W/m^2]
  • SWR_tree2: direct shortwave radiation received by tree 2 per m^2 tree surface [W/m^2]
source
UrbanTethysChloris.Radiation.interpolateMethod
interpolate(tree::RadiationFluxes{FT}, notree::RadiationFluxes{FT}, tree_fraction::FT) where {FT<:AbstractFloat}

Combines radiation components from scenarios with and without trees based on the tree fraction.

Arguments

  • tree: RadiationFluxes instance representing scenario with trees
  • notree: RadiationFluxes instance representing scenario without trees
  • tree_fraction: Fraction of area covered by trees [0-1]

Returns

  • RadiationFluxes{FT}: Combined radiation components
source
UrbanTethysChloris.Radiation.longwave_absorbed_no_treeMethod
longwave_absorbed_no_tree(
        h_can::FT, w_can::FT, LWR::FT,
        fgveg::FT, fgbare::FT, fgimp::FT,
        ew::FT, egveg::FT, egbare::FT, egimp::FT,
        Tgimp::FT, Tgbare::FT, Tgveg::FT,
        Twsun::FT, Twshade::FT,
        view_factor::ViewFactor{FT}
) where {FT<:AbstractFloat}

Calculate longwave radiation exchange in an urban canyon without trees.

Arguments

  • h_can: Building height [-]
  • w_can: Ground width [-]
  • LWR: Atmospheric longwave radiation [W/m²]
  • fgveg: Partitioning ground vegetation [-]
  • fgbare: Partitioning ground bare [-]
  • fgimp: Partitioning ground impervious [-]
  • ew: Wall emissivity [-]
  • egveg: Ground vegetation emissivity [-]
  • egbare: Ground bare emissivity [-]
  • egimp: Ground impervious emissivity [-]
  • Tgimp: Temperature of ground impervious [K]
  • Tgbare: Temperature of ground bare [K]
  • Tgveg: Temperature of ground vegetated [K]
  • Twsun: Temperature of wall sun [K]
  • Twshade: Temperature of wall shade [K]
  • view_factor: View factors for radiation exchange

Returns

  • Tuple of (LWRinnT, LWRoutnT, LWRabs_nT) containing longwave radiation components
source
UrbanTethysChloris.Radiation.longwave_absorbed_with_treesMethod
longwave_absorbed_with_trees(
        h_can::FT, w_can::FT, r_tree::FT, LWR::FT,
        fgveg::FT, fgbare::FT, fgimp::FT,
        ew::FT, et::FT, egveg::FT, egbare::FT, egimp::FT,
        Tgimp::FT, Tgbare::FT, Tgveg::FT,
        Twsun::FT, Twshade::FT, Ttree::FT,
        view_factor::ViewFactor{FT}
) where {FT<:AbstractFloat}

Calculate longwave radiation exchange in an urban canyon with trees.

Arguments

  • h_can: Building height [-]
  • w_can: Ground width [-]
  • r_tree: Size of the tree crown, crown radius [-]
  • LWR: Atmospheric longwave radiation [W/m²]
  • fgveg: Partitioning ground vegetation [-]
  • fgbare: Partitioning ground bare [-]
  • fgimp: Partitioning ground impervious [-]
  • ew: Wall emissivity [-]
  • et: Tree emissivity [-]
  • egveg: Ground vegetation emissivity [-]
  • egbare: Ground bare emissivity [-]
  • egimp: Ground impervious emissivity [-]
  • Tgimp: Temperature of ground impervious [K]
  • Tgbare: Temperature of ground bare [K]
  • Tgveg: Temperature of ground vegetated [K]
  • Twsun: Temperature of wall sun [K]
  • Twshade: Temperature of wall shade [K]
  • Ttree: Temperature of tree [K]
  • view_factor: View factors for radiation exchange

Returns

  • Tuple of (LWRinT, LWRoutT, LWRabsT, LWREBT) containing longwave radiation components
source
UrbanTethysChloris.Radiation.shadow_length_no_treeMethod
shadow_length_no_tree(h_can::FT, w_can::FT, theta_Z::FT, theta_n::FT) where {FT<:AbstractFloat}

Calculate shadow lengths in an urban canyon without trees.

Arguments

  • h_can: normalized building height [-]
  • w_can: normalized street width [-]
  • theta_Z: solar zenith angle [rad]
  • theta_n: difference between solar azimuth angle and canyon orientation [rad]

Returns

  • X_Shadow: fraction of ground that is shaded [0-1]
  • X_tree: fraction of ground that is shaded by tree [0-1]
  • n_Shadow: fraction of wall that is shaded [0-1]
  • n_tree: fraction of wall that is shaded by tree [0-1]
source
UrbanTethysChloris.Radiation.shadow_length_with_treesMethod
shadow_length_with_trees(h_can::FT, w_can::FT, d_tree::FT, h_tree::FT, r_tree::FT, theta_Z::FT, theta_n::FT) where {FT<:AbstractFloat}

Calculate shadow lengths in an urban canyon with trees.

Arguments

  • h_can: normalized building height [-]
  • w_can: normalized street width [-]
  • d_tree: location of trees in the canyon, tree-wall distance [-]
  • h_tree: height of trees, vertical level at the crown center [-]
  • r_tree: size of the tree crown, crown radius [-]
  • theta_Z: solar zenith angle [rad]
  • theta_n: difference between solar azimuth angle and canyon orientation [rad]

Returns

  • X_Shadow: fraction of ground that is shaded [0-1]
  • X_tree: fraction of ground that is shaded by tree [0-1]
  • n_Shadow: fraction of wall that is shaded [0-1]
  • n_tree: fraction of wall that is shaded by tree [0-1]
source
UrbanTethysChloris.Radiation.shortwave_absorbed_no_treesMethod
shortwave_absorbed_no_trees(
    h_can::FT, w_can::FT,
    fgveg::FT, fgbare::FT, fgimp::FT,
    awraw::FT, agveg::FT, agbare::FT, agimp::FT,
    SWR_dir::FT, SWR_diff::FT,
    theta_z::FT, theta_n::FT,
    view_factor::ViewFactor{FT},
    ParVegTree::VegetationParams{FT},
    ParWindows::WindowParams{FT},
    bem_enabled::Bool
) where {FT<:AbstractFloat}

Calculate shortwave radiation exchange in an urban canyon without trees.

source
UrbanTethysChloris.Radiation.shortwave_absorbed_with_treesMethod
shortwave_absorbed_with_trees(
        h_can::FT, w_can::FT, h_tree::FT, r_tree::FT, d_tree::FT,
        fgveg::FT, fgbare::FT, fgimp::FT,
        awraw::FT, agveg::FT, agbare::FT, agimp::FT, at::FT,
        LAIt::FT, SWR_dir::FT, SWR_diff::FT,
        theta_Z::FT, theta_n::FT,
        view_factor::ViewFactor{FT},
        ParVegTree::VegetationParams{FT},
        ParWindows::WindowParams{FT},
        bem_enabled::Bool
) where {FT<:AbstractFloat}

Calculate shortwave radiation exchange in an urban canyon with trees.

Returns

Tuple of (SWRinT, SWRoutT, SWRabsT, SWRabsDirT, SWRabsDiffT, SWREBT, albedo_canyon)

source
UrbanTethysChloris.Radiation.total_longwave_absorbedMethod
total_longwave_absorbed(
    temperature_c::AbstractMatrix{FT},
    geometry::UrbanGeometryParameters{FT},
    LWR::FT,
    fractions_ground::LocationSpecificSurfaceFractions{FT},
    prop_optical_ground::VegetatedOpticalProperties{FT},
    prop_optical_wall::SimpleOpticalProperties{FT},
    prop_optical_tree::SimpleOpticalProperties{FT},
    view_factor::ViewFactor{FT}
) where {FT<:AbstractFloat}

Calculate total longwave radiation absorption for urban surfaces.

Arguments

  • temperature_c: Matrix of temperatures for each surface [K]
  • geometry: Urban geometry parameters
  • LWR: Atmospheric longwave radiation [W/m²]
  • fractions_ground: Ground surface fractions
  • prop_optical_ground: Ground optical properties
  • prop_optical_wall: Wall optical properties
  • prop_optical_tree: Tree optical properties
  • view_factor: View factors between surfaces

Returns

Tuple of (LWRint, LWRoutt, LWRabst, LWREBt)

source
UrbanTethysChloris.Radiation.total_shortwave_absorbedMethod
total_shortwave_absorbed(
    geometry::UrbanGeometryParameters{FT},
    SWR_dir::FT,
    SWR_diff::FT,
    theta_n::FT,
    theta_Z::FT,
    fractions_ground::LocationSpecificSurfaceFractions{FT},
    prop_optical_ground::VegetatedOpticalProperties{FT},
    prop_optical_wall::SimpleOpticalProperties{FT},
    prop_optical_tree::SimpleOpticalProperties{FT},
    par_veg_tree::HeightDependentVegetationParameters{FT},
    view_factor::ViewFactor{FT},
    par_windows::WindowParameters{FT},
    bem_enabled::Bool
) where {FT<:AbstractFloat}

Calculate total shortwave radiation absorption for urban surfaces.

Arguments

  • geometry: Urban geometry parameters
  • SWR_dir: Direct shortwave radiation [W/m²]
  • SWR_diff: Diffuse shortwave radiation [W/m²]
  • theta_n: Solar zenith angle [rad]
  • theta_Z: Solar azimuth angle [rad]
  • fractions_ground: Ground surface fractions
  • prop_optical_ground: Ground optical properties
  • prop_optical_wall: Wall optical properties
  • prop_optical_tree: Tree optical properties
  • par_veg_tree: Tree vegetation parameters
  • view_factor: View factors between surfaces
  • par_windows: Window parameters
  • bem_enabled: Whether building energy model is enabled

Returns

Tuple of (SWRint, SWRoutt, SWRabst, SWRabsDirt, SWRabsDifft, SWREBt, albedo_canyon)

source

RayTracing

UrbanTethysChloris.RayTracing.ViewFactorType
ViewFactor{FT<:AbstractFloat} <: AbstractViewFactor{FT}

View factors for radiation exchange between urban surfaces, combining cases with and without trees.

Fields

Without trees (nT)

  • F_gs_nT: Ground to sky view factor
  • F_gw_nT: Ground to wall view factor
  • F_ww_nT: Wall to wall view factor
  • F_wg_nT: Wall to ground view factor
  • F_ws_nT: Wall to sky view factor
  • F_sg_nT: Sky to ground view factor
  • F_sw_nT: Sky to wall view factor

With trees (T)

  • F_gs_T: Ground to sky view factor
  • F_gt_T: Ground to tree view factor
  • F_gw_T: Ground to wall view factor
  • F_ww_T: Wall to wall view factor
  • F_wt_T: Wall to tree view factor
  • F_wg_T: Wall to ground view factor
  • F_ws_T: Wall to sky view factor
  • F_sg_T: Sky to ground view factor
  • F_sw_T: Sky to wall view factor
  • F_st_T: Sky to tree view factor
  • F_tg_T: Tree to ground view factor
  • F_tw_T: Tree to wall view factor
  • F_ts_T: Tree to sky view factor
  • F_tt_T: Tree to tree view factor
source
UrbanTethysChloris.RayTracing.ViewFactorInternalType
ViewFactorInternal{FT<:AbstractFloat} <: AbstractViewFactor{FT}

View factors for internal surfaces in a building.

Fields

  • F_gc: Internal ground to ceiling view factor
  • F_gw: Internal ground to wall view factor
  • F_ww: Internal wall to wall view factor
  • F_wg: Internal wall to ground view factor
  • F_wc: Internal wall to ceiling view factor
  • F_cg: Internal ceiling to ground view factor
  • F_cw: Internal ceiling to wall view factor
source
UrbanTethysChloris.RayTracing.ViewFactorNoTreesType
ViewFactorNoTrees{FT<:AbstractFloat} <: AbstractViewFactor{FT}

View factors for radiation exchange between urban surfaces without trees.

Fields

  • F_gs: Ground to sky view factor
  • F_gw: Ground to wall view factor
  • F_ww: Wall to wall view factor
  • F_wg: Wall to ground view factor
  • F_ws: Wall to sky view factor
  • F_sg: Sky to ground view factor
  • F_sw: Sky to wall view factor
source
UrbanTethysChloris.RayTracing.ViewFactorPointType
ViewFactorPoint{FT<:AbstractFloat} <: AbstractViewFactor{FT}

View factors from a single point to urban surfaces.

Fields

  • F_pg: Point to ground view factor
  • F_ps: Point to sky view factor
  • F_pt: Point to tree view factor
  • F_pwLeft: Point to left wall view factor
  • F_pwRight: Point to right wall view factor
source
UrbanTethysChloris.RayTracing.ViewFactorWithTreesType
ViewFactorWithTrees{FT<:AbstractFloat} <: AbstractViewFactor{FT}

View factors for radiation exchange between urban surfaces with trees.

Fields

  • F_gs: Ground to sky view factor
  • F_gt: Ground to tree view factor
  • F_gw: Ground to wall view factor
  • F_ww: Wall to wall view factor
  • F_wt: Wall to tree view factor
  • F_wg: Wall to ground view factor
  • F_ws: Wall to sky view factor
  • F_sg: Sky to ground view factor
  • F_sw: Sky to wall view factor
  • F_st: Sky to tree view factor
  • F_tg: Tree to ground view factor
  • F_tw: Tree to wall view factor
  • F_ts: Tree to sky view factor
  • F_tt: Tree to tree view factor
source
UrbanTethysChloris.RayTracing.line_segment_intersectMethod
line_segment_intersect(XY1::AbstractMatrix{FT}, XY2::AbstractMatrix{FT})
line_segment_intersect(XY1::SVector{4, FT}, SVector{4, FT})

Find intersections between two sets of line segments in 2D space.

Arguments

  • XY1: vector/matrix where each row is [x1 y1 x2 y2] representing a line segment
  • XY2: vector/matrix where each row is [x1 y1 x2 y2] representing a line segment

Returns

A NamedTuple with fields:

  • intAdjacencyMatrix: N1×N2 boolean matrix indicating intersecting segments
  • intMatrixX: X coordinates of intersection points
  • intMatrixY: Y coordinates of intersection points
  • intNormalizedDistance1To2: Normalized distances from start of XY1 segments to intersections
  • intNormalizedDistance2To1: Normalized distances from start of XY2 segments to intersections
  • parAdjacencyMatrix: Boolean matrix indicating parallel segments
  • coincAdjacencyMatrix: Boolean matrix indicating coincident segments
source
UrbanTethysChloris.RayTracing.view_factor_internalMethod
view_factor_internal(
    Hbuild::FT,
    Wroof::FT
) where {FT<:AbstractFloat}

Calculate view factors for internal building surfaces.

Arguments

  • Hbuild: Building/canyon height [m]
  • Wroof: Roof/canyon width [m]

Returns

  • ViewFactor: View factors between internal surfaces
source
UrbanTethysChloris.RayTracing.view_factors_analyticalMethod
view_factors_analytical(H::FT, W::FT) where {FT<:AbstractFloat}

Compute analytical view factors without trees according to Harman et al. 2004

Arguments

  • H: canyon height [m]
  • W: canyon width [m]

Returns

  • ViewFactorNoTrees: struct containing view factors
source
UrbanTethysChloris.RayTracing.view_factors_canyonMethod
view_factors_canyon(
    geometry::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    person::ModelComponents.Parameters.PersonParameters{FT},
    mc_sample_size::Int = 1000,
    n_rays::Int = 200
) where {FT<:AbstractFloat}

Calculate view factors for an urban street canyon, considering both cases with and without trees.

Arguments

  • geometry: Urban geometry parameters including canyon dimensions and tree properties
  • person: Parameters describing a person's position in the canyon
  • mc_sample_size: Number of Monte Carlo samples for ray tracing (default: 1000)
  • n_rays: Number of rays to emit per sample point (default: 200)

Returns

A tuple containing:

  • vf: ViewFactor object containing both tree and no-tree view factors
  • vf_point: Point-specific view factors
source
UrbanTethysChloris.RayTracing.view_factors_computationMethod
view_factors_computation(
    XSv::Vector{FT}, YSv::Vector{FT}, dmax::FT, sz::FT, dthe::Vector{FT},
    x2::Vector{FT}, z2::Vector{FT}, x3::Vector{FT}, z3::Vector{FT},
    x4::Vector{FT}, z4::Vector{FT}, xc::FT, yc::FT, r::FT, xc2::FT,
    x5::Vector{FT}, z5::Vector{FT}
) where {FT<:AbstractFloat}
view_factors_computation(
    XSv::Vector{FT}, YSv::Vector{FT}, dmax::FT, sz::FT, dthe::Matrix{FT},
    x2::Vector{FT}, z2::Vector{FT}, x3::Vector{FT}, z3::Vector{FT},
    x4::Vector{FT}, z4::Vector{FT}, xc::FT, yc::FT, r::FT, xc2::FT,
    x5::Vector{FT}, z5::Vector{FT}
) where {FT<:AbstractFloat}

Compute view factors for urban canyon surfaces including trees.

Arguments

  • XSv, YSv: Coordinates of emitting points on emitting surface
  • x2,z2: Coordinates of ground surface
  • x3,z3: Coordinates of first wall surface
  • x4,z4: Coordinates of second wall surface
  • xc,yc: Coordinates of centre tree 1
  • xc2: x-coordinate of centre tree 2 (yc2 = yc)
  • r: Radius of tree
  • x5,z5: Coordinates of sky boundary points
  • dmax: Maximum search distance
  • sz: Search step size
  • dthe: Angular resolution in radians

Returns

Tuple of view factors (VG, VW1, VW2, VS, VT1, VT2) for:

  • Ground
  • Wall-1
  • Wall-2
  • Sky
  • Tree-1
  • Tree-2
source
UrbanTethysChloris.RayTracing.view_factors_geometryMethod
view_factors_geometry(H::FT, W::FT, a::FT, ht::FT, d::FT, person::PersonParameters{FT},
                     option_surface::Int, mc_sample_size::Int, n_rays::Int) where {FT<:AbstractFloat}

Compute view factors for urban canyon geometry.

Arguments

  • H: canyon height [m]
  • W: canyon width [m]
  • a: normalized tree radius [-]
  • ht: normalized tree height [-]
  • d: normalized tree distance from wall [-]
  • person: PersonParameters object containing position information
  • option_surface: specifies emitting surface (1=wall1, 2=wall2, 3=ground, 4=tree1, 5=tree2, 6=sky, 7=point)
  • mc_sample_size: number of emitting points per surface
  • n_rays: number of rays emitted per point

Returns

Tuple of view factors (VG, VW1, VW2, VS, VT1, VT2) for ground, walls, sky and trees

source
UrbanTethysChloris.RayTracing.view_factors_ray_tracingMethod
view_factors_ray_tracing(
    H::FT,
    W::FT,
    a::FT,
    ht::FT,
    d::FT,
    person::ModelComponents.Parameters.PersonParameters{FT},
    mc_sample_size::Int,
    n_rays::Int,
) where {FT<:AbstractFloat}

Calculate view factors for urban canyon surfaces using ray tracing method.

Arguments

  • H: canyon height [m]
  • W: canyon width [m]
  • a: normalized tree radius [-]
  • ht: normalized tree height [-]
  • d: normalized tree distance from wall [-]
  • person: PersonParameters object containing position information
  • mc_sample_size: number of Monte Carlo samples for ray tracing
  • n_rays: number of rays to emit per sample point

Returns

Tuple containing:

  • vf: ViewFactorWithTrees object containing view factors between surfaces
  • vfp: ViewFactorPoint object containing point-specific view factors
source
UrbanTethysChloris.RayTracing.view_factors_ray_tracing_reciprocityMethod
view_factors_ray_tracing_reciprocity(H::FT, W::FT, a::FT, ht::FT, d::FT, person::PersonParameters{FT},
                       mc_sample_size::Int, n_rays::Int) where {FT<:AbstractFloat}

Compute reciprocal view factors for urban canyon geometry.

Arguments

  • H: canyon height [m]
  • W: canyon width [m]
  • a: normalized tree radius [-]
  • ht: normalized tree height [-]
  • d: normalized tree distance from wall [-]
  • person: PersonParameters object containing position information
  • mc_sample_size: number of emitting points per surface
  • n_rays: number of rays emitted per point

Returns

Tuple containing (ViewFactorWithTrees, ViewFactorPoint, ViewFactorWithTrees)

source

Resistance

UrbanTethysChloris.Resistance.aerodynamic_resistanceMethod
aerodynamic_resistance(Ta, Ts, Pre, zatm, disp_h, zom, zoh, Ws, ea)

Calculate aerodynamic resistance from individual meteorological parameters.

Arguments

  • Ta: Air temperature [°C]
  • Ts: Surface temperature [°C]
  • Pre: Atmospheric pressure [hPa]
  • zatm: Reference height [m]
  • disp_h: Zero plane displacement height [m]
  • zom: Roughness length for momentum [m]
  • zoh: Roughness length for heat [m]
  • Ws: Wind speed [m/s]
  • ea: Vapor pressure [Pa]

Returns

  • ra: Aerodynamic resistance [s/m]
source
UrbanTethysChloris.Resistance.backcalculate_obhukov_lengthMethod
backcalculate_obhukov_length(
    ra::FT,
    zom::FT,
    zoh::FT,
    disp_h::FT,
    zatm::FT,
    u::FT
) where {FT<:AbstractFloat}

Calculate Monin-Obhukov length based on previously calculated ra to compute enhancement term due to non-local transport in the urban canopy.

Arguments

  • ra: Aerodynamic resistance [s/m]
  • zom: Momentum roughness length [m]
  • zoh: Heat roughness length [m]
  • disp_h: Displacement height [m]
  • zatm: Atmospheric measurement height [m]
  • u: Wind speed [m/s]

Returns

  • LAN: Monin-Obhukov length [m]
  • Diff_ra: Difference in aerodynamic resistance [s/m]
source
UrbanTethysChloris.Resistance.canopy_resistance_an_evolutionMethod
canopy_resistance_an_evolution(
    PAR_sun::FT,
    PAR_shd::FT,
    LAI::FT,
    Kopt::FT,
    Knit::FT,
    Fsun::FT,
    Fshd::FT,
    Citm1_sun::FT,
    Citm1_shd::FT,
    Ca::FT,
    ra::FT,
    rb::FT,
    Ts::FT,
    Ta::FT,
    Pre::FT,
    Ds::FT,
    Psi_L::FT,
    Psi_sto_50::FT,
    Psi_sto_99::FT,
    CT::Int,
    Vmax::FT,
    DS::FT,
    Ha::FT,
    FI::FT,
    Oa::FT,
    Do::FT,
    a1::FT,
    go::FT,
    e_rel::FT,
    e_relN::FT,
    gmes::FT,
    rjv::FT,
    mSl::FT,
    Sl::FT,
    atol::FT
) where {FT<:AbstractFloat}

Calculate canopy resistance and assimilation.

Arguments

  • PAR_sun: Photosynthetically active radiation for sunlit fraction [W/m²]
  • PAR_shd: Photosynthetically active radiation for shaded fraction [W/m²]
  • LAI: Leaf area index [-]
  • Kopt: Optical extinction coefficient [-]
  • Knit: Nitrogen extinction coefficient [-]
  • Fsun: Sunlit fraction [-]
  • Fshd: Shaded fraction [-]
  • Citm1_sun: Previous CO₂ concentration for sunlit fraction [μmolCO₂/mol]
  • Citm1_shd: Previous CO₂ concentration for shaded fraction [μmolCO₂/mol]
  • Ca: Atmospheric CO₂ concentration [μmolCO₂/mol]
  • ra: Aerodynamic resistance [s/m]
  • rb: Boundary layer resistance [s/m]
  • Ts: Surface temperature [°C]
  • Ta: Air temperature [°C]
  • Pre: Atmospheric pressure [hPa]
  • Ds: Vapor pressure deficit [Pa]
  • Psi_L: Leaf water potential [MPa]
  • Psi_sto_50: Water potential at 50% stomatal closure [MPa]
  • Psi_sto_99: Water potential at 99% stomatal closure [MPa]
  • CT: Photosynthesis type (1=C3, 2=C4)
  • Vmax: Maximum carboxylation rate [μmolCO₂/m²/s]
  • DS: Deactivation entropy [kJ/mol/K]
  • Ha: Activation energy [kJ/mol]
  • FI: Quantum yield [-]
  • Oa: Atmospheric O₂ concentration [μmolO₂/mol]
  • Do: Empirical coefficient for stomatal response [Pa]
  • a1: Empirical coefficient for stomatal response [-]
  • go: Minimum stomatal conductance [mol/m²/s]
  • e_rel: Age relative efficiency [-]
  • e_relN: Nitrogen relative efficiency [-]
  • gmes: Mesophyll conductance [mol/m²/s]
  • rjv: Ratio of Jmax to Vmax [-]
  • mSl: Empirical slope parameter [-]
  • Sl: Entropy parameter [kJ/mol/K]
  • atol: Absolute tolerance for CO₂ concentration solver

Returns

  • rs_sun: Sunlit stomatal resistance [s/m]
  • rs_shd: Shaded stomatal resistance [s/m]
  • Ci_sun: Sunlit leaf internal CO₂ concentration [μmolCO₂/mol]
  • Ci_shd: Shaded leaf internal CO₂ concentration [μmolCO₂/mol]
  • An: Net assimilation [μmolCO₂/m²/s]
  • Rdark: Dark respiration [μmolCO₂/m²/s]
  • Lpho: Light use [W/m²]
  • SIF: Solar-induced fluorescence [W/m²/sr/μm]
  • DCi: Change in CO₂ concentration [μmolCO₂/mol]
source
UrbanTethysChloris.Resistance.co2_concentrationMethod
co2_concentration(
    Cc::FT,
    IPAR::FT,
    Csl::FT,
    ra::FT,
    rb::FT,
    Ts::FT,
    Pre::FT,
    Ds::FT,
    Psi_L::FT,
    Psi_sto_50::FT,
    Psi_sto_99::FT,
    CT::Int,
    Vmax::FT,
    DSE::FT,
    Ha::FT,
    FI::FT,
    Oa::FT,
    Do::FT,
    a1::FT,
    go::FT,
    gmes::FT,
    rjv::FT
) where {FT<:AbstractFloat}

Calculate CO₂ concentration difference for root finding in stomatal conductance calculations.

Arguments

  • Cc: Initial internal CO₂ concentration [μmolCO₂/mol]
  • IPAR: Absorbed photosynthetically active radiation [W/m²]
  • Csl: Atmospheric CO₂ concentration [μmolCO₂/mol]
  • ra: Aerodynamic resistance [s/m]
  • rb: Leaf boundary layer resistance [s/m]
  • Ts: Leaf temperature [°C]
  • Pre: Atmospheric pressure [kPa]
  • Ds: Leaf-to-air vapor pressure deficit [Pa]
  • Psi_L: Leaf water potential [MPa]
  • Psi_sto_50: Leaf water potential at 50% stomatal closure [MPa]
  • Psi_sto_99: Leaf water potential at 99% stomatal closure [MPa]
  • CT: Photosynthesis model type (0 = C3, 1 = C4)
  • Vmax: Maximum carboxylation rate [μmolCO₂/m²s]
  • DSE: Entropy term [J/mol/K]
  • Ha: Activation energy [J/mol]
  • FI: Internal CO₂ to atmospheric CO₂ ratio [-]
  • Oa: Atmospheric O₂ concentration [mmol/mol]
  • Do: Empirical coefficient for stomatal sensitivity to VPD [kPa]
  • a1: Empirical coefficient for stomatal conductance model [-]
  • go: Minimum stomatal conductance [mol/m²s]
  • gmes: Mesophyll conductance [mol/m²s]
  • rjv: Ratio of Jmax to Vmax [-]

Returns

  • DCi: Difference between input and calculated CO₂ concentrations [μmolCO₂/mol]
source
UrbanTethysChloris.Resistance.enhancement_factor_ra_pleimMethod
enhancement_factor_ra_pleim(
    ra::FT,
    zom::FT,
    zoh::FT,
    disp_h::FT,
    zatm::FT,
    Ws::FT,
    hPBL::FT
) where {FT<:AbstractFloat}

Calculate enhancement factor for aerodynamic resistance according to Pleim et al. 2007.

Arguments

  • ra: Aerodynamic resistance [s/m]
  • zom: Momentum roughness length [m]
  • zoh: Heat roughness length [m]
  • disp_h: Displacement height [m]
  • zatm: Atmospheric measurement height [m]
  • Ws: Wind speed [m/s]
  • hPBL: Planetary boundary layer height [m]

Returns

  • fconv: Fraction of convective transport [-]
  • ra_enhanced: Enhanced aerodynamic resistance [s/m]
  • ra: Original aerodynamic resistance [s/m]
  • LAN: Monin-Obhukov length [m]
source
UrbanTethysChloris.Resistance.in_canyon_aerodynamic_resistanceMethod
in_canyon_aerodynamic_resistance(
    uatm::FT,
    Zatm::FT,
    Ta::FT,
    Ts::FT,
    hcan_max::FT,
    hcan::FT,
    dcan::FT,
    zomcan::FT,
    Zref_und::FT,
    zom_und::FT,
    Zp1::FT,
    Zp2::FT,
    Zp3::FT,
    Pre::FT,
    ea::FT,
    RoughnessParameter::Symbol
) where {FT<:AbstractFloat}

Calculate aerodynamic resistance within urban canyon.

Arguments

  • uatm: Wind speed at atmospheric reference height [m/s]
  • Zatm: Atmospheric reference height [m]
  • Ta: Air temperature [°C]
  • Ts: Surface temperature [°C]
  • hcan_max: Maximum canyon height [m]
  • hcan: Urban canyon height [m]
  • dcan: Urban canyon displacement height [m]
  • zomcan: Urban roughness length [m]
  • Zref_und: Reference height within canyon [m]
  • zom_und: Roughness length of ground surface [m]
  • Zp1: First height within canyon [m]
  • Zp2: Second height within canyon [m]
  • Zp3: Third height within canyon [m]
  • Pre: Atmospheric pressure [Pa]
  • ea: Vapor pressure [Pa]
  • RoughnessParameter: Roughness parameterization type

Returns

  • rap_can: Urban undercanopy resistance from ground to displacement height [s/m]
  • rap_Zp1: Undercanopy resistance from ground to Zp1 [s/m]
  • rap_Zp1_In: Inverse resistance from Zp1 to displacement height [s/m]
  • rap_Zp2: Undercanopy resistance from ground to Zp2 [s/m]
  • rap_Zp2_In: Inverse resistance from Zp2 to displacement height [s/m]
  • rap_Zp3: Undercanopy resistance from ground to Zp3 [s/m]
  • rap_Zp3_In: Inverse resistance from Zp3 to displacement height [s/m]
  • u_Hcan: Wind speed at canyon height [m/s]
  • u_Zp1: Wind speed at Zp1 [m/s]
  • u_Zp2: Wind speed at Zp2 [m/s]
  • u_Zp3: Wind speed at Zp3 [m/s]
  • uref_und: Wind speed at reference height [m/s]
  • alpha: Canyon attenuation coefficient [-]
source
UrbanTethysChloris.Resistance.precalculate_for_faster_numerical_solutionMethod
precalculate_for_faster_numerical_solution(
    ittn::Int,
    ittm::Int,
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    MeteoData::NamedTuple,
    HumidityAtm::NamedTuple,
    geometry::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    PropOpticalGround::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    PropOpticalWall::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    PropOpticalTree::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SunPosition::NamedTuple,
    ViewFactor::RayTracing.ViewFactor{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    PropOpticalRoof::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    RES::NamedTuple,
) where {FT<:AbstractFloat}

Calculate enhancement factor and precalculate stomatal resistances for faster numerical solution.

Arguments

  • ittn::Int: Current Newton iteration index
  • ittm::Int: Current time step index
  • TempVec_ittm: Temperature vector containing surface temperatures
  • Humidity_ittm: Humidity data structure
  • ParVegGround: Ground vegetation parameters
  • SoilPotW_ittm: Soil water potential data
  • CiCO2Leaf_ittm: Leaf CO2 concentration data
  • MeteoData: Meteorological data structure
  • HumidityAtm: Atmospheric humidity data structure
  • geometry: Urban geometry parameters
  • FractionsGround: Ground surface fractions
  • PropOpticalGround: Ground optical properties
  • PropOpticalWall: Wall optical properties
  • PropOpticalTree: Tree optical properties
  • ParVegTree: Tree vegetation parameters
  • SunPosition: Sun position parameters
  • ViewFactor: View factors between urban surfaces
  • ParWindows: Window parameters
  • BEM_on: Building energy model flag
  • ParVegRoof: Roof vegetation parameters
  • PropOpticalRoof: Roof optical properties
  • FractionsRoof: Roof surface fractions
  • RES: Resistance values from previous iterations

Returns

  • fconv: Enhancement factor for convective resistance [-]
  • rsRoofPreCalc: Named tuple with roof vegetation stomatal resistance parameters:
    • rs_sun: Stomatal resistance for sunlit leaves [s/m]
    • rs_shd: Stomatal resistance for shaded leaves [s/m]
    • Ci_sun: Internal CO2 concentration for sunlit leaves [ppm]
    • Ci_shd: Internal CO2 concentration for shaded leaves [ppm]
  • rsGroundPreCalc: Named tuple with ground vegetation stomatal resistance parameters:
    • rs_sun_L: Stomatal resistance for sunlit leaves [s/m]
    • rs_shd_L: Stomatal resistance for shaded leaves [s/m]
    • Ci_sun_L: Internal CO2 concentration for sunlit leaves [ppm]
    • Ci_shd_L: Internal CO2 concentration for shaded leaves [ppm]
  • rsTreePreCalc: Named tuple with tree stomatal resistance parameters:
    • rs_sun_H: Stomatal resistance for sunlit leaves [s/m]
    • rs_shd_H: Stomatal resistance for shaded leaves [s/m]
    • Ci_sun_H: Internal CO2 concentration for sunlit leaves [ppm]
    • Ci_shd_H: Internal CO2 concentration for shaded leaves [ppm]
source
UrbanTethysChloris.Resistance.precalculate_stomatal_resistance_roofMethod
precalculate_stomatal_resistance_roof(
    TempVec_ittm::NamedTuple,
    MeteoData::NamedTuple,
    HumidityAtm::NamedTuple,
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    PropOpticalRoof::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    ra::FT,
    rb::FT
) where {FT<:AbstractFloat}

Calculate stomatal resistance for sunlit and shaded portions of the roof vegetation.

Arguments

  • TempVec_ittm: Temperature vector containing roof vegetation temperature
  • MeteoData: Meteorological data including atmospheric temperature, pressure, CO2 concentration
  • HumidityAtm: Atmospheric humidity data structure with vapor pressure
  • ParVegRoof: Roof vegetation parameters including LAI, photosynthesis properties
  • SoilPotW_ittm: Soil water potential data for roof vegetation
  • CiCO2Leaf_ittm: Previous iteration leaf CO2 concentration data
  • PropOpticalRoof: Roof optical properties for radiation absorption
  • ra: Aerodynamic resistance between roof and atmosphere [s/m]
  • rb: Boundary layer resistance for roof vegetation [s/m]

Returns

  • rs_sun: Stomatal resistance for sunlit roof vegetation leaves [s/m]
  • rs_shd: Stomatal resistance for shaded roof vegetation leaves [s/m]
  • Ci_sun: Internal CO2 concentration for sunlit roof vegetation leaves [ppm]
  • Ci_shd: Internal CO2 concentration for shaded roof vegetation leaves [ppm]
source
UrbanTethysChloris.Resistance.process_leaf_fractionMethod
process_leaf_fraction(
    F::FT,
    PAR::FT,
    Citm1::FT,
    Ca::FT,
    ra::FT,
    rb::FT,
    Ts::FT,
    Pre::FT,
    Ds::FT,
    Psi_L::FT,
    Psi_sto_50::FT,
    Psi_sto_99::FT,
    CT::Int,
    Vmax::FT,
    DS::FT,
    Ha::FT,
    FI::FT,
    Oa::FT,
    Do::FT,
    a1::FT,
    go::FT,
    gmes::FT,
    rjv::FT,
    atol::FT
) where {FT<:AbstractFloat}

Process CO₂ assimilation for a leaf fraction (sunlit or shaded).

Arguments

  • F: Leaf fraction [-]
  • PAR: Photosynthetically active radiation [W/m²]
  • Citm1: Previous CO₂ concentration [μmolCO₂/mol]
  • Ca: Atmospheric CO₂ concentration [μmolCO₂/mol]
  • ra: Aerodynamic resistance [s/m]
  • rb: Boundary layer resistance [s/m]
  • Ts: Leaf temperature [K]
  • Pre: Atmospheric pressure [Pa]
  • Ds: Vapor pressure deficit [Pa]
  • Psi_L: Leaf water potential [MPa]
  • Psi_sto_50: 50% storage water potential [MPa]
  • Psi_sto_99: 99% storage water potential [MPa]
  • CT: Temperature coefficient
  • Vmax: Maximum carboxylation rate [μmolCO₂/m²/s]
  • DS: Stomatal conductance [m/s]
  • Ha: Leaf area [m²]
  • FI: Light intensity [μmol photons/m²/s]
  • Oa: Ambient oxygen concentration [μmolO₂/mol]
  • Do: Diffusion coefficient [m²/s]
  • a1: Parameter for photosynthesis model
  • go: Stomatal conductance [m/s]
  • gmes: Mesophyll conductance [m/s]
  • rjv: Jmax/Rubisco parameter
  • atol: Absolute tolerance for root finding

Returns

  • Ci: Leaf internal CO₂ concentration [μmolCO₂/mol]
  • CiF: Leaf internal CO₂ concentration at equilibrium [μmolCO₂/mol]
  • An: Net assimilation rate [μmolCO₂/m²/s]
  • rc: Canopy resistance [s/m]
  • Rdark: Dark respiration rate [μmolCO₂/m²/s]
  • SIF: Solar-induced fluorescence [W/m²/sr/μm]
source
UrbanTethysChloris.Resistance.solve_obhukov_lengthMethod
solve_obhukov_length(LAN::FT, ra::FT, zom::FT, zoh::FT, z::FT, u::FT) where {FT<:AbstractFloat}

Calculate residual for Monin-Obhukov length solver.

Arguments

  • LAN: Monin-Obhukov length [m]
  • ra: Aerodynamic resistance [s/m]
  • zom: Momentum roughness length [m]
  • zoh: Heat roughness length [m]
  • z: Reference height [m]
  • u: Wind speed [m/s]

Returns

  • Diff_ra: Residual in aerodynamic resistance [s/m]
source
UrbanTethysChloris.Resistance.urban_roughnessMethod
urban_roughness(
    hc_H::FT,
    hc_L::FT,
    Csoil::Bool,
    Croad::Bool,
    Croof::Bool
) where {FT<:AbstractFloat}

Calculate urban surface roughness parameters.

Arguments

  • hc_H: Canopy height of high vegetation layer [m]
  • hc_L: Canopy height of low vegetation layer [m]
  • Csoil: Presence of soil
  • Croad: Presence of road
  • Croof: Presence of roof

Returns

  • zom: Roughness momentum [m]
  • zoh: Roughness heat [m]
  • zom_ground: Ground roughness momentum [m]
  • zoh_ground: Ground roughness heat [m]
  • disp_h: Maximum displacement height [m]
  • zom_H: High vegetation roughness momentum [m]
  • zom_L: Low vegetation roughness momentum [m]
  • zoh_H: High vegetation roughness heat [m]
  • zoh_L: Low vegetation roughness heat [m]
  • d_H: High vegetation displacement height [m]
  • d_L: Low vegetation displacement height [m]
  • zom_other: Other urban surfaces roughness momentum [m]
source
UrbanTethysChloris.Resistance.wind_profile_canyonMethod
wind_profile_canyon(
    Hcan::FT,
    Htree::FT,
    R_tree::FT,
    Wcan::FT,
    Wroof::FT,
    Kopt::FT,
    LAI_t::FT,
    Zatm::FT,
    uatm::FT,
    Zp::FT,
    trees::Bool,
    Zref_und::FT,
    zom_und::FT,
    Hcan_max::FT,
    Hcan_std::FT
) where {FT<:AbstractFloat}

Calculate urban canyon wind profile parameters.

Arguments

  • Hcan: Canyon height [m]
  • Htree: Tree height [m]
  • R_tree: Tree radius [m]
  • Wcan: Canyon width [m]
  • Wroof: Roof width [m]
  • Kopt: Optical transmission factor [-]
  • LAI_t: Tree leaf area index [-]
  • Zatm: Atmospheric reference height [m]
  • uatm: Wind speed at atmospheric reference height [m/s]
  • Zp: Height of interest within canyon [m]
  • trees: Presence of trees
  • Zref_und: Reference height within canyon [m]
  • zom_und: Roughness length of ground surface [m]
  • Hcan_max: Maximum canyon height [m]
  • Hcan_std: Standard deviation of canyon height [m]

Returns

  • dcan: Urban displacement height including trees [m]
  • zomcan: Urban momentum roughness height including trees [m]
  • u_Hcan_max: Wind speed at canyon height [m/s]
  • u_Zp: Wind speed within canyon at height Zp [m/s]
  • w_Zp: Vertical wind speed within canyon [m/s]
  • alpha: Canyon attenuation coefficient [-]
  • RoughnessParameter: Type of roughness parameterization used
source
UrbanTethysChloris.Resistance.wind_profile_point_outputMethod
wind_profile_point_output(
    Zp::FT,
    Gemeotry_m::NamedTuple,
    ParVegTree::NamedTuple,
    ParTree::NamedTuple,
    MeteoData::NamedTuple,
    FractionsGround::NamedTuple,
    ParVegGround::NamedTuple
) where {FT<:AbstractFloat}

Calculate wind speed at a specific height in urban canyon.

Arguments

  • Zp: Height of interest [m]
  • Gemeotry_m: Canyon geometry parameters
  • ParVegTree: Tree vegetation parameters
  • ParTree: Tree presence parameters
  • MeteoData: Meteorological data
  • FractionsGround: Ground fraction parameters
  • ParVegGround: Ground vegetation parameters

Returns

  • u_Zp: Wind speed at height Zp [m/s]
source
UrbanTethysChloris.Resistance.wind_profile_roofMethod
wind_profile_roof(
    Hcan::FT,
    Zatm::FT,
    uatm::FT,
    zom::FT,
    disp_h::FT,
    hveg::FT,
    Zp::FT
) where {FT<:AbstractFloat}

Calculate wind profile above roof surface.

Arguments

  • Hcan: Canyon height [m]
  • Zatm: Atmospheric reference height [m]
  • uatm: Wind speed at atmospheric reference height [m/s]
  • zom: Roughness length of roof cover [m]
  • disp_h: Displacement height [m]
  • hveg: Vegetation height [m]
  • Zp: Height of interest [m]

Returns

  • u_Zp: Wind speed at height Zp [m/s]
  • u_Hveg: Wind speed at vegetation top [m/s]
source

Soil

UrbanTethysChloris.Soil.conductivity_suctionMethod
conductivity_suction(
    SPAR::Int,
    Ks::FT,
    Osat::FT,
    Ohy::FT,
    L::FT,
    Pe::FT,
    O33::FT,
    alpVG::FT,
    nVG::FT,
    O::FT
) where {FT<:AbstractFloat}

conductivity_suction(
    SPAR::Int,
    Ks::FT,
    Osat::FT,
    Ohy::FT,
    L::FT,
    Pe::FT,
    O33::FT,
    alpVG::FT,
    nVG::FT,
    O::Vector{FT},
) where {FT<:AbstractFloat}

conductivity_suction(
    SPAR::Int,
    Ks::Vector{FT},
    Osat::Vector{FT},
    Ohy::Vector{FT},
    L::Vector{FT},
    Pe::Vector{FT},
    O33::Vector{FT},
    alpVG::Vector{FT},
    nVG::Vector{FT},
    O::Vector{FT},
) where {FT<:AbstractFloat}

weighted_conductivity_suction(
    SPAR::Int,
    Ks::Vector{FT},
    Osat::Vector{FT},
    Ohy::Vector{FT},
    L::Vector{FT},
    Pe::Vector{FT},
    O33::Vector{FT},
    alpVG::Vector{FT},
    nVG::Vector{FT},
    O::FT,
    weights::Vector{FT},
) where {FT<:AbstractFloat}

Calculate soil hydraulic conductivity and matric suction using specified model.

Arguments

  • SPAR: Soil parameterization choice:
    1. Van-Genuchten (1980) corrected
    2. Saxton-Rawls (1986)
  • Ks: Saturated hydraulic conductivity [mm/h]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • L: Lambda parameter for Saxton-Rawls model [-]
  • Pe: Air entry pressure [kPa]
  • O33: Water content at -33 kPa [m³/m³]
  • alpVG: Van Genuchten α parameter [1/mm]
  • nVG: Van Genuchten n parameter [-]
  • O: Current water content [m³/m³]
  • weights: Weights for each soil layer [dimensionless]

Returns

  • Ko: Unsaturated hydraulic conductivity [mm/h]
  • Po: Matric potential [mm]
source
UrbanTethysChloris.Soil.evaporation_layersMethod
evaporation_layers(Zs::Vector{FT}, Zdes::FT)

Calculate the evaporation layer fraction for each soil layer based on the desorption depth.

Arguments

  • Zs::Vector{FT}: Vector of depth layers in mm, from top to bottom [1....m+1]
  • Zdes::FT: Depth of desorption in mm

Returns

  • EvL_Zs::Vector{FT}: Vector of evaporation layer fractions [1...m], where each element represents the fraction of evaporation for the corresponding layer

Notes

  • The function checks if the desorption depth is within the valid range defined by the layers
  • If Zdes < first layer depth: returns zeros with error message "ERROR FIRST LAYER TOO DEPTH"
  • If Zdes > last layer depth: returns zeros with error message "ERROR LAST LAYER TOO SHALLOW"
  • The sum of all fractions equals 1 when Zdes is within valid range
source
UrbanTethysChloris.Soil.infiltrationMethod
infiltration(
    Osat::FT,
    Ohy::FT,
    L::FT,
    alpVG::FT,
    nVG::FT,
    Pe::FT,
    Ks_Zs::FT,
    O33::FT,
    SPAR::Int,
    O::FT,
    Dz::FT,
    WIS::FT,
    cosalp::FT,
    Pond::FT
) where {FT<:AbstractFloat}

Calculate infiltration rates based on soil parameters and conditions.

Arguments

  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • L: Pore size distribution index [-]
  • alpVG: van Genuchten α parameter [1/mm]
  • nVG: van Genuchten n parameter [-]
  • Pe: Air entry pressure [kPa]
  • Ks_Zs: Saturated hydraulic conductivity [mm/h]
  • O33: Water content at -33 kPa [m³/m³]
  • SPAR: Soil parameterization choice:
    1. van Genuchten (1980)
    2. Saxton-Rawls (1986)
  • O: Current soil water content [m³/m³]
  • Dz: Distance from surface to half-layer [mm]
  • WIS: Water incoming to soil layer [mm/h]
  • cosalp: Cosine of slope angle [-]
  • Pond: Ponding depth [mm]

Returns

  • f: Actual infiltration rate [mm/h]
  • fpot: Potential infiltration rate [mm/h]
source
UrbanTethysChloris.Soil.leakage_bottomMethod
leakage_bottom(
    O::Vector{FT},
    Ks_Zs::Vector{FT},
    Osat::Vector{FT},
    Ohy::Vector{FT},
    L::Vector{FT},
    nVG::Vector{FT},
    Kbot::FT,
    ms::Int,
    SPAR::Int
) where {FT<:AbstractFloat}

Calculate bottom leakage for soil water movement.

Arguments

  • O: Soil water content [m³/m³]
  • Ks_Zs: Saturated hydraulic conductivity [mm/h]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • L: Pore size distribution index [-]
  • nVG: van Genuchten n parameter [-]
  • Kbot: Bottom boundary hydraulic conductivity [mm/h]
  • ms: Index of bottom soil layer [-]
  • SPAR: Soil parameterization choice:
    1. van Genuchten (1980)
    2. Saxton-Rawls (1986)

Returns

  • Lk: Bottom boundary leakage flux [mm/h]
source
UrbanTethysChloris.Soil.root_fraction_generalMethod
root_fraction_general(
    Zs::Vector{FT},
    CASE_ROOT::Int,
    ZR95_H::Vector{FT},
    ZR50_H::Vector{FT},
    ZR95_L::Vector{FT},
    ZR50_L::Vector{FT},
    ZRmax_H::Vector{FT},
    ZRmax_L::Vector{FT}
) where {FT<:AbstractFloat}

Compute root fraction distributions for high and low vegetation using different root profile models.

Arguments

  • Zs: Soil layer depths [mm]
  • CASE_ROOT: Root profile type:
    1. Exponential (Arora and Boer 2005)
    2. Linear Dose Response (Schenk and Jackson 2002)
    3. Constant Profile
    4. Deep (Tap) Root Profile
  • ZR95_H: 95th percentile root depth for high vegetation [mm]
  • ZR50_H: 50th percentile root depth for high vegetation [mm]
  • ZR95_L: 95th percentile root depth for low vegetation [mm]
  • ZR50_L: 50th percentile root depth for low vegetation [mm]
  • ZRmax_H: Maximum root depth for high vegetation [mm]
  • ZRmax_L: Maximum root depth for low vegetation [mm]

Returns

  • RfH_Zs: Root fraction distribution for high vegetation [dimensionless]
  • RfL_Zs: Root fraction distribution for low vegetation [dimensionless]
source
UrbanTethysChloris.Soil.root_soil_conductanceMethod
root_soil_conductance(
    Ks::FT,
    Rl::FT,
    rcyl::FT,
    rroot::FT,
    Zr::FT
) where {FT<:AbstractFloat}

Calculate soil-to-root conductance using the Holtta/Sperry model.

Arguments

  • Ks: Saturated hydraulic conductivity [mm/h]
  • Rl: Root length index [m root/m² ground]
  • rcyl: Radius of the cylinder of soil to which root has access [m]
  • rroot: Root radius [m]
  • Zr: Rooting depth [m]

Returns

  • Ksr: Soil-to-root conductance [mmol H₂O / m² ground s MPa]
source
UrbanTethysChloris.Soil.soil_moisture_conductivity_updateMethod
soil_moisture_conductivity_update(
    V::Vector{FT},
    Pcla::FT,
    Psan::FT,
    Porg::FT,
    Kfc::FT,
    Phy::FT,
    SPAR::Int,
    Kbot::FT,
    CASE_ROOT_H::Int,
    CASE_ROOT_L::Int,
    ZR95_H::Vector{FT},
    ZR95_L::Vector{FT},
    ZR50_H::Vector{FT},
    ZR50_L::Vector{FT},
    ZRmax_H::Vector{FT},
    ZRmax_L::Vector{FT},
    Zs::Vector{FT},
    Rrootl_H::Vector{FT},
    Rrootl_L::Vector{FT},
    PsiL50_H::Vector{FT},
    PsiL50_L::Vector{FT},
    PsiX50_H::Vector{FT},
    PsiX50_L::Vector{FT}
) where {FT<:AbstractFloat}

Updates soil moisture content and calculates hydraulic properties based on current conditions.

Arguments

  • V: Soil water volume per unit area [mm]
  • Pcla: Clay fraction in soil [-]
  • Psan: Sand fraction in soil [-]
  • Porg: Organic matter fraction in soil [-]
  • Kfc: Hydraulic conductivity at field capacity [mm/h]
  • Phy: Soil water potential at hygroscopic point [kPa]
  • SPAR: Soil parameterization choice:
    1. Van-Genuchten (1980)
    2. Saxton-Rawls (1986)
  • Kbot: Hydraulic conductivity at bottom boundary [mm/h]
  • CASE_ROOT_H: Root distribution type for high vegetation [-]
  • CASE_ROOT_L: Root distribution type for low vegetation [-]
  • ZR95_H: 95th percentile root depth for high vegetation [mm]
  • ZR95_L: 95th percentile root depth for low vegetation [mm]
  • ZR50_H: 50th percentile root depth for high vegetation [mm]
  • ZR50_L: 50th percentile root depth for low vegetation [mm]
  • ZRmax_H: Maximum root depth for high vegetation [mm]
  • ZRmax_L: Maximum root depth for low vegetation [mm]
  • Zs: Soil layer depths [mm]
  • Rrootl_H: Root length density for high vegetation [mm/mm³]
  • Rrootl_L: Root length density for low vegetation [mm/mm³]
  • PsiL50_H: Leaf water potential at 50% conductance loss for high vegetation [MPa]
  • PsiL50_L: Leaf water potential at 50% conductance loss for low vegetation [MPa]
  • PsiX50_H: Xylem water potential at 50% conductance loss for high vegetation [MPa]
  • PsiX50_L: Xylem water potential at 50% conductance loss for low vegetation [MPa]

Returns

  • V: Updated soil water volume [mm]
  • O: Volumetric soil moisture content [m³/m³]
  • OS: Surface soil moisture [m³/m³]
  • Psi_soil: Soil water potential [MPa]
  • Psi_s_H: Soil water potential for high vegetation [MPa]
  • Psi_s_L: Soil water potential for low vegetation [MPa]
  • Exwat_H: Water extraction rate for high vegetation [mm/h]
  • Exwat_L: Water extraction rate for low vegetation [mm/h]
  • Ko: Hydraulic conductivity [mm/h]
source
UrbanTethysChloris.Soil.soil_moistures_rich_compMethod
soil_moistures_rich_comp(
    V,
    Lk,
    f,
    EG,
    T_H,
    T_L,
    Qi_in,
    IS,
    SPAR,
    Osat,
    Ohy,
    O33,
    dz,
    Ks_Zs,
    Dz,
    numn,
    L,
    Pe,
    aR,
    aT,
    alpVG,
    nVG,
    cosalp,
    sinalp,
    SN)

Calculate soil moisture changes using Richards equation-based hydrological model.

Arguments

  • V::Vector{FT}: Current soil water volume per unit area [mm]
  • Lk::FT: Bottom leakage rate [mm/h]
  • f::FT: Infiltration rate at top boundary [mm/h]
  • EG::Vector{FT}: Evaporation rates from ground [mm/h]
  • T_H::Vector{FT}: Transpiration rates from hydrophilic roots [mm/h]
  • T_L::Vector{FT}: Transpiration rates from hydrophobic roots [mm/h]
  • Qi_in::Vector{FT}: Lateral inflow rates [mm/h]
  • IS::Vector{FT}: Surface water indicator (1 for surface water present)
  • SPAR::Int: Soil parameter set selector (1: Van Genuchten, 2: Brooks-Corey)
  • Osat::Vector{FT}: Saturated water content at 0 kPa
  • Ohy::Vector{FT}: Residual (hygroscopic) water content
  • O33::Vector{FT}: Water content at -33 kPa tension
  • dz::Vector{FT}: Layer thicknesses [mm]
  • Ks_Zs::Vector{FT}: Saturated hydraulic conductivity [mm/h]
  • Dz::Vector{FT}: Distance between layer centers [mm]
  • numn::Int: Number of soil layers
  • L::Vector{FT}: Lambda parameter (slope of log tension-moisture curve)
  • Pe::Vector{FT}: Air entry tension (bubbling pressure) [kPa]
  • aR::FT: Horizontal length scale parameter
  • aT::FT: Terrain curvature parameter
  • alpVG::Vector{FT}: van Genuchten α parameter
  • nVG::Vector{FT}: van Genuchten n parameter
  • cosalp::FT: Cosine of slope angle
  • sinalp::FT: Sine of slope angle
  • SN::FT: Stream network identifier

Returns

  • dV::Vector{FT}: Change rates of soil water volume per unit area [mm/h]
source
UrbanTethysChloris.Soil.soil_moistures_rich_comp_lat2Method
soil_moistures_rich_comp_lat2(
    Vlat::Vector{FT},
    dz::FT,
    SPAR::Int,
    Ks::FT,
    Osat::FT,
    Ohy::FT,
    L::FT,
    Pe::FT,
    O33::FT,
    alpVG::FT,
    nVG::FT,
    C1::FT,
    C2::FT,
    f1::FT,
    f2::FT,
    Wcan::FT
) where {FT<:AbstractFloat}

Calculate lateral soil moisture redistribution between soil columns.

Arguments

  • Vlat: Vector of soil water volumes per unit area for both columns [mm]
  • dz: Layer thickness [mm]
  • SPAR: Soil parameterization choice (1: Van-Genuchten, 2: Saxton-Rawls)
  • Ks: Saturated hydraulic conductivity [mm/h]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • L: Lambda parameter (for Saxton-Rawls model) [-]
  • Pe: Air entry pressure [kPa]
  • O33: Water content at -33 kPa [m³/m³]
  • alpVG: Van Genuchten α parameter [1/mm]
  • nVG: Van Genuchten n parameter [-]
  • C1: Column 1 coefficient [-]
  • C2: Column 2 coefficient [-]
  • f1: Fraction for column 1 [-]
  • f2: Fraction for column 2 [-]
  • Wcan: Canopy width [m]

Returns

  • dVlat: Change rates of soil water volume per unit area for both columns [mm/h]

Notes

  • If f1 or f2 is zero, the corresponding flux is set to zero.
source
UrbanTethysChloris.Soil.soil_moistures_rich_comp_lat3Method
soil_moistures_rich_comp_lat3(
    Vlat::Vector{FT},
    dz::FT,
    SPAR::Int,
    Ks::FT,
    Osat::FT,
    Ohy::FT,
    L::FT,
    Pe::FT,
    O33::FT,
    alpVG::FT,
    nVG::FT,
    Cimp::FT,
    Cbare::FT,
    Cveg::FT,
    fimp::FT,
    fbare::FT,
    fveg::FT,
    Wcan::FT
) where {FT<:AbstractFloat}

Calculate lateral soil moisture redistribution between three soil columns.

Arguments

  • Vlat: Soil water volume per unit area for each column [mm]
  • dz: Soil layer thickness [mm]
  • SPAR: Soil parameterization choice:
    1. van Genuchten (1980)
    2. Saxton-Rawls (1986)
  • Ks: Saturated hydraulic conductivity [mm/h]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • L: Pore size distribution index [-]
  • Pe: Air entry pressure [kPa]
  • O33: Water content at -33 kPa [m³/m³]
  • alpVG: van Genuchten α parameter [1/mm]
  • nVG: van Genuchten n parameter [-]
  • Cimp: Contact length of impervious column [mm]
  • Cbare: Contact length of bare soil column [mm]
  • Cveg: Contact length of vegetated column [mm]
  • fimp: Fraction of impervious area [-]
  • fbare: Fraction of bare soil area [-]
  • fveg: Fraction of vegetated area [-]
  • Wcan: Canyon width [mm]

Returns

  • dVlat::Vector{FT}: Change rates of soil water volume [mm/h] for:
    1. Impervious column
    2. Bare soil column
    3. Vegetated column
source
UrbanTethysChloris.Soil.soil_parametersMethod
soil_parameters(
    Psan::FT,
    Pcla::FT,
    Porg::FT
) where {FT<:AbstractFloat}

Calculate soil hydraulic and thermal parameters based on soil texture composition.

Arguments

  • Psan: Sand fraction in soil [0-1]
  • Pcla: Clay fraction in soil [0-1]
  • Porg: Organic matter fraction in soil [0-1]

Returns

  • Osat::FT: Saturated soil water content [-]
  • L::FT: Slope of logarithmic tension-moisture curve [-]
  • Pe::FT: Air entry tension [kPa]
  • Ks::FT: Saturated hydraulic conductivity [mm/h]
  • O33::FT: Soil water content at 33 kPa [-]
  • rsd::FT: Soil bulk density [kg/m³]
  • lan_dry::FT: Thermal conductivity of dry soil [W/m K]
  • lan_s::FT: Thermal conductivity of solid soil components [W/m K]
  • cv_s::FT: Volumetric heat capacity of solid soil components [J/m³ K]
  • K_usle::FT: USLE K factor for soil erodibility [kgh/Jmm]
source
UrbanTethysChloris.Soil.soil_parameters2Method
soil_parameters2(
    Osat::Vector{FT},
    L::Vector{FT},
    Pe::Vector{FT},
    Ks::Vector{FT},
    O33::Vector{FT},
    nVG::Vector{FT},
    alpVG::Vector{FT},
    Kfc::FT,
    Pss::FT,
    Pwp::FT,
    Phy::FT,
    Ohy::Vector{FT}=zeros(FT, length(Osat)),
    SPAR::Int=2
) where {FT<:AbstractFloat}

Calculate soil moisture retention points based on soil hydraulic parameters.

Arguments

  • Osat::Vector{FT}: Saturated soil water content [-]
  • L::Vector{FT}: Pore size distribution index [-]
  • Pe::Vector{FT}: Air entry pressure [kPa]
  • Ks::Vector{FT}: Saturated hydraulic conductivity [mm/h]
  • O33::Vector{FT}: Soil water content at -33 kPa [-]
  • nVG::Vector{FT}: van Genuchten n parameter [-]
  • alpVG::Vector{FT}: van Genuchten α parameter [1/mm]
  • Kfc::FT: Hydraulic conductivity at field capacity [mm/h]
  • Pss::FT: Soil water potential at steady state [kPa]
  • Pwp::FT: Permanent wilting point potential [kPa]
  • Phy::FT: Hygroscopic point potential [kPa]
  • Ohy::Vector{FT}: Initial hygroscopic water content [-]
  • SPAR::Int: Soil parameter set:
    1. van Genuchten (1980)
    2. Brooks-Corey (default)

Returns

  • Ofc::Vector{FT}: Soil water content at field capacity [-]
  • Oss::Vector{FT}: Soil water content at steady state [-]
  • Owp::Vector{FT}: Soil water content at wilting point [-]
  • Ohy::Vector{FT}: Soil water content at hygroscopic point [-]
source
UrbanTethysChloris.Soil.soil_parameters_totalMethod
soil_parameters_total(
    Pcla::FT,
    Psan::FT,
    Porg::FT,
    Kfc::FT,
    Phy::FT,
    SPAR::Int,
    Kbot::FT,
    CASE_ROOT_H::Int,
    CASE_ROOT_L::Int,
    ZR95_H::Vector{FT},
    ZR95_L::Vector{FT},
    ZR50_H::Vector{FT},
    ZR50_L::Vector{FT},
    ZRmax_H::Vector{FT},
    ZRmax_L::Vector{FT},
    Zs::Vector{FT}
) where {FT<:AbstractFloat}

Calculate total soil parameters based on composition and root distribution.

Arguments

  • Pcla: Clay fraction in soil [-]
  • Psan: Sand fraction in soil [-]
  • Porg: Organic matter fraction in soil [-]
  • Kfc: Hydraulic conductivity at field capacity [mm/h]
  • Phy: Soil water potential at hygroscopic point [kPa]
  • SPAR: Soil parameterization choice:
    1. van Genuchten (1980)
    2. Saxton-Rawls (1986)
  • Kbot: Hydraulic conductivity at bottom boundary [mm/h]
  • CASE_ROOT_H: Root distribution type for high vegetation [-]
  • CASE_ROOT_L: Root distribution type for low vegetation [-]
  • ZR95_H: 95th percentile root depth for high vegetation [mm]
  • ZR95_L: 95th percentile root depth for low vegetation [mm]
  • ZR50_H: 50th percentile root depth for high vegetation [mm]
  • ZR50_L: 50th percentile root depth for low vegetation [mm]
  • ZRmax_H: Maximum root depth for high vegetation [mm]
  • ZRmax_L: Maximum root depth for low vegetation [mm]
  • Zs: Soil layer depths [mm]

Returns

  • Zs: Soil layer depths [mm]
  • dz: Layer thicknesses [mm]
  • ms: Number of soil layers [-]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • nVG: van Genuchten n parameter [-]
  • alpVG: van Genuchten α parameter [1/mm]
  • Ks_Zs: Saturated hydraulic conductivity [mm/h]
  • L: Pore size distribution index [-]
  • Pe: Air entry pressure [kPa]
  • O33: Water content at -33 kPa [m³/m³]
  • SPAR: Soil parameterization type [-]
  • EvL_Zs: Evaporation layer fractions [-]
  • Inf_Zs: Infiltration layer fractions [-]
  • RfH_Zs: Root fraction distribution for high vegetation [-]
  • RfL_Zs: Root fraction distribution for low vegetation [-]
  • Zinf: Infiltration depth [mm]
  • Kbot: Bottom boundary conductivity [mm/h]
  • Slo_pot: Slope fractions [-]
  • Dz: Layer center distances [mm]
  • aR: Horizontal length scale [-]
  • aTop: Area to contour length ratio [mm]
  • rsd: Dry soil density [kg/m³]
  • lan_dry: Dry soil thermal conductivity [W/m K]
  • lan_s: Solid soil thermal conductivity [W/m K]
  • cv_s: Solid soil volumetric heat capacity [J/m³ K]
source
UrbanTethysChloris.Soil.soil_thermal_propertiesMethod
soil_thermal_properties(Tdp, rsd, lan_dry, lan_s, cv_s, Osat, Ohy, O) where {FT<:AbstractFloat}

Compute soil thermal properties based on soil moisture and composition.

Arguments

  • Tdp::Vector{FT},: Dampening temperature [°C]
  • rsd::Vector{FT}: Density dry soil [kg/m³]
  • lan_dry::Vector{FT}: Thermal conductivity dry soil [W/m K]
  • lan_s::Vector{FT}: Thermal conductivity soil solid [W/m K]
  • cv_s::Vector{FT}: Volumetric heat capacity soil solid [J/m³ K]
  • Osat::Vector{FT}: Water content at saturation [-]
  • Ohy::Vector{FT}: Residual/hygroscopic water content [-]
  • O::Vector{FT}: Soil moisture at previous time step [-]

Returns

  • lanS::Vector{FT}: Thermal conductivity of soil [W/m K]
  • cv_Soil::Vector{FT}: Volumetric heat capacity of soil [J/m³ K]
  • CTt::Vector{FT}: Total thermal capacity of soil [K m²/J]
source
UrbanTethysChloris.Soil.soil_water_multilayerMethod
soil_water_multilayer(
    V::Vector{FT},
    Zs::Vector{FT},
    dz::Vector{FT},
    n::Int,
    Osat::Vector{FT},
    Ohy::Vector{FT},
    nVG::Vector{FT},
    alpVG::Vector{FT},
    Ks_Zs::Vector{FT},
    L::Vector{FT},
    Pe::Vector{FT},
    O33::Vector{FT},
    SPAR::Int,
    EvL_Zs::Vector{FT},
    Inf_Zs::Vector{FT},
    RfH_Zs::Matrix{FT},
    RfL_Zs::Matrix{FT},
    Rrootl_H::Vector{FT},
    Rrootl_L::Vector{FT},
    PsiL50_H::Vector{FT},
    PsiL50_L::Vector{FT},
    PsiX50_H::Vector{FT},
    PsiX50_L::Vector{FT}
) where {FT<:AbstractFloat}

Calculate soil water dynamics and potential water extraction rates.

Arguments

  • V: Soil water volume per unit area [mm]
  • Zs: Soil layer depths [mm]
  • dz: Layer thicknesses [mm]
  • n: Number of soil layers [-]
  • Osat: Saturated water content [m³/m³]
  • Ohy: Hygroscopic water content [m³/m³]
  • nVG: van Genuchten n parameter [-]
  • alpVG: van Genuchten α parameter [1/mm]
  • Ks_Zs: Saturated hydraulic conductivity [mm/h]
  • L: Pore size distribution index [-]
  • Pe: Air entry pressure [kPa]
  • O33: Water content at -33 kPa [m³/m³]
  • SPAR: Soil parameterization choice:
    1. van Genuchten (1980)
    2. Saxton-Rawls (1986)
  • EvL_Zs: Evaporation layer fractions [-]
  • Inf_Zs: Infiltration layer fractions [-]
  • RfH_Zs: Root fraction distribution for high vegetation [-]
  • RfL_Zs: Root fraction distribution for low vegetation [-]
  • Rrootl_H: Root length density for high vegetation [mm/mm³]
  • Rrootl_L: Root length density for low vegetation [mm/mm³]
  • PsiL50_H: Leaf water potential at 50% loss for high vegetation [MPa]
  • PsiL50_L: Leaf water potential at 50% loss for low vegetation [MPa]
  • PsiX50_H: Xylem water potential at 50% loss for high vegetation [MPa]
  • PsiX50_L: Xylem water potential at 50% loss for low vegetation [MPa]

Returns

  • O: Volumetric soil moisture content [m³/m³]
  • ZWT: Water table depth [mm]
  • OF: Infiltration water content [-]
  • OS: Surface soil moisture [-]
  • Psi_s_H: Soil water potential for high vegetation [MPa]
  • Psi_s_L: Soil water potential for low vegetation [MPa]
  • gsr_H: Root-soil conductance for high vegetation [mmol/m²/s/MPa]
  • gsr_L: Root-soil conductance for low vegetation [mmol/m²/s/MPa]
  • Exwat_H: Water extraction rate for high vegetation [mm/h]
  • Exwat_L: Water extraction rate for low vegetation [mm/h]
  • Rd: Surface runoff [mm]
  • WTR: Water table rise [mm]
  • POT: Soil water potential [mm]
  • OH: Average soil moisture for high vegetation [-]
  • OL: Average soil moisture for low vegetation [-]
source
UrbanTethysChloris.Soil.volume_correctionMethod
volume_correction(V, EvL_Zs, RfH_Zs, RfL_Zs, EG, T_H, T_L, Lk)

Volume correction for negative values.

Arguments

  • V: Volume array
  • EvL_Zs: Evaporation layers array
  • RfH_Zs: Root fraction high vegetation layers array
  • RfL_Zs: Root fraction low vegetation layers array
  • EG: Ground evaporation
  • T_H: High vegetation transpiration array
  • T_L: Low vegetation transpiration array
  • Lk: Leakage value

Returns

  • V: Corrected volume array
  • T_H: Updated high vegetation transpiration
  • T_L: Updated low vegetation transpiration
  • EG: Updated ground evaporation
  • Lk: Updated leakage
source

Turbulent Heat

UrbanTethysChloris.TurbulentHeat.calculate_t2mMethod
calculate_t2m(
    Timp::FT,
    Tbare::FT,
    Tveg::FT,
    Twsun::FT,
    Twshade::FT,
    Tcan::FT,
    Zp1::FT,
    rap_can2m::FT,
    rap_can2m_Inv::FT,
    rb_L::FT,
    RES_w1::FT,
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    Gemeotry_m::::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    TempVec_ittm,
    cp_atm::FT,
    rho_atm::FT,
    ParCalculation::NamedTuple,
    fconv::FT,
    MeteoData::NamedTuple
) where {FT<:AbstractFloat}

Calculate the air temperature at 2m level and compute sensible heat fluxes.

Arguments

  • Timp: impervious ground temperature [K]
  • Tbare: bare ground temperature [K]
  • Tveg: vegetated ground temperature [K]
  • Twsun: sunlit wall temperature [K]
  • Twshade: shaded wall temperature [K]
  • Tcan: canyon air temperature [K]
  • Zp1: reference height [m]
  • rap_can2m: resistance between canyon and 2m height [s/m]
  • rap_can2m_Inv: inverse resistance between canyon and 2m height [m/s]
  • rb_L: leaf boundary layer resistance [s/m]
  • RES_w1: wall resistance [s/m]
  • FractionsGround: ground cover fractions
  • Gemeotry_m: urban geometry parameters
  • ParVegGround: vegetation parameters
  • TempVec_ittm: temperature variables from previous timestep
  • cp_atm: specific heat capacity of air [J/kg/K]
  • rho_atm: air density [kg/m³]
  • ParCalculation: calculation parameters
  • fconv: convection factor [-]
  • MeteoData: meteorological data

Returns

  • T2m::FT: air temperature at 2m [K]
  • DHi::FT: sensible heat flux difference [W/m²]
  • Himp_2m::FT: impervious surface sensible heat flux at 2m [W/m²]
  • Hbare_2m::FT: bare soil sensible heat flux at 2m [W/m²]
  • Hveg_2m::FT: vegetated surface sensible heat flux at 2m [W/m²]
  • Hwsun_2m::FT: sunlit wall sensible heat flux at 2m [W/m²]
  • Hwshade_2m::FT: shaded wall sensible heat flux at 2m [W/m²]
  • Hcan_2m::FT: canyon sensible heat flux at 2m [W/m²]
source
UrbanTethysChloris.TurbulentHeat.heat_flux_canyonMethod
heat_flux_canyon(
    TemperatureC::AbstractVector{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    MeteoData::NamedTuple,
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    fconvPreCalc::FT,
    fconv::FT
) where {FT<:AbstractFloat}

Calculate sensible and latent heat fluxes in the urban canyon.

Arguments

  • TemperatureC: Temperature vector [K]
  • Gemeotry_m: Urban geometry parameters
  • MeteoData: Meteorological data
  • ParVegTree: Tree vegetation parameters
  • fconvPreCalc: Pre-calculated convection flag [-]
  • fconv: Convection factor [-]

Returns

  • Hcanyon::FT: Sensible heat flux in canyon [W/m²]
  • LEcanyon::FT: Latent heat flux in canyon [W/m²]
  • ra_canyon::FT: Aerodynamic resistance in canyon [s/m]
  • ra_orig::FT: Original aerodynamic resistance [s/m]
  • fconv::FT: Convection enhancement factor [-]
  • HumidityCan::NamedTuple: Canyon humidity parameters
source
UrbanTethysChloris.TurbulentHeat.heat_flux_groundMethod
heat_flux_ground(
    TemperatureC::AbstractVector{FT},
    TempVec_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    SoilPotW_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Int_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    ParInterceptionTree::NamedTuple,
    ParCalculation::NamedTuple,
    SWRdir_abs_tree::FT,
    SWRdiff_abs_tree::FT,
    SWRdir_abs_groundveg::FT,
    SWRdiff_abs_groundveg::FT,
    RESPreCalc::Bool,
    rsGroundPreCalc::NamedTuple,
    rsTreePreCalc::NamedTuple
) where {FT<:AbstractFloat}

Calculate sensible and latent heat fluxes for ground surfaces.

Arguments

  • TemperatureC: Temperature vector [K]
  • TempVec_ittm: Temperature from previous timestep
  • MeteoData: Meteorological data
  • Gemeotry_m: Urban geometry parameters
  • FractionsGround: Ground surface fractions
  • ParVegGround: Ground vegetation parameters
  • ParVegTree: Tree vegetation parameters
  • ParSoilGround: Ground soil parameters
  • SoilPotW_ittm: Soil water potential from previous timestep
  • Owater_ittm: Soil water content from previous timestep
  • Vwater_ittm: Soil water volume from previous timestep
  • ExWater_ittm: Extractable water from previous timestep
  • Int_ittm: Interception from previous timestep
  • CiCO2Leaf_ittm: Leaf CO2 concentration from previous timestep
  • ParInterceptionTree: Tree interception parameters
  • ParCalculation: Calculation parameters
  • SWRdir_abs_tree: Direct shortwave radiation absorbed by trees [W/m²]
  • SWRdiff_abs_tree: Diffuse shortwave radiation absorbed by trees [W/m²]
  • SWRdir_abs_groundveg: Direct shortwave radiation absorbed by ground vegetation [W/m²]
  • SWRdiff_abs_groundveg: Diffuse shortwave radiation absorbed by ground vegetation [W/m²]
  • RESPreCalc: Use pre-calculated resistances
  • rsGroundPreCalc: Pre-calculated ground resistance parameters
  • rsTreePreCalc: Pre-calculated tree resistance parameters

Returns

A NamedTuple containing:

  • Himp::FT: Sensible heat flux from impervious ground [W/m²]
  • Hbare::FT: Sensible heat flux from bare ground [W/m²]
  • Hveg::FT: Sensible heat flux from vegetated ground [W/m²]
  • Htree::FT: Sensible heat flux from trees [W/m²]
  • Eimp::FT: Water vapor flux from impervious ground [kg/m²s]
  • Ebare_pond::FT: Ponded water vapor flux from bare ground [kg/m²s]
  • Ebare_soil::FT: Soil water vapor flux from bare ground [kg/m²s]
  • Eveg_int::FT: Intercepted water vapor flux from vegetation [kg/m²s]
  • Eveg_pond::FT: Ponded water vapor flux from vegetated ground [kg/m²s]
  • Eveg_soil::FT: Soil water vapor flux from vegetated ground [kg/m²s]
  • TEveg::FT: Transpiration flux from ground vegetation [kg/m²s]
  • Etree_int::FT: Intercepted water vapor flux from trees [kg/m²s]
  • TEtree::FT: Transpiration flux from trees [kg/m²s]
  • And many more components including latent heat fluxes and resistances...
source
UrbanTethysChloris.TurbulentHeat.heat_flux_roofMethod
heat_flux_roof(
    TemperatureR::AbstractVector{FT},
    TempVec_ittm::NamedTuple,
    MeteoData::NamedTuple,
    HumidityAtm::NamedTuple,
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParCalculation::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Int_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    SWRabs_dir::FT,
    SWRabs_diff::FT,
    RESPreCalc::Bool,
    rsRoofPreCalc::NamedTuple
) where {FT<:AbstractFloat}

Calculate sensible and latent heat fluxes for roof surfaces.

Arguments

  • TemperatureR: Temperature vector [K]
  • TempVec_ittm: Temperature variables from previous timestep
  • MeteoData: Meteorological data
  • HumidityAtm: Atmospheric humidity parameters
  • ParVegRoof: Roof vegetation parameters
  • FractionsRoof: Roof surface fractions
  • Gemeotry_m: Urban geometry parameters
  • ParSoilRoof: Roof soil parameters
  • ParCalculation: Calculation parameters
  • SoilPotW_ittm: Soil water potential from previous timestep
  • Owater_ittm: Soil water content from previous timestep
  • Vwater_ittm: Soil water volume from previous timestep
  • ExWater_ittm: Extractable water from previous timestep
  • Int_ittm: Interception from previous timestep
  • CiCO2Leaf_ittm: Leaf CO2 concentration from previous timestep
  • SWRabs_dir: Direct shortwave radiation [W/m²]
  • SWRabs_diff: Diffuse shortwave radiation [W/m²]
  • RESPreCalc: Use pre-calculated resistances
  • rsRoofPreCalc: Pre-calculated resistance parameters

Returns

  • Hroof_imp::FT: Sensible heat flux from impervious roof [W/m²]
  • Hroof_veg::FT: Sensible heat flux from vegetated roof [W/m²]
  • Eroof_imp::FT: Water vapor flux from impervious roof [kg/m²s]
  • Eroof_veg::FT: Water vapor flux from vegetated roof [kg/m²s]
  • Eroof_ground::FT: Ground water vapor flux from vegetated roof [kg/m²s]
  • Eroof_soil::FT: Soil water vapor flux from vegetated roof [kg/m²s]
  • TEroof_veg::FT: Transpiration flux from vegetated roof [kg/m²s]
  • LEroof_imp::FT: Latent heat flux from impervious roof [W/m²]
  • LEroof_veg::FT: Latent heat flux from vegetated roof [W/m²]
  • LEroof_ground::FT: Ground latent heat flux from vegetated roof [W/m²]
  • LEroof_soil::FT: Soil latent heat flux from vegetated roof [W/m²]
  • LTEroof_veg::FT: Latent heat of transpiration from vegetated roof [W/m²]
  • Ci_sun_roof::FT: Sunlit leaf internal CO2 concentration [μmol/mol]
  • Ci_shd_roof::FT: Shaded leaf internal CO2 concentration [μmol/mol]
  • ra::FT: Atmospheric resistance [s/m]
  • rb::FT: Boundary layer resistance [s/m]
  • rap_L::FT: Roof aerodynamic resistance [s/m]
  • r_soil::FT: Soil resistance [s/m]
  • rs_sun::FT: Sunlit stomatal resistance [s/m]
  • rs_shd::FT: Shaded stomatal resistance [s/m]
source
UrbanTethysChloris.TurbulentHeat.heat_flux_wallMethod
heat_flux_wall(
    TemperatureC::AbstractVector{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    MeteoData::NamedTuple,
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT}
) where {FT<:AbstractFloat}

Calculate sensible and latent heat fluxes for sunlit and shaded walls.

Arguments

  • TemperatureC: Temperature vector [K]
  • Gemeotry_m: Urban geometry parameters
  • MeteoData: Meteorological data
  • ParVegTree: Tree vegetation parameters
  • ParVegGround: Ground vegetation parameters
  • FractionsGround: Ground cover fractions

Returns

  • Hwsun::FT: Sensible heat flux from sunlit wall [W/m²]
  • Hwshade::FT: Sensible heat flux from shaded wall [W/m²]
  • Ewsun::FT: Latent heat flux from sunlit wall [kg/m²s]
  • Ewshade::FT: Latent heat flux from shaded wall [kg/m²s]
  • LEwsun::FT: Latent heat from sunlit wall [W/m²]
  • LEwshade::FT: Latent heat from shaded wall [W/m²]
  • RES_w1::FT: Wall resistance at level 1 [s/m]
  • RES_w2::FT: Wall resistance at level 2 [s/m]
  • rap_Zp1_In::FT: In-canyon aerodynamic resistance at level 1 [s/m]
  • rap_Zp2_In::FT: In-canyon aerodynamic resistance at level 2 [s/m]
  • Hwsun1::FT: Sensible heat flux from sunlit wall at level 1 [W/m²]
  • Hwshade1::FT: Sensible heat flux from shaded wall at level 1 [W/m²]
  • Hwsun2::FT: Sensible heat flux from sunlit wall at level 2 [W/m²]
  • Hwshade2::FT: Sensible heat flux from shaded wall at level 2 [W/m²]
  • cp_atm::FT: Specific heat capacity of air [J/kg/K]
  • rho_atm::FT: Air density [kg/m³]
  • L_heat::FT: Latent heat of vaporization [J/kg]
  • Zp1::FT: Height of level 1 [m]
  • Zp2::FT: Height of level 2 [m]
  • rap_Zp1::FT: Aerodynamic resistance at level 1 [s/m]
  • rap_Zp2::FT: Aerodynamic resistance at level 2 [s/m]
source

Water

UrbanTethysChloris.Water.water_canyonMethod
water_canyon(
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    Runon_ittm::NamedTuple,
    Qinlat_ittm::NamedTuple,
    Etree_In::FT,
    Egveg_In::FT,
    Egimp_Pond::FT,
    Egbare_Pond::FT,
    Egveg_Pond::FT,
    Egbare_soil::FT,
    Egveg_soil::FT,
    TEgveg::FT,
    TEtree::FT,
    ParSoilGround::NamedTuple,
    ParInterceptionTree::NamedTuple,
    ParCalculation::NamedTuple,
    ParVegGround::NamedTuple,
    ParVegTree::NamedTuple,
    FractionsGround::NamedTuple,
    geometry::NamedTuple,
    ParTree::NamedTuple,
    Gemeotry_m::NamedTuple,
    Anthropogenic::NamedTuple
) where {FT<:AbstractFloat}

Calculate water balance for canyon surfaces including trees, vegetation, and impervious areas.

Arguments

  • MeteoData: Meteorological data
  • Int_ittm: Previous timestep interception values
  • Owater_ittm: Previous timestep soil moisture values
  • Runon_ittm: Previous timestep runon values
  • Qinlat_ittm: Previous timestep lateral flow values
  • Etree_In: Tree evaporation [kg/m²s]
  • Egveg_In: Ground vegetation evaporation [kg/m²s]
  • Egimp_Pond: Impervious ground evaporation [kg/m²s]
  • Egbare_Pond: Bare ground evaporation [kg/m²s]
  • Egveg_Pond: Vegetated ground evaporation [kg/m²s]
  • Egbare_soil: Bare soil evaporation [kg/m²s]
  • Egveg_soil: Vegetated soil evaporation [kg/m²s]
  • TEgveg: Ground vegetation transpiration [kg/m²s]
  • TEtree: Tree transpiration [kg/m²s]
  • ParSoilGround: Soil parameters for ground
  • ParInterceptionTree: Tree interception parameters
  • ParCalculation: Calculation parameters
  • ParVegGround: Ground vegetation parameters
  • ParVegTree: Tree vegetation parameters
  • FractionsGround: Ground surface fractions
  • geometry: Geometry parameters
  • ParTree: Tree parameters
  • Gemeotry_m: Geometry parameters in meters
  • Anthropogenic: Anthropogenic water inputs

Returns

  • q_tree_dwn: Tree throughfall [mm/dth]
  • In_tree: Tree interception [mm]
  • dIn_tree_dt: Change in tree interception [mm/dth]
  • q_gveg_dwn: Ground vegetation throughfall [mm/dth]
  • In_gveg: Ground vegetation interception [mm]
  • dIn_gveg_dt: Change in ground vegetation interception [mm/dth]
  • q_gimp_runoff: Impervious ground runoff [mm/dth]
  • In_gimp: Impervious ground interception [mm]
  • dIn_gimp_dt: Change in impervious ground interception [mm/dth]
  • f_inf_gimp: Impervious ground infiltration [mm/h]
  • q_gbare_runoff: Bare ground runoff [mm/dth]
  • In_gbare: Bare ground interception [mm]
  • dIn_gbare_dt: Change in bare ground interception [mm/dth]
  • f_inf_gbare: Bare ground infiltration [mm/h]
  • q_gveg_runoff: Vegetated ground runoff [mm/dth]
  • In_gveg_pond: Ground vegetation ponding [mm]
  • dIn_gveg_pond_dt: Change in ground vegetation ponding [mm/dth]
  • f_inf_gveg: Vegetated ground infiltration [mm/h]
  • V_gimp: Impervious ground water volume [mm]
  • O_gimp: Impervious ground water content [-]
  • OS_gimp: Impervious ground surface water content [-]
  • Lk_gimp: Impervious ground leakage [mm/h]
  • Psi_s_H_gimp: Impervious ground high soil water potential [MPa]
  • Psi_s_L_gimp: Impervious ground low soil water potential [MPa]
  • Exwat_H_gimp: Impervious ground high extractable water [mm]
  • Exwat_L_gimp: Impervious ground low extractable water [mm]
  • Rd_gimp: Impervious ground surface runoff [mm]
  • TEgveg_imp: Ground vegetation transpiration from impervious [kg/m²s]
  • TEtree_imp: Tree transpiration from impervious [kg/m²s]
  • Egimp_soil: Impervious soil evaporation [kg/m²s]
  • dV_dt_gimp: Change in impervious ground water volume [mm/dth]
  • Psi_soil_gimp: Impervious ground soil water potential [MPa]
  • Kf_gimp: Impervious ground hydraulic conductivity [mm/h]
  • V_gbare: Bare ground water volume [mm]
  • O_gbare: Bare ground water content [-]
  • OS_gbare: Bare ground surface water content [-]
  • Lk_gbare: Bare ground leakage [mm]
  • Psi_s_H_gbare: Bare ground high soil water potential [MPa]
  • Psi_s_L_gbare: Bare ground low soil water potential [MPa]
  • Exwat_H_gbare: Bare ground high extractable water [mm]
  • Exwat_L_gbare: Bare ground low extractable water [mm]
  • Rd_gbare: Bare ground surface runoff [mm]
  • TEgveg_bare: Ground vegetation transpiration from bare [kg/m²s]
  • TEtree_bare: Tree transpiration from bare [kg/m²s]
  • Egbare_Soil: Bare soil evaporation [kg/m²s]
  • dV_dt_gbare: Change in bare ground water volume [mm/dth]
  • Psi_soil_gbare: Bare ground soil water potential [MPa]
  • Kf_gbare: Bare ground hydraulic conductivity [mm/h]
  • V_gveg: Vegetated ground water volume [mm]
  • O_gveg: Vegetated ground water content [-]
  • OS_gveg: Vegetated ground surface water content [-]
  • Lk_gveg: Vegetated ground leakage [mm]
  • Psi_s_H_gveg: Vegetated ground high soil water potential [MPa]
  • Psi_s_L_gveg: Vegetated ground low soil water potential [MPa]
  • Exwat_H_gveg: Vegetated ground high extractable water [mm]
  • Exwat_L_gveg: Vegetated ground low extractable water [mm]
  • Rd_gveg: Vegetated ground surface runoff [mm]
  • TEgveg_veg: Ground vegetation transpiration from vegetated [kg/m²s]
  • TEtree_veg: Tree transpiration from vegetated [kg/m²s]
  • Egveg_Soil: Vegetated soil evaporation [kg/m²s]
  • dV_dt_gveg: Change in vegetated ground water volume [mm/dth]
  • Psi_soil_gveg: Vegetated ground soil water potential [MPa]
  • Kf_gveg: Vegetated ground hydraulic conductivity [mm/h]
  • Qin_imp: Lateral flow to impervious ground [mm/dth]
  • Qin_bare: Lateral flow to bare ground [mm/dth]
  • Qin_veg: Lateral flow to vegetated ground [mm/dth]
  • Qin_bare2imp: Lateral flow from bare to impervious [mm/dth]
  • Qin_bare2veg: Lateral flow from bare to vegetated [mm/dth]
  • Qin_imp2bare: Lateral flow from impervious to bare [mm/dth]
  • Qin_imp2veg: Lateral flow from impervious to vegetated [mm/dth]
  • Qin_veg2imp: Lateral flow from vegetated to impervious [mm/dth]
  • Qin_veg2bare: Lateral flow from vegetated to bare [mm/dth]
  • V: Total water volume [mm]
  • O: Total water content [-]
  • OS: Surface water content [-]
  • Lk: Total leakage [mm/h]
  • Rd: Surface runoff [mm]
  • dV_dt: Change in total water volume [mm/dth]
  • Psi_s_L: Low soil water potential [MPa]
  • Exwat_L: Low extractable water [mm]
  • TEgveg_tot: Total ground vegetation transpiration [kg/m²s]
  • Psi_s_H_tot: Total high soil water potential [MPa]
  • Exwat_H: Total extractable water [mm]
  • TEtree_tot: Total tree transpiration [kg/m²s]
  • EB_TEtree: Tree transpiration energy balance [W/m²]
  • EB_TEgveg: Ground vegetation transpiration energy balance [W/m²]
  • WBIndv: Individual water balance components
  • WBTot: Total water balance components
  • Runoff: Total runoff [mm/dth]
  • Runon: Total runon [mm/dth]
  • Etot: Total evapotranspiration [mm/dth]
  • DeepGLk: Deep ground leakage [mm/dth]
  • StorageTot: Total water storage change [mm/dth]
source
UrbanTethysChloris.Water.water_groundMethod
water_ground(
    q_runon_veg::FT,
    Runon_tm1::FT,
    E_ground::FT,
    Otm1::Vector{FT},
    In_ground_tm1::FT,
    In_max_ground::FT,
    Pcla::FT,
    Psan::FT,
    Porg::FT,
    Kfc::FT,
    Phy::FT,
    SPAR::Int,
    Kbot::FT,
    CASE_ROOT_H::Int,
    CASE_ROOT_L::Int,
    ZR95_H::Vector{FT},
    ZR95_L::Vector{FT},
    ZR50_H::Vector{FT},
    ZR50_L::Vector{FT},
    ZRmax_H::Vector{FT},
    ZRmax_L::Vector{FT},
    Zs::Vector{FT},
    dth::FT,
    row::FT
) where {FT<:AbstractFloat}

Calculate ground water dynamics and potential infiltration rates.

Arguments

  • q_runon_veg: Runon from vegetation [mm/dth]
  • Runon_tm1: Previous timestep runon [mm/dth]
  • E_ground: Ground evaporation [kg/m²s]
  • Otm1: Previous timestep soil moisture [m³/m³]
  • In_ground_tm1: Previous timestep ground interception [mm]
  • In_max_ground: Maximum ground interception capacity [mm]
  • Pcla: Clay fraction in soil [-]
  • Psan: Sand fraction in soil [-]
  • Porg: Organic matter fraction in soil [-]
  • Kfc: Hydraulic conductivity at field capacity [mm/h]
  • Phy: Soil water potential at hygroscopic point [kPa]
  • SPAR: Soil parameterization choice [-]
  • Kbot: Hydraulic conductivity at bottom boundary [mm/h]
  • CASE_ROOT_H: Root distribution type for high vegetation [-]
  • CASE_ROOT_L: Root distribution type for low vegetation [-]
  • ZR95_H: 95th percentile root depth for high vegetation [mm]
  • ZR95_L: 95th percentile root depth for low vegetation [mm]
  • ZR50_H: 50th percentile root depth for high vegetation [mm]
  • ZR50_L: 50th percentile root depth for low vegetation [mm]
  • ZRmax_H: Maximum root depth for high vegetation [mm]
  • ZRmax_L: Maximum root depth for low vegetation [mm]
  • Zs: Soil layer depths [mm]
  • dth: Calculation time step [h]
  • row: Water density [kg/m³]

Returns

  • q_runon_ground: Ground runoff [mm/dth]
  • In_ground: Ground interception [mm]
  • dIn_ground_dt: Change in ground interception [mm/dth]
  • f_ground: Infiltration rate [mm/h]
  • WBalance_In_ground: Water balance check [mm/dth]
source
UrbanTethysChloris.Water.water_imperviousMethod
water_impervious(
    Rain::FT,
    Runon_tm1::FT,
    E_imp::FT,
    In_imp_tm1::FT,
    dth::FT,
    row::FT,
    In_max_imp::FT,
    K_imp::FT
) where {FT<:AbstractFloat}

Calculates water balance for impervious surfaces.

Arguments

  • Rain: precipitation [mm/dth]
  • Runon_tm1: Previous timestep runon [mm/dth]
  • E_imp: evaporation from impervious surfaces [kg/m²s]
  • In_imp_tm1: Interception from previous time step [mm]
  • dth: calculation time step [h]
  • row: density of water [kg/m³]
  • In_max_imp: Maximum interception capacity of urban area [mm]
  • K_imp: Hydraulic conductivity of impervious area [mm/h]

Returns

  • q_runon_imp: Runoff [mm/dth]
  • In_imp: Interception [mm]
  • dIn_imp_dt: Change in interception [mm/dth]
  • Lk_imp: Leakage from impervious area [mm/h]
  • WBalance_In_imp: Water balance check [mm/dth]
source
UrbanTethysChloris.Water.water_roofMethod
water_roof(
    Eroof_imp::FT,
    Eroof_veg::FT,
    Eroof_ground::FT,
    Eroof_soil::FT,
    TEroof_veg::FT,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    Runon_ittm::NamedTuple,
    FractionsRoof::NamedTuple,
    ParSoilRoof::NamedTuple,
    ParCalculation::NamedTuple,
    ParVegRoof::NamedTuple,
    Anthropogenic::NamedTuple
) where {FT<:AbstractFloat}

Calculate water balance for roof surfaces including vegetation, impervious areas, and soil.

Arguments

  • Eroof_imp: Evaporation from impervious surfaces [kg/m²s]
  • Eroof_veg: Evaporation from vegetation [kg/m²s]
  • Eroof_ground: Evaporation from ground under vegetation [kg/m²s]
  • Eroof_soil: Evaporation from soil [kg/m²s]
  • TEroof_veg: Transpiration from vegetation [kg/m²s]
  • MeteoData: Meteorological data
  • Int_ittm: Previous timestep interception values
  • Owater_ittm: Previous timestep soil moisture values
  • Runon_ittm: Previous timestep runon values
  • FractionsRoof: Roof surface fractions
  • ParSoilRoof: Soil parameters for roof
  • ParCalculation: Calculation parameters
  • ParVegRoof: Vegetation parameters for roof
  • Anthropogenic: Anthropogenic water inputs

Returns

  • q_runon_imp: Runoff from impervious surfaces [mm/dth]
  • In_imp: Interception on impervious surfaces [mm]
  • dIn_imp_dt: Change in impervious surface interception [mm/dth]
  • Lk_imp: Leakage from impervious surfaces [mm/h]
  • q_runon_veg: Runoff from vegetation [mm/dth]
  • In_veg: Vegetation interception [mm]
  • dIn_veg_dt: Change in vegetation interception [mm/dth]
  • q_runon_ground: Ground runoff [mm/dth]
  • In_ground: Ground interception [mm]
  • dIn_ground_dt: Change in ground interception [mm/dth]
  • dV_dt: Change in soil water volume [mm/dth]
  • f_ground: Ground infiltration rate [mm/h]
  • V: Soil water volume [mm]
  • O: Soil moisture [-]
  • OS: Surface soil moisture [-]
  • Lk: Soil leakage [mm/h]
  • Psi_s: Soil water potential [MPa]
  • Exwat: Extractable water [mm/h]
  • Rd: Surface runoff [mm/dth]
  • TEroof_veg: Updated vegetation transpiration [kg/m²s]
  • Eroof_soil: Updated soil evaporation [kg/m²s]
  • Runoff: Total roof runoff [mm/dth]
  • Runon: Total roof runon [mm/dth]
  • WBalance_In_imp: Water balance for impervious surfaces [mm/dth]
  • WBalance_In_veg: Water balance for vegetation [mm/dth]
  • WBalance_In_ground: Water balance for ground [mm/dth]
  • WBalance_soil: Water balance for soil [mm/dth]
  • WBalance_imp_tot: Total water balance for impervious surfaces [mm/dth]
  • WBalance_veg_tot: Total water balance for vegetation [mm/dth]
  • WBalance_tot: Total water balance [mm/dth]
source
UrbanTethysChloris.Water.water_soilMethod
water_soil(
    Otm1::Vector{FT},
    f::FT,
    TE_H::Vector{FT},
    TE_L::Vector{FT},
    E_soil::FT,
    Qlat_in::Vector{FT},
    dth::FT,
    Pcla::FT,
    Psan::FT,
    Porg::FT,
    Kfc::FT,
    Phy::FT,
    SPAR::Int,
    Kbot::FT,
    CASE_ROOT_H::Int,
    CASE_ROOT_L::Int,
    ZR95_H::Vector{FT},
    ZR95_L::Vector{FT},
    ZR50_H::Vector{FT},
    ZR50_L::Vector{FT},
    ZRmax_H::Vector{FT},
    ZRmax_L::Vector{FT},
    Rrootl_H::Vector{FT},
    Rrootl_L::Vector{FT},
    PsiL50_H::Vector{FT},
    PsiL50_L::Vector{FT},
    PsiX50_H::Vector{FT},
    PsiX50_L::Vector{FT},
    Zs::Vector{FT},
    row::FT
) where {FT<:AbstractFloat}

Calculate soil water dynamics and hydrological fluxes.

Arguments

  • Otm1: Previous timestep soil moisture [-]
  • f: Infiltration rate [mm/h]
  • TE_H: High vegetation transpiration [kg/m²s]
  • TE_L: Low vegetation transpiration [kg/m²s]
  • E_soil: Soil evaporation [kg/m²s]
  • Qlat_in: Lateral water flux [mm/dth]
  • dth: Time step [h]
  • Pcla: Clay fraction [-]
  • Psan: Sand fraction [-]
  • Porg: Organic matter fraction [-]
  • Kfc: Hydraulic conductivity at field capacity [mm/h]
  • Phy: Soil water potential at hygroscopic point [kPa]
  • SPAR: Soil parameterization choice [-]
  • Kbot: Bottom boundary conductivity [mm/h]
  • CASE_ROOT_H: High vegetation root distribution type [-]
  • CASE_ROOT_L: Low vegetation root distribution type [-]
  • ZR95_H: 95th percentile root depth for high vegetation [mm]
  • ZR95_L: 95th percentile root depth for low vegetation [mm]
  • ZR50_H: 50th percentile root depth for high vegetation [mm]
  • ZR50_L: 50th percentile root depth for low vegetation [mm]
  • ZRmax_H: Maximum root depth for high vegetation [mm]
  • ZRmax_L: Maximum root depth for low vegetation [mm]
  • Rrootl_H: Root length density for high vegetation [mm/mm³]
  • Rrootl_L: Root length density for low vegetation [mm/mm³]
  • PsiL50_H: Leaf water potential at 50% loss for high vegetation [MPa]
  • PsiL50_L: Leaf water potential at 50% loss for low vegetation [MPa]
  • PsiX50_H: Xylem water potential at 50% loss for high vegetation [MPa]
  • PsiX50_L: Xylem water potential at 50% loss for low vegetation [MPa]
  • Zs: Soil layer depths [mm]
  • row: Water density [kg/m³]

Returns

  • V: Water volume in each soil layer [mm]
  • O: Soil moisture in each soil layer [-]
  • OS: Surface soil moisture [-]
  • Lk: Leakage at bedrock [mm/h]
  • Psi_s_H: Soil water potential for high vegetation [MPa]
  • Psi_s_L: Soil water potential for low vegetation [MPa]
  • Exwat_H: Maximum extractable water for high vegetation [mm]
  • Exwat_L: Maximum extractable water for low vegetation [mm]
  • Rd: Saturation excess runoff [mm/dth]
  • TE_L: Updated low vegetation transpiration [kg/m²s]
  • TE_H: Updated high vegetation transpiration [kg/m²s]
  • E_soil: Updated soil evaporation [kg/m²s]
  • dV_dt: Change in water volume [mm/dth]
  • WBalance_soil: Water balance check [mm/dth]
  • Psi_soil: Soil water potential profile [mm]
  • Ko: Hydraulic conductivity profile [mm/h]
source
UrbanTethysChloris.Water.water_vegetationMethod
water_vegetation(
    Rain::FT,
    E_veg::FT,
    In_veg_tm1::FT,
    Sp_In::FT,
    LAI::FT,
    SAI::FT,
    row::FT,
    dth::FT
) where {FT<:AbstractFloat}

Calculate canopy rain interception and water balance for vegetation.

Arguments

  • Rain: precipitation [mm/dth]
  • E_veg: evaporation from vegetation [kg/m²s]
  • In_veg_tm1: Interception from previous time step [mm]
  • Sp_In: Specific water interception capacity [mm]
  • LAI: Leaf area index [-]
  • SAI: Stem area index [-]
  • row: density of water [kg/m³]
  • dth: calculation time step [h]

Returns

  • q_runon_veg: Runoff [mm/dth]
  • In_veg: Interception [mm]
  • dIn_veg_dt: Change in interception [mm/dth]
  • WBalance_In_veg: Water balance check [mm/dth]
source

Model Components

Forcing Inputs

UrbanTethysChloris.ModelComponents.ForcingInputs.AnthropogenicInputsType
AnthropogenicInputs{FT<:AbstractFloat}

Building and anthropogenic inputs affecting the urban environment.

Fields

  • Tb::Vector{FT}: Interior building temperature [K]
  • Qf_canyon::Vector{FT}: Anthropogenic heat input into the canyon air [W/m²]
  • Qf_roof::Vector{FT}: Anthropogenic heat input above the roof [W/m²]
  • Waterf_canyonVeg::Vector{FT}: Water applied on vegetated ground surface area [mm/time step]
  • Waterf_canyonBare::Vector{FT}: Water applied on bare ground surface area [mm/time step]
  • Waterf_roof::Vector{FT}: Water applied on roof surface area [mm/time step]
source
UrbanTethysChloris.ModelComponents.ForcingInputs.ForcingInputSetType
ForcingInputSet{FT<:AbstractFloat} <: AbstractForcingInputSet{FT}

Forcing inputs for the Urban Tethys-Chloris model.

Fields

  • datetime::Vector{DateTime}: Date and time of the forcing inputs.
  • anthropogenic::AnthropogenicInputs{FT}: Anthropogenic inputs.
  • hvacschedule::HVACSchedule{FT}: HVAC schedule.
  • meteorological::MeteorologicalInputs{FT}: Meteorological inputs.
  • sunposition::SunPositionInputs{FT}: Sun position inputs.
source
UrbanTethysChloris.ModelComponents.ForcingInputs.HVACScheduleType
HVACSchedule{FT<:AbstractFloat}

HVAC schedule parameters that specify heat and humidity sources from building equipment and occupants.

Fields

  • Hequip: Sensible heat from equipment [W/m² building ground area]
  • Hpeople: Sensible heat from people [W/m² building ground area]
  • LEequip: Latent heat from equipment [W/m² building ground area]
  • LEpeople: Latent heat from people [W/m² building ground area]
  • AirConRoomFraction: Fraction of air conditioned space [-]
source
UrbanTethysChloris.ModelComponents.ForcingInputs.MeteorologicalInputsType
MeteorologicalInputs{FT<:AbstractFloat}

Meteorological inputs and derived atmospheric properties.

Fields

  • LWR_in::Vector{FT}: Atmospheric longwave radiation [W/m² horizontal surface]
  • SAB1_in::Vector{FT}: Component of direct incoming shortwave radiation [W/m² horizontal surface]
  • SAB2_in::Vector{FT}: Component of direct incoming shortwave radiation [W/m² horizontal surface]
  • SAD1_in::Vector{FT}: Component of diffuse incoming shortwave radiation [W/m² horizontal surface]
  • SAD2_in::Vector{FT}: Component of diffuse incoming shortwave radiation [W/m² horizontal surface]
  • Tatm::Vector{FT}: Air Temperature at atmospheric reference level [K]
  • Uatm::Vector{FT}: Wind speed at atmospheric reference level [m/s]
  • Pre::Vector{FT}: Air pressure [Pa]
  • Rain::Vector{FT}: Precipitation [mm]
  • rel_hum::Vector{FT}: Relative humidity [-]
  • datetime::Vector{DateTime}: Timestamps for the data
  • esat_Tatm::Vector{FT}: Vapor pressure saturation at Tatm [Pa]
  • ea::Vector{FT}: Vapor pressure [Pa]
  • q_atm::Vector{FT}: Specific humidity of air at reference height [-]
  • qSat_atm::Vector{FT}: Saturation specific humidity [-]
  • SW_dir::Vector{FT}: Direct incoming shortwave radiation [W/m² horizontal surface]
  • SW_diff::Vector{FT}: Diffuse incoming shortwave radiation [W/m² horizontal surface]
  • Zatm::FT: Atmospheric reference height [m]
  • Catm_CO2::FT: Atmospheric CO2 concentration [ppm]
  • Catm_O2::FT: Intercellular Partial Pressure Oxygen [ppm]
  • SunDSM_MRT::FT: Mean radiant temperature from sun [K]
  • cp_atm::Vector{FT}: Specific heat of air [J/kg K]
  • rho_atm::Vector{FT}: Dry air density at atmosphere [kg/m³]
source
UrbanTethysChloris.ModelComponents.ForcingInputs.SunPositionInputsType
SunPositionInputs{FT<:AbstractFloat}

Solar position and timing parameters.

Fields

  • t_bef::FT: Time before solar noon [h]
  • t_aft::FT: Time after solar noon [h]
  • theta_Z::Vector{FT}: Solar zenith angle [rad]
  • theta_n::Vector{FT}: Difference between solar azimuth angle and canyon orientation [rad]
  • zeta_S::Vector{FT}: Solar azimuth angle [rad]
  • TimeOfMaxSolAlt::Vector{FT}: Time of maximum solar altitude [h]
source

Parameters

UrbanTethysChloris.ModelComponents.Parameters.HeightDependentVegetationParametersType
HeightDependentVegetationParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters for the location-specific (tree, roof, ground) vegetation.

Fields

  • LAI::FT: Leaf area index [-]

  • SAI::FT: Stem area index [-].

  • hc::FT: Canopy height [m].

  • h_disp::FT: [-].

  • d_leaf::FT: [-].

  • CASE_ROOT::Int: Type of root profile [-].

  • ZR95::FT: Root depth, 95th percentile [mm].

  • ZR50::FT: Root depth, 50th percentile [mm].

  • ZRmax::FT: Root depth, maximum [mm]

  • Rrootl::FT: Root length index [m root m-2 PFT].

  • PsiL50::FT: Water potential at 50 % of leaf hydraulic conductivity [MPa].

  • PsiX50::FT: Water potential at 50 % of xylem hydraulic conductivity and limit for water extraction from soil [MPa].

  • FI::FT: Intrinsec quantum efficency [µmol CO2 µmol-1 photons].

  • Do::FT: Empirical coefficient that expresses the value of vapor pressure deficit at which f(∆e) = 0.5 [Pa].

  • a1::FT: Empirical parameter linking net assimilaton AnCto stomatal conductanceg{s,CO2}` [-].

  • go::FT: Minimum/cuticular stomatal conductance [mol CO2 m-2 leaf s-1].

  • CT::Int: Photosyntesis Typology for Plants, Photosynthetic pathway C3 or C4 [-]

  • DSE::FT: Activation Energy - Plant Dependent, Activation Energy in Photosynthesis for Rubisco Capacity [kJ/mol].

  • Ha::FT: Entropy factor - Plant Dependent, Activation energy [kJ / mol K].

  • gmes::FT: Mesophyll conductance, not used [mol CO2/s m2].

  • rjv::FT: Scaling factor between Jmax and V_{c,max} [µmol equivalent µmol-1 CO2].

  • Kopt::FT: Optical depth of direct beam per unit plant area (?) [-].

  • Knit::FT: Canopy nitrogen decay coefficient [-].

  • Vmax::FT: Maximum Rubisco capacity at 25◦C leaf scale [µmol CO2 m-2 s-1]

  • mSl::FT: [-].

  • e_rel::FT: Relative Efficiency of the photosynthesis apparatus due to Age/Day-length [-].

  • e_relN::FT: Relative efficiency of the photosynthesis apparatus due to N limitations [-].

  • Psi_sto_00::FT: Soil water potential at the beginning of stomatal closure [MPa].

  • Psi_sto_50::FT: Soil water potential at 50 % stomatal closure [MPa].

  • Sl::FT: Specific leaf area of biomass [m^2 /gC] [-].

  • SPARTREE::Int: Tree root distribution: 1 = Tree roots can access all water in the soil

(imp, bare, veg) equally; 2 = If the tree crown is smaller than the combined vegetated and bare fraction, then the trees only transpire from these fractions. Otherwise, they also transpire from the impervious ground fraction. [-].

source
UrbanTethysChloris.ModelComponents.Parameters.UrbanGeometryParametersType
UrbanGeometryParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters for the UrbanGeometry model component.

Fields

  • Height_canyon::FT: Height of urban canyon [m].
  • Width_canyon::FT: Ground width of urban canyon [m].
  • Width_roof::FT: Roof width of urban canyon [m].
  • Height_tree::FT: Tree height [m].
  • Radius_tree::FT: Tree radius (=1/4 fg,tree *Wcan) [m].
  • Distance_tree::FT: Distance of wall to tree trunk [m].
  • Hcan_max::FT: Maximum height of roughness elements (buildings) [m].
  • Hcan_std::FT: Standard deviation of roughness elements (buildings) [m].
  • trees::Bool: Easy switch to include (=1) and exclude (=0) trees in the urban canyon.
  • ftree::FT: Tree fraction along canyon axis
  • hcanyon::FT: Normalized height of urban canyon [-].
  • wcanyon::FT: Normalized ground width of urban canyon [-].
  • wroof::FT: Normalized roof width of urban canyon [-]
  • htree::FT: Normalized tree height [-]
  • radius_tree::FT: Normalized tree radius [-].
  • distance_tree::FT: Normalized distance of wall to tree trunk [-].
  • ratio::FT: Height-to-width ratio [-].
  • wcanyon_norm::FT: Normalized canyon width overall [-].
  • wroof_norm::FT: Normalized roof width overall [-].
source
UrbanTethysChloris.ModelComponents.Parameters.VegetationParametersType
VegetationParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Container for vegetation parameters for different urban surface components.

Fields

  • roof::HeightDependentVegetationParameters{FT}: Vegetation parameters for roof vegetation
  • ground::HeightDependentVegetationParameters{FT}: Vegetation parameters for ground-level vegetation
  • tree::HeightDependentVegetationParameters{FT}: Vegetation parameters for trees
source
UrbanTethysChloris.ModelComponents.Parameters.ThermalPropertiesType
ThermalProperties{FT<:AbstractFloat} <: AbstractParameters{FT}

Container for vegetation parameters for different urban surface components.

Fields

  • roof::LocationSpecificThermalProperties{FT}: Roof thermal properties
  • ground::LocationSpecificThermalProperties{FT}: Ground thermal properties
  • wall::LocationSpecificThermalProperties{FT}: Wall thermal properties
source
UrbanTethysChloris.ModelComponents.Parameters.OpticalPropertiesType
OpticalProperties{FT<:AbstractFloat} <: AbstractParameters{FT}

Container for optical properties for different urban surface components.

Fields

  • roof::VegetatedOpticalProperties{FT}: Roof optical properties
  • ground::VegetatedOpticalProperties{FT}: Ground optical properties
  • wall::SimpleOpticalProperties{FT}: Wall optical properties
  • tree::SimpleOpticalProperties{FT}: Tree optical properties
source
UrbanTethysChloris.ModelComponents.Parameters.VegetatedOpticalPropertiesType
VegetatedOpticalProperties{FT<:AbstractFloat} <: AbstractParameters{FT}

Optical properties specific to vegetated surfaces (roof and ground)

Fields

  • aveg::FT: Vegetation surface albedo (-)
  • aimp::FT: Impervious surface albedo (-)
  • abare::FT: Bare surface albedo (-), only used for ground
  • eveg::FT: Vegetation surface emissivity (-)
  • eimp::FT: Impervious surface emissivity (-)
  • ebare::FT: Bare surface emissivity (-), only used for ground
source
UrbanTethysChloris.ModelComponents.Parameters.BuildingEnergyModelParametersType
BuildingEnergyModelParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Container for all building energy model parameters.

Fields

  • indoor_optical::IndoorOpticalProperties{FT}: Indoor surface optical properties
  • thermal::ThermalBuilding{FT}: Building thermal properties
  • windows::WindowParameters{FT}: Window parameters
  • hvac::HVACParameters{FT}: HVAC system parameters
source
UrbanTethysChloris.ModelComponents.Parameters.IndoorOpticalPropertiesType
IndoorOpticalProperties{FT<:AbstractFloat} <: AbstractParameters{FT}

Optical properties for indoor building surfaces.

Fields

  • abc::FT: Albedo ceiling (-)
  • abw::FT: Albedo wall (-)
  • abg::FT: Albedo ground (-)
  • abm::FT: Albedo internal mass (-)
  • ec::FT: Emissivity ceiling (-)
  • eg::FT: Emissivity ground (-)
  • ew::FT: Emissivity wall (-)
  • em::FT: Emissivity internal mass (-)
source
UrbanTethysChloris.ModelComponents.Parameters.ThermalBuildingType
ThermalBuilding{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters specifying thermal properties and dimensions of building internal mass.

Fields

  • IntMassOn::Int: Include building internal mass in calculation (0/1)
  • FloorHeight::FT: Average floor height in building (m)
  • dzFloor::FT: Average thickness of floors in building (m)
  • dzWall::FT: Average thickness of walls in building (m)
  • lan_ground_floor::FT: Building ground thermal conductivity (W/m K)
  • cv_ground_floor::FT: Building ground volumetric heat capacity (J/m³ K)
  • lan_floor_IntMass::FT: Internal mass floor thermal conductivity (W/m K)
  • cv_floor_IntMass::FT: Internal mass floor volumetric heat capacity (J/m³ K)
  • lan_wall_IntMass::FT: Internal mass wall thermal conductivity (W/m K)
  • cv_wall_IntMass::FT: Internal mass wall volumetric heat capacity (J/m³ K)
source
UrbanTethysChloris.ModelComponents.Parameters.WindowParametersType
WindowParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters for building windows.

Fields

  • WindowsOn::Int: Include windows in simulation (0/1)
  • GlazingRatio::FT: Window-to-wall ratio (-)
  • Uvalue::FT: U-value of windows (W/m² K)
  • lan_windows::FT: Thermal conductivity of windows (W/m K)
  • cv_glass::FT: Volumetric heat capacity of glass (J/m³ K)
  • dztot::FT: Total thickness of glass layers (m)
  • SHGC::FT: Solar heat gain coefficient (-)
  • SolarTransmittance::FT: Solar radiation transmittance through windows (-)
  • SolarAbsorptivity::FT: Fraction of solar radiation absorbed by window (-)
  • SolarAlbedo::FT: Window albedo (-)
source
UrbanTethysChloris.ModelComponents.Parameters.HVACParametersType
HVACParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters for HVAC system.

Fields

  • ACon::Bool: Enable air conditioning (true/false)
  • AC_onCool::Bool: Enable cooling mode (true/false)
  • AC_onDehum::Bool: Enable dehumidification mode (true/false)
  • MasterOn::Bool: Enable master control (true/false)
  • Heatingon::Bool: Enable heating (true/false)
  • TsetpointCooling::FT: Cooling setpoint temperature (K)
  • TsetpointHeating::FT: Heating setpoint temperature (K)
  • RHsetpointCooling::FT: Cooling setpoint relative humidity (%)
  • RHsetpointHeating::FT: Heating setpoint relative humidity (%)
  • ACH::FT: Air changes per hour (1/h)
  • COPAC::FT: Coefficient of performance for AC (-)
  • COPHeat::FT: Coefficient of performance for heating (-)
  • f_ACLatentToQ::FT: Fraction of latent heat removed by AC that is condensed (-)
  • q_RHspCooling::FT: Latent heat for cooling relative humidity setpoint (W/m²)
source
UrbanTethysChloris.ModelComponents.Parameters.SoilParametersType
SoilParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Container for soil parameters for different urban surface components.

Fields

  • roof::VegetatedSoilParameters{FT}: Roof soil parameters
  • ground::VegetatedSoilParameters{FT}: Ground soil parameters
  • Sp_In_T::FT: Specific water retained by a tree (mm m^2 VEG area m^-2 plant area)
source
UrbanTethysChloris.ModelComponents.Parameters.VegetatedSoilParametersType
VegetatedSoilParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Soil parameters specific to vegetated surfaces (roof and ground)

Fields

  • Pcla::FT: Fraction of clay in the soil (-)
  • Psan::FT: Fraction of sand in the soil (-)
  • Porg::FT: Fraction of organic material in the soil (-)
  • In_max_imp::FT: Maxiumum interception capacity of impervious area (mm)
  • In_max_ground::FT: Maxiumum interception capacity of ground under roof vegetation (mm)
  • In_max_underveg::FT: Maxiumum interception capacity of vegetated ground area (mm)
  • In_max_bare::FT: Maxiumum interception capacity of bare ground area (mm)
  • Sp_In::FT: specific water retained by a vegetated surface (mm m^2 VEG area m^-2 plant area)
  • Kimp::FT: Hydraulic conductivity of impervious area (mm/h)
  • Kfc::FT: Conductivity at field capacity (mm/h)
  • Phy::FT: Suction at the residual/hygroscopic water content (kPa)
  • SPAR::Int: SOIL PARAMETER TYPE 1-VanGenuchten 2-Saxton-Rawls
  • Kbot::FT: Conductivity at the bedrock layer (mm/h)
source
UrbanTethysChloris.ModelComponents.Parameters.PersonParametersType
PersonParameters{FT<:AbstractFloat} <: AbstractParameters{FT}

Parameters for the person in the urban canyon for MRT calculations.

Fields

  • PositionPx::FT: Position within canyon [m]
  • PositionPz::FT: Height of centre of person [m]
  • PersonWidth::FT: Horizontal radius of ellipse describing person (=hip width / 2) [-]
  • PersonHeight::FT: Vertical radius of ellipse describing person (= height / 2) [-]
  • HeightWind::FT: Height for wind speed to calculate OTC [m]
source
UrbanTethysChloris.ModelComponents.Parameters.ParameterSetType
ParameterSet{FT<:AbstractFloat} <: AbstractParameterSet{FT}

Parameters for the Urban Tethys-Chloris model.

Fields

  • building_energy::BuildingEnergyModelParameters{FT}: Parameters for the building energy model.
  • person::PersonParameters{FT}: Parameters for the person.
  • soil::SoilParameters{FT}: Parameters for the soil.
  • surfacefractions::SurfaceFractions{FT}: Parameters for the surface fractions.
  • thermal::ThermalProperties{FT}: Parameters for the thermal properties.
  • optical::OpticalProperties{FT}: Parameters for the optical properties.
  • urbangeometry::UrbanGeometryParameters{FT}: Parameters for the urban geometry.
  • vegetation::VegetationParameters{FT}: Parameters for the vegetation.
source