Reference

Contents

Index

UrbanTethysChloris.create_modelMethod
Model(::Type{FT}) where {FT<:AbstractFloat}

Initialize a TethysChloris model by loading data from a NetCDF file and a YAML file.

Arguments

  • FT: The floating-point type to use (e.g., Float32 or Float64).
  • netcdfpath: The path to the NetCDF file containing model input data.
  • yamlpath: The path to the YAML file containing model parameters.

Returns

  • A Model{FT, MR, MG} instance initialized with the provided data.
source
UrbanTethysChloris.eb_solver_canyonMethod
eb_solver_canyon(
    TemperatureC::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    TempDamp_ittm::NamedTuple,
    ViewFactor::RayTracing.ViewFactor{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    WallLayers::NamedTuple,
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParInterceptionTree::NamedTuple,
    PropOpticalGround::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    PropOpticalWall::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    PropOpticalTree::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParThermalWall::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SunPosition::NamedTuple,
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    TempVecB_ittm::NamedTuple,
    G2Roof::FT,
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParThermalBuildingFloor::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    RESPreCalc::Bool,
    fconvPreCalc::FT,
    fconv::FT,
    rsGroundPreCalc::NamedTuple,
    rsTreePreCalc::NamedTuple,
    HVACSchedule::NamedTuple,
) where {FT<:AbstractFloat}

Calculate energy balance for canyon surfaces.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TemperatureB: Building temperatures vector
  • TempVec_ittm: Temperature vectors at previous time step
  • Humidity_ittm: Humidity at previous time step
  • MeteoData: Meteorological data
  • Int_ittm: Previous timestep interception values
  • ExWater_ittm: Previous timestep extractable water values
  • Vwater_ittm: Previous timestep soil water volume values
  • Owater_ittm: Previous timestep soil water content values
  • SoilPotW_ittm: Previous timestep soil water potential values
  • CiCO2Leaf_ittm: Previous timestep leaf CO2 concentration values
  • TempDamp_ittm: Previous timestep ground dampening temperature
  • ViewFactor: View factors between surfaces
  • Gemeotry_m: Urban geometry parameters
  • FractionsGround: Ground surface fractions
  • WallLayers: Wall layer parameters
  • ParSoilGround: Soil parameters for ground
  • ParInterceptionTree: Tree interception parameters
  • PropOpticalGround: Ground optical properties
  • PropOpticalWall: Wall optical properties
  • PropOpticalTree: Tree optical properties
  • ParThermalGround: Ground thermal properties
  • ParThermalWall: Wall thermal properties
  • ParVegGround: Ground vegetation parameters
  • ParVegTree: Tree vegetation parameters
  • SunPosition: Solar position parameters
  • HumidityAtm: Atmospheric humidity parameters
  • Anthropogenic: Anthropogenic parameters
  • ParCalculation: Calculation parameters
  • TempVecB_ittm: Building temperature vectors at previous time step
  • G2Roof: Conductive heat flux through roof [W/m²]
  • PropOpticalIndoors: Indoor optical properties
  • ParHVAC: HVAC parameters
  • ParThermalBuildingFloor: Building floor thermal parameters
  • ParWindows: Window parameters
  • BEM_on: Building Energy Model switch
  • RESPreCalc: Use pre-calculated resistances
  • fconvPreCalc: Pre-calculated convection factors
  • fconv: Convection factors
  • rsGroundPreCalc: Pre-calculated ground resistances
  • rsTreePreCalc: Pre-calculated tree resistances
  • HVACSchedule: HVAC operation schedule

Returns

  • Ycanyon::Vector{FT}: Canyon energy balance residuals
  • G2WallSun::FT: Conductive heat flux through sunlit wall
  • G2WallShade::FT: Conductive heat flux through shaded wall
  • SWRabs_t::Radiation.RadiationFluxes{FT}: Absorbed shortwave radiation
  • SWRabsWallSunTransmitted::FT: Shortwave radiation absorbed by sunlit wall transmitted indoors
  • SWRabsWallShadeTransmitted::FT: Shortwave radiation absorbed by shaded wall transmitted indoors
source
UrbanTethysChloris.eb_solver_roofMethod
eb_solver_roof(
    TemperatureR::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    PropOpticalRoof::ModelComponents.Parameters.OutdoorOpticalProperties{FT},
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    BEM_on::Bool,
    RESPreCalc::Bool,
    rsRoofPreCalc::NamedTuple
) where {FT<:AbstractFloat}

Calculate energy balance for roof surfaces.

Arguments

  • TemperatureR: Roof temperatures [K]
  • TemperatureB: Building temperatures [K]
  • TempVec_ittm: Temperature vectors at previous time step
  • MeteoData: Meteorological data
  • Int_ittm: Previous timestep interception values
  • ExWater_ittm: Previous timestep extractable water values
  • Vwater_ittm: Previous timestep soil water volume values
  • Owater_ittm: Previous timestep soil water content values
  • SoilPotW_ittm: Previous timestep soil water potential values
  • CiCO2Leaf_ittm: Previous timestep leaf CO2 concentration values
  • FractionsRoof: Roof surface fractions
  • ParSoilRoof: Soil parameters for roof
  • PropOpticalRoof: Optical properties for roof
  • ParThermalRoof: Thermal properties for roof
  • ParVegRoof: Vegetation parameters for roof
  • HumidityAtm: Atmospheric humidity parameters
  • Anthropogenic: Anthropogenic parameters
  • ParCalculation: Calculation parameters
  • BEM_on: Building Energy Model switch
  • RESPreCalc: Use pre-calculated resistances
  • rsRoofPreCalc: Pre-calculated resistance parameters

Returns

  • Yroof: Energy balance residuals [W/m²]
  • G2Roof: Conductive heat flux through roof [W/m²]
source
UrbanTethysChloris.eb_solver_urban_climate_building_energy_modelMethod
eb_solver_urban_climate_building_energy_model(
    TemperatureTot::Vector{FT},
    TempVec_ittm::NamedTuple,
    TempVecB_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    TempDamp_ittm::NamedTuple,
    ViewFactor::RayTracing.ViewFactor{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    WallLayers::NamedTuple,
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParInterceptionTree::NamedTuple,
    PropOpticalGround::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    PropOpticalWall::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    PropOpticalTree::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParThermalWall::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    PropOpticalRoof::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SunPosition::NamedTuple,
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParThermalBuildingFloor::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    RESPreCalc::Bool,
    fconvPreCalc::FT,
    fconv::FT,
    rsRoofPreCalc::NamedTuple,
    rsGroundPreCalc::NamedTuple,
    rsTreePreCalc::NamedTuple,
    HVACSchedule::NamedTuple
) where {FT<:AbstractFloat}

Solve energy balance for urban climate and building energy model.

Arguments

  • TemperatureTot: Temperature vector containing all surface temperatures
  • TempVec_ittm: Temperature vectors at previous time step
  • TempVecB_ittm: Building temperature vectors at previous time step
  • Humidity_ittm: Humidity at previous time step
  • Other parameters match those of ebsolverroof, ebsolvercanyon and ebsolverbuilding

Returns

  • Ytot: Combined energy balance residuals from roof, canyon and building
source
UrbanTethysChloris.eb_wb_canyon!Method
eb_wb_canyon(
    TemperatureC::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    TempDamp_ittm::NamedTuple,
    ViewFactor::RayTracing.ViewFactor{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    WallLayers::NamedTuple,
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParInterceptionTree::NamedTuple,
    PropOpticalGround::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    PropOpticalWall::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    PropOpticalTree::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParThermalWall::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SunPosition::NamedTuple,
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    TempVecB_ittm::NamedTuple,
    G2Roof::FT,
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParThermalBuildingFloor::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    RESPreCalc::Bool,
    fconvPreCalc::FT,
    fconv::FT,
    rsGroundPreCalc::NamedTuple,
    rsTreePreCalc::NamedTuple,
    HVACSchedule::NamedTuple,
) where {FT<:AbstractFloat}

Calculate energy balance for canyon surfaces.

Arguments

  • TemperatureC: Canyon temperatures vector
  • TemperatureB: Building temperatures vector
  • TempVec_ittm: Temperature vectors at previous time step
  • Humidity_ittm: Humidity at previous time step
  • MeteoData: Meteorological data
  • Int_ittm: Previous timestep interception values
  • ExWater_ittm: Previous timestep extractable water values
  • Vwater_ittm: Previous timestep soil water volume values
  • Owater_ittm: Previous timestep soil water content values
  • SoilPotW_ittm: Previous timestep soil water potential values
  • CiCO2Leaf_ittm: Previous timestep leaf CO2 concentration values
  • TempDamp_ittm: Previous timestep ground dampening temperature
  • ViewFactor: View factors between surfaces
  • Gemeotry_m: Urban geometry parameters
  • FractionsGround: Ground surface fractions
  • WallLayers: Wall layer parameters
  • ParSoilGround: Soil parameters for ground
  • ParInterceptionTree: Tree interception parameters
  • PropOpticalGround: Ground optical properties
  • PropOpticalWall: Wall optical properties
  • PropOpticalTree: Tree optical properties
  • ParThermalGround: Ground thermal properties
  • ParThermalWall: Wall thermal properties
  • ParVegGround: Ground vegetation parameters
  • ParVegTree: Tree vegetation parameters
  • SunPosition: Solar position parameters
  • HumidityAtm: Atmospheric humidity parameters
  • Anthropogenic: Anthropogenic parameters
  • ParCalculation: Calculation parameters
  • TempVecB_ittm: Building temperature vectors at previous time step
  • G2Roof: Conductive heat flux through roof [W/m²]
  • PropOpticalIndoors: Indoor optical properties
  • ParHVAC: HVAC parameters
  • ParThermalBuildingFloor: Building floor thermal parameters
  • ParWindows: Window parameters
  • BEM_on: Building Energy Model switch
  • RESPreCalc: Use pre-calculated resistances
  • fconvPreCalc: Pre-calculated convection factors
  • fconv: Convection factors
  • rsGroundPreCalc: Pre-calculated ground resistances
  • rsTreePreCalc: Pre-calculated tree resistances
  • HVACSchedule: HVAC operation schedule

Returns

  • Ycanyon::Vector{FT}: Canyon energy balance residuals
  • G2WallSun::FT: Conductive heat flux through sunlit wall
  • G2WallShade::FT: Conductive heat flux through shaded wall
  • SWRabs_t::Radiation.RadiationFluxes{FT}: Absorbed shortwave radiation
  • SWRabsWallSunTransmitted::FT: Shortwave radiation absorbed by sunlit wall transmitted indoors
  • SWRabsWallShadeTransmitted::FT: Shortwave radiation absorbed by shaded wall transmitted indoors
source
UrbanTethysChloris.eb_wb_roof!Method
eb_solver_roof(
    TemperatureR::Vector{FT},
    TemperatureB::Vector{FT},
    TempVec_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    Runon_ittm::NamedTuple,
    Geometry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    PropOpticalRoof::ModelComponents.Parameters.OutdoorOpticalProperties{FT},
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    BEM_on::Bool,
    RESPreCalc::Bool,
    rsRoofPreCalc::NamedTuple
) where {FT<:AbstractFloat}

Calculate energy balance for roof surfaces.

Arguments

  • TemperatureR: Roof temperatures [K]
  • TemperatureB: Building temperatures [K]
  • TempVec_ittm: Temperature vectors at previous time step
  • MeteoData: Meteorological data
  • Int_ittm: Interception at previous time step
  • ExWater_ittm: Extractable water at previous time step
  • Vwater_ittm: Soil water volume at previous time step
  • Owater_ittm: Soil water content at previous time step
  • SoilPotW_ittm: Soil water potential at previous time step
  • CiCO2Leaf_ittm: Leaf CO2 concentration at previous time step
  • Runon_ittm: Runon at previous time step
  • Geometry_m: Urban geometry parameters
  • FractionsRoof: Roof surface fractions
  • ParSoilRoof: Soil parameters for roof
  • PropOpticalRoof: Optical properties for roof
  • ParThermalRoof: Thermal properties for roof
  • ParVegRoof: Vegetation parameters for roof
  • HumidityAtm: Atmospheric humidity parameters
  • Anthropogenic: Anthropogenic parameters
  • ParCalculation: Calculation parameters
  • BEM_on: Building Energy Model switch
  • RESPreCalc: Use pre-calculated resistances
  • rsRoofPreCalc: Pre-calculated resistance parameters

Returns

  • SWRabsRoofImp: Absorbed shortwave radiation by impervious roof [W/m²]
  • SWRabsRoofVeg: Absorbed shortwave radiation by vegetated roof [W/m²]
  • SWRabsTotalRoof: Total absorbed shortwave radiation by roof [W/m²]
  • SWRoutRoofImp: Outgoing shortwave radiation from impervious roof [W/m²]
  • SWRoutRoofVeg: Outgoing shortwave radiation from vegetated roof [W/m²]
  • SWRoutTotalRoof: Total outgoing shortwave radiation from roof [W/m²]
  • SWRinRoofImp: Incoming shortwave radiation on impervious roof [W/m²]
  • SWRinRoofVeg: Incoming shortwave radiation on vegetated roof [W/m²]
  • SWRinTotalRoof: Total incoming shortwave radiation on roof [W/m²]
  • SWREBRoofImp: Shortwave radiation energy balance for impervious roof [W/m²]
  • SWREBRoofVeg: Shortwave radiation energy balance for vegetated roof [W/m²]
  • SWREBTotalRoof: Total shortwave radiation energy balance for roof [W/m²]
  • LWRabsRoofVeg: Absorbed longwave radiation by vegetated roof [W/m²]
  • LWRabsRoofImp: Absorbed longwave radiation by impervious roof [W/m²]
  • LWRabsTotalRoof: Total absorbed longwave radiation by roof [W/m²]
  • LWRoutRoofVeg: Outgoing longwave radiation from vegetated roof [W/m²]
  • LWRoutRoofImp: Outgoing longwave radiation from impervious roof [W/m²]
  • LWRoutTotalRoof: Total outgoing longwave radiation from roof [W/m²]
  • LWRinRoofImp: Incoming longwave radiation on impervious roof [W/m²]
  • LWRinRoofVeg: Incoming longwave radiation on vegetated roof [W/m²]
  • LWRinTotalRoof: Total incoming longwave radiation on roof [W/m²]
  • LWREBRoofImp: Longwave radiation energy balance for impervious roof [W/m²]
  • LWREBRoofVeg: Longwave radiation energy balance for vegetated roof [W/m²]
  • LWREBTotalRoof: Total longwave radiation energy balance for roof [W/m²]
  • HfluxRoofImp: Sensible heat flux from impervious roof [W/m²]
  • HfluxRoofVeg: Sensible heat flux from vegetated roof [W/m²]
  • HfluxRoof: Total sensible heat flux from roof [W/m²]
  • LEfluxRoofImp: Latent heat flux from impervious roof [W/m²]
  • LEfluxRoofVegInt: Interception latent heat flux from vegetated roof [W/m²]
  • LEfluxRoofVegPond: Pond latent heat flux from vegetated roof [W/m²]
  • LEfluxRoofVegSoil: Soil latent heat flux from vegetated roof [W/m²]
  • LTEfluxRoofVeg: Transpiration latent heat flux from vegetated roof [W/m²]
  • LEfluxRoofVeg: Total latent heat flux from vegetated roof [W/m²]
  • LEfluxRoof: Total latent heat flux from roof [W/m²]
  • G1RoofImp: Conductive heat flux through impervious roof [W/m²]
  • G2RoofImp: Conductive heat flux from impervious roof to building [W/m²]
  • dsRoofImp: Energy storage change in impervious roof [W/m²]
  • G1RoofVeg: Conductive heat flux through vegetated roof [W/m²]
  • G2RoofVeg: Conductive heat flux from vegetated roof to building [W/m²]
  • dsRoofVeg: Energy storage change in vegetated roof [W/m²]
  • G1Roof: Total conductive heat flux through roof [W/m²]
  • G2Roof: Total conductive heat flux from roof to building [W/m²]
  • dsRoof: Total energy storage change in roof [W/m²]
  • raRooftoAtm: Aerodynamic resistance from roof to atmosphere [s/m]
  • rb_LRoof: Leaf boundary layer resistance on roof [s/m]
  • rap_LRoof: Aerodynamic resistance for pond on roof [s/m]
  • r_soilRoof: Soil resistance on roof [s/m]
  • rs_sunRoof: Stomatal resistance for sunlit leaves on roof [s/m]
  • rs_shdRoof: Stomatal resistance for shaded leaves on roof [s/m]
  • EfluxRoofImp: Water vapor flux from impervious roof [kg/m²/s]
  • EfluxRoofVegInt: Water vapor flux from intercepted water on vegetated roof [kg/m²/s]
  • EfluxRoofVegPond: Water vapor flux from ponded water on vegetated roof [kg/m²/s]
  • EfluxRoofVegSoil: Water vapor flux from soil on vegetated roof [kg/m²/s]
  • TEfluxRoofVeg: Transpiration from vegetation on roof [kg/m²/s]
  • EfluxRoofVeg: Total water vapor flux from vegetated roof [kg/m²/s]
  • EfluxRoof: Total water vapor flux from roof [kg/m²/s]
  • QRoofImp: Runoff from impervious roof [mm/dth]
  • QRoofVegDrip: Drip from vegetated roof [mm/dth]
  • QRoofVegPond: Ponding on vegetated roof [mm/dth]
  • LkRoofImp: Leakage from impervious roof [mm/h]
  • LkRoofVeg: Leakage from vegetated roof [mm/h]
  • LkRoof: Total roof leakage [mm/h]
  • QRoofVegSoil: Soil runoff from vegetated roof [mm/dth]
  • RunoffRoofTot: Total roof runoff [mm/dth]
  • RunonRoofTot: Total roof runon [mm/dth]
  • IntRoofImp: Interception on impervious roof [mm]
  • IntRoofVegPlant: Interception on vegetation [mm]
  • IntRoofVegGround: Interception on ground below vegetation [mm]
  • dInt_dtRoofImp: Change in impervious roof interception [mm/dth]
  • dInt_dtRoofVegPlant: Change in vegetation interception [mm/dth]
  • dInt_dtRoofVegGround: Change in ground interception [mm/dth]
  • IntRooftot: Total roof interception [mm]
  • dInt_dtRooftot: Total change in roof interception [mm/dth]
  • dVRoofSoil_dt: Change in soil water volume [mm/dth]
  • fRoofVeg: Infiltration rate on vegetated roof [mm/h]
  • VRoofSoil: Soil water volume [mm]
  • OwRoofSoil: Soil water content [-]
  • OSwRoofSoil: Surface soil water content [-]
  • ExWaterRoof_H: Extractable water from higher soil layers [mm/h]
  • SoilPotWRoof_H: Soil water potential in higher soil layers [MPa]
  • ExWaterRoof_L: Extractable water from lower soil layers [mm/h]
  • SoilPotWRoof_L: Soil water potential in lower soil layers [MPa]
  • CiCO2LeafRoofVegSun: Sunlit leaf CO2 concentration [µmol/mol]
  • CiCO2LeafRoofVegShd: Shaded leaf CO2 concentration [µmol/mol]
  • WBRoofVegInVeg: Water balance for vegetation interception [mm/dth]
  • WBRoofVegInGround: Water balance for ground interception [mm/dth]
  • WBRoofVegSoil: Water balance for soil [mm/dth]
  • EBRoofImp: Energy balance for impervious roof [W/m²]
  • EBRoofVeg: Energy balance for vegetated roof [W/m²]
  • Yroof: Energy balance residuals [W/m²]
  • WBRoofImp: Water balance for impervious roof [mm/dth]
  • WBRoofVeg: Water balance for vegetated roof [mm/dth]
  • WBRoofTot: Total roof water balance [mm/dth]
source
UrbanTethysChloris.extrapolate!Method
extrapolate!(y::AbstractExtrapoledModelVariables{FT}, x::T, i::Signed) where {FT<:AbstractFloat,T}

Extrapolates the values in x into the extrapolated model variables y, if and only if the iteration number i is greater than 2.

Arguments

  • y::AbstractExtrapoledModelVariables{FT}: The extrapolated model variables to be updated
  • x::T: The model variables to extrapolate from
  • i::Signed: The current iteration number
source
UrbanTethysChloris.f_solver_tot!Method
f_solver_tot(
    TempVec_ittm::NamedTuple,
    TempVecB_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    MeteoData::NamedTuple,
    Int_ittm::NamedTuple,
    ExWater_ittm::NamedTuple,
    Vwater_ittm::NamedTuple,
    Owater_ittm::NamedTuple,
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    TempDamp_ittm::NamedTuple,
    ViewFactor::RayTracing.ViewFactor{FT},
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    FractionsRoof::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    WallLayers::NamedTuple,
    ParSoilGround::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    ParInterceptionTree::NamedTuple,
    PropOpticalGround::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    PropOpticalWall::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    PropOpticalTree::ModelComponents.Parameters.SimpleOpticalProperties{FT},
    ParThermalGround::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParThermalWall::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParVegTree::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    ParSoilRoof::ModelComponents.Parameters.VegetatedSoilParameters{FT},
    PropOpticalRoof::ModelComponents.Parameters.VegetatedOpticalProperties{FT},
    ParThermalRoof::ModelComponents.Parameters.LocationSpecificThermalProperties{FT},
    ParVegRoof::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SunPosition::NamedTuple,
    HumidityAtm::NamedTuple,
    Anthropogenic::NamedTuple,
    ParCalculation::NamedTuple,
    PropOpticalIndoors::ModelComponents.Parameters.IndoorOpticalProperties{FT},
    ParHVAC::ModelComponents.Parameters.HVACParameters{FT},
    ParThermalBuildingFloor::ModelComponents.Parameters.ThermalBuilding{FT},
    ParWindows::ModelComponents.Parameters.WindowParameters{FT},
    BEM_on::Bool,
    TempVec_ittm2Ext::ExtrapolatedTempVec{FT},
    Humidity_ittm2Ext::ExtrapolatedHumidity{FT},
    TempVecB_ittm2Ext::ExtrapolatedTempVecB{FT},
    Meteo_ittm::Meteotm1{FT},
    RESPreCalc::Bool,
    fconvPreCalc::FT,
    fconv::FT,
    rsRoofPreCalc::NamedTuple,
    rsGroundPreCalc::NamedTuple,
    rsTreePreCalc::NamedTuple,
    HVACSchedule::NamedTuple,
) where {FT<:AbstractFloat}

Nonlinear system solver for the coupled energy balance equations.

Returns

  • T::Vector{FT}: Solution vector containing temperatures
  • fval::Vector{FT}: Function values at solution
  • exitflag::Int: Exit flag indicating convergence status

Temperature vector indices:

  1. Troof_imp: Impervious roof temperature
  2. Troof_veg: Vegetated roof temperature
  3. Troofinteriorimp: Interior impervious roof temperature
  4. Troofinteriorveg: Interior vegetated roof temperature
  5. TGroundImp: Ground impervious area temperature
  6. TGroundBare: Ground bare area temperature
  7. TGroundVeg: Ground vegetated area temperature
  8. TWallSun: Sunlit wall temperature
  9. TWallShade: Shaded wall temperature
  10. TTree: Tree canopy temperature
  11. TWallIntSun: Interior sunlit wall temperature
  12. TWallIntShade: Interior shaded wall temperature
  13. TCanyon: Canyon air temperature
  14. qCanyon: Canyon specific humidity
  15. TCeiling: Building ceiling temperature
  16. TWallSunInt: Interior sunlit wall temperature
  17. TWallShadeInt: Interior shaded wall temperature
  18. TWindows: Window temperature
  19. TGroundInt: Interior ground temperature
  20. TIntMass: Internal mass temperature
  21. TBin: Indoor air temperature
  22. qBin: Indoor specific humidity
source
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.plan_area_energy_balance_calculationMethod
plan_area_energy_balance_calculation(
    results::Dict{Symbol,Dict{Symbol,Array}},
    model::Model{FT},
    forcing::ModelComponents.ForcingInputSet{FT,1},
    view_factor::RayTracing.ViewFactor{FT},
    NN::Signed,
    BEM_on::Bool=true,
) where {FT<:AbstractFloat}

Calculates the plan area energy balance components for the urban area, canyon, and roof. Analogous to PlanAreaEnergyBalanceCalculation.m in the original MATLAB code.

Arguments

  • results: Dictionary containing simulation results.
  • model: The model structure.
  • forcing: The forcing input data.
  • view_factor: View factor structure for radiation calculations.
  • NN: Number of time steps to consider.
  • BEM_on: Boolean flag to indicate if Building Energy Model is active (default: true).

Returns

  • EnergyFluxUrban: Dictionary containing urban energy flux components.
  • EnergyFluxCan: Dictionary containing canyon energy flux components.
  • EnergyFluxRoof: Dictionary containing roof energy flux components.
  • fig1, fig2, fig3: Figures to visualize the results.
source
UrbanTethysChloris.post_calculate_soil_moisture_changeMethod
post_calculate_soil_moisture_change(
    OwaterInitial::Dict{Symbol,Array},
    Owater::Dict{Symbol,Array},
    ParSoilRoof::ModelComponents.Parameters.SoilParameters{FT},
    ParSoilGround::ModelComponents.Parameters.SoilParameters{FT},
    FractionsRoof::ModelComponents.Parameters.SurfaceFractionsParameters{FT},
    FractionsGround::ModelComponents.Parameters.SurfaceFractionsParameters{FT},
    geometry::ModelComponents.Parameters.UrbanGeometryParameters{FT},
) where {FT<:AbstractFloat}

Post-calculates soil water volume changes for roof, canyon, and urban areas.

Arguments

  • OwaterInitial: Initial soil water content at the start of simulation, as a Dict
  • Owater: Current soil water content, as a Dict
  • ParSoilRoof: Soil parameters for roof.
  • ParSoilGround: Soil parameters for ground/canyon.
  • FractionsRoof: Surface fractions for roof.
  • FractionsGround: Surface fractions for ground/canyon.
  • geometry: Urban geometry parameters.

Returns

  • dVdtRoofCalc: Calculated change in soil water volume for roof (mm/time step).
  • dVdtCanCalc: Calculated change in soil water volume for canyon (mm/time step).
  • dVdtUrbCalc: Calculated change in soil water volume for urban area (mm/time step).
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
UrbanTethysChloris.urban_climate_variablesMethod
urban_climate_variables(
    results::Dict{Symbol,Dict{Symbol,Array}},
    model::Model{FT},
    forcing::ForcingInputSet{FT,1},
    NN::Signed,
) where {FT<:AbstractFloat}

Processes the simulation results to extract urban climate variables such as air temperature, surface temperatures, relative humidity, mean radiant temperature, and UTCI. It computes diurnal and seasonal averages and generates plots for visualization.

Arguments

  • results::Dict{String,Any}: Dictionary containing simulation results.
  • model::Model{FT}: The urban climate model used for the simulation.
  • forcing::ForcingInputSet{FT,1}: Forcing input data used in the simulation.
  • NN::Signed: Number of timesteps in the simulation.
source
UrbanTethysChloris.water_balance_componentsMethod
water_balance_components(
    results::Dict{String,Any},
    model::Model{FT},
    forcing::ModelComponents.ForcingInputSet{FT,1},
    NN::Signed,
) where {FT<:AbstractFloat}

Calculates the water balance components for the urban area, canyon, roof, and building. Analogous to WaterBalanceComponents.m in the original MATLAB code.

Arguments

  • results: Dictionary containing simulation results.
  • model: The model structure.
  • forcing: The forcing input data.
  • NN: Number of timesteps.

Returns

  • WaterFluxUrban: DataFrame containing urban water flux components.
  • WaterFluxCan: DataFrame containing canyon water flux components.
  • WaterFluxRoof: DataFrame containing roof water flux components.
  • WaterFluxBuild: DataFrame containing building water flux components.
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_output!Method
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_temperature!Method
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_approx!Method
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.photosynthesis_biochemicalMethod
photosynthesis_biochemical(
    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_00::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 biochemical photosynthesis parameters and internal CO₂ concentration.

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_00: 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

  • Ccnew: Updated internal CO₂ concentration [μmolCO₂/mol]
  • An: Net CO₂ assimilation rate [μmolCO₂/m²s]
  • gs: Stomatal conductance for water vapor [mol/m²s]
  • rs: Stomatal resistance for water vapor [s/m]
  • Rd: Day respiration rate [μmolCO₂/m²s]
  • Vcmax: Maximum carboxylation rate at current temperature [μmolCO₂/m²s]
  • Jmax: Maximum electron transport rate at current temperature [μmol/m²s]
  • gs_fac: Limiting factor for stomatal conductance [-]
source
UrbanTethysChloris.Resistance.precalculate_for_faster_numerical_solutionMethod
precalculate_for_faster_numerical_solution(
    model::Model{FT},
    TempVec_ittm::ModelComponents.ModelVariables.TempVec{FT},
    Humidity_ittm::ModelComponents.ModelVariables.Humidity{FT},
    SoilPotW_ittm::ModelComponents.ModelVariables.SoilPotW{FT},
    CiCO2Leaf_ittm::ModelComponents.ModelVariables.CiCO2Leaf{FT},
    RES_ittm::ModelComponents.ModelVariables.Resistance{FT},
    ittn::Int,
    ittm::Int,
    ViewFactor::RayTracing.ViewFactor{FT},
    BEM_on::Bool,
) where {FT<:AbstractFloat}

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

Arguments

  • model::Model{FT}: The model instance containing variables and parameters
  • TempVec_ittm: Temperature vector containing surface temperatures
  • Humidity_ittm: Humidity data structure
  • SoilPotW_ittm: Soil water potential data
  • CiCO2Leaf_ittm: Leaf CO2 concentration data
  • RES_ittm: Resistance values from previous iterations
  • ittn::Int: Current time step index
  • ittm::Int: Current sensitivity index
  • ViewFactor: View factors between urban surfaces
  • BEM_on: Building energy model flag

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_ground_treeMethod
precalculate_stomatal_resistance_ground_tree(
    TempVec_ittm::NamedTuple,
    Humidity_ittm::NamedTuple,
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    SoilPotW_ittm::NamedTuple,
    CiCO2Leaf_ittm::NamedTuple,
    MeteoData::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,
    rb_L::FT,
    rb_H::FT,
    rap_can::FT,
    rap_Htree_In::FT,
) where {FT<:AbstractFloat}

Calculate stomatal resistance for ground vegetation and trees.

Arguments

  • TempVec_ittm: Temperature vector containing canyon, ground vegetation and tree temperatures
  • Humidity_ittm: Humidity data structure with canyon specific humidity
  • ParVegGround: Ground vegetation parameters including LAI, photosynthesis properties
  • SoilPotW_ittm: Soil water potential data for ground vegetation and trees
  • CiCO2Leaf_ittm: Leaf CO2 concentration data for previous iteration
  • MeteoData: Meteorological data including atmospheric pressure and CO2 concentration
  • geometry: Urban geometry parameters
  • FractionsGround: Ground surface fractions (vegetated, bare, impervious)
  • PropOpticalGround: Ground optical properties
  • PropOpticalWall: Wall optical properties
  • PropOpticalTree: Tree optical properties
  • ParVegTree: Tree vegetation parameters
  • SunPosition: Sun position parameters (solar zenith and azimuth angles)
  • ViewFactor: View factors between urban surfaces
  • ParWindows: Window parameters
  • BEM_on: Building energy model flag
  • rb_L: Boundary layer resistance for ground vegetation [s/m]
  • rb_H: Boundary layer resistance for trees [s/m]
  • rap_can: Within-canyon aerodynamic resistance [s/m]
  • rap_Htree_In: Aerodynamic resistance within tree canopy [s/m]

Returns

  • rs_sun_H: Stomatal resistance for sunlit tree leaves [s/m]
  • rs_shd_H: Stomatal resistance for shaded tree leaves [s/m]
  • Ci_sun_H: Internal CO2 concentration for sunlit tree leaves [ppm]
  • Ci_shd_H: Internal CO2 concentration for shaded tree leaves [ppm]
  • rs_sun_L: Stomatal resistance for sunlit ground vegetation leaves [s/m]
  • rs_shd_L: Stomatal resistance for shaded ground vegetation leaves [s/m]
  • Ci_sun_L: Internal CO2 concentration for sunlit ground vegetation leaves [ppm]
  • Ci_shd_L: Internal CO2 concentration for shaded ground vegetation 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_output!Method
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.air_humidity_2mMethod
air_humidity_2m(
    q2m::FT,
    T2m::FT,
    Timp::FT,
    Tbare::FT,
    Tveg::FT,
    Tcan::FT,
    qcan::FT,
    rap_can2m::FT,
    rap_can2m_Inv::FT,
    rb_L::FT,
    alp_soil_bare::FT,
    r_soil_bare::FT,
    alp_soil_veg::FT,
    r_soil_veg::FT,
    rs_sun_L::FT,
    rs_shd_L::FT,
    dw_L::FT,
    Fsun_L::FT,
    Fshd_L::FT,
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    Eimp::FT,
    Ebare::FT,
    Eveg_int::FT,
    Eveg_pond::FT,
    Eveg_soil::FT,
    TEveg::FT,
    Pre::FT,
    Humidity_ittm::NamedTuple,
    fconv::FT,
    MeteoData::NamedTuple,
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    rho_atm::FT,
    Zp1::FT,
    ParCalculation::NamedTuple
) where {FT<:AbstractFloat}

Calculate the air humidity at 2m level and compute the vapor flux difference.

Arguments

  • q2m: specific humidity at 2m [kg/kg]
  • T2m: temperature at 2m [K]
  • Timp: impervious surface temperature [K]
  • Tbare: bare soil temperature [K]
  • Tveg: vegetation temperature [K]
  • Tcan: canyon air temperature [K]
  • qcan: canyon specific humidity [kg/kg]
  • 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]
  • alp_soil_bare: bare soil water stress factor [-]
  • r_soil_bare: bare soil resistance [s/m]
  • alp_soil_veg: vegetated soil water stress factor [-]
  • r_soil_veg: vegetated soil resistance [s/m]
  • rs_sun_L: sunlit leaf stomatal resistance [s/m]
  • rs_shd_L: shaded leaf stomatal resistance [s/m]
  • dw_L: wet leaf fraction [-]
  • Fsun_L: sunlit leaf fraction [-]
  • Fshd_L: shaded leaf fraction [-]
  • FractionsGround: ground cover fractions
  • ParVegGround: vegetation parameters
  • Eimp: impervious surface vapor flux [kg/m²s]
  • Ebare: bare soil vapor flux [kg/m²s]
  • Eveg_int: intercepted water vapor flux [kg/m²s]
  • Eveg_pond: ponded water vapor flux [kg/m²s]
  • Eveg_soil: soil under vegetation vapor flux [kg/m²s]
  • TEveg: vegetation transpiration [kg/m²s]
  • Pre: air pressure [Pa]
  • Humidity_ittm: humidity variables from previous timestep
  • fconv: convection factor [-]
  • MeteoData: meteorological data
  • Gemeotry_m: urban geometry parameters
  • rho_atm: air density [kg/m³]
  • Zp1: reference height [m]
  • ParCalculation: calculation parameters

Returns

  • DEi::FT: vapor flux difference [kg/m²s]
source
UrbanTethysChloris.TurbulentHeat.air_humidity_2m_outputMethod
air_humidity_2m_output(
    q2m::FT,
    T2m::FT,
    Timp::FT,
    Tbare::FT,
    Tveg::FT,
    Tcan::FT,
    qcan::FT,
    rap_can2m::FT,
    rap_can2m_Inv::FT,
    rb_L::FT,
    alp_soil_bare::FT,
    r_soil_bare::FT,
    alp_soil_veg::FT,
    r_soil_veg::FT,
    rs_sun_L::FT,
    rs_shd_L::FT,
    dw_L::FT,
    Fsun_L::FT,
    Fshd_L::FT,
    FractionsGround::ModelComponents.Parameters.LocationSpecificSurfaceFractions{FT},
    ParVegGround::ModelComponents.Parameters.HeightDependentVegetationParameters{FT},
    Eimp::FT,
    Ebare::FT,
    Eveg_int::FT,
    Eveg_pond::FT,
    Eveg_soil::FT,
    TEveg::FT,
    Pre::FT,
    Humidity_ittm::NamedTuple,
    fconv::FT,
    MeteoData::NamedTuple,
    Gemeotry_m::ModelComponents.Parameters.UrbanGeometryParameters{FT},
    rho_atm::FT,
    Zp1::FT,
    ParCalculation::NamedTuple
) where {FT<:AbstractFloat}

Calculate the air humidity at 2m level and compute vapor flux differences with additional outputs.

Arguments

  • q2m: specific humidity at 2m [kg/kg]
  • T2m: temperature at 2m [K]
  • Timp: impervious surface temperature [K]
  • Tbare: bare soil temperature [K]
  • Tveg: vegetation temperature [K]
  • Tcan: canyon air temperature [K]
  • qcan: canyon specific humidity [kg/kg]
  • 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]
  • alp_soil_bare: bare soil water stress factor [-]
  • r_soil_bare: bare soil resistance [s/m]
  • alp_soil_veg: vegetated soil water stress factor [-]
  • r_soil_veg: vegetated soil resistance [s/m]
  • rs_sun_L: sunlit leaf stomatal resistance [s/m]
  • rs_shd_L: shaded leaf stomatal resistance [s/m]
  • dw_L: wet leaf fraction [-]
  • Fsun_L: sunlit leaf fraction [-]
  • Fshd_L: shaded leaf fraction [-]
  • FractionsGround: ground cover fractions
  • ParVegGround: vegetation parameters
  • Eimp: impervious surface vapor flux [kg/m²s]
  • Ebare: bare soil vapor flux [kg/m²s]
  • Eveg_int: intercepted water vapor flux [kg/m²s]
  • Eveg_pond: ponded water vapor flux [kg/m²s]
  • Eveg_soil: soil under vegetation vapor flux [kg/m²s]
  • TEveg: vegetation transpiration [kg/m²s]
  • Pre: air pressure [Pa]
  • Humidity_ittm: humidity variables from previous timestep
  • fconv: convection factor [-]
  • MeteoData: meteorological data
  • Gemeotry_m: urban geometry parameters
  • rho_atm: air density [kg/m³]
  • Zp1: reference height [m]
  • ParCalculation: calculation parameters

Returns

  • DEi::FT: vapor flux difference [kg/m²s]
  • Eimp_2m::FT: impervious surface vapor flux at 2m [kg/m²s]
  • Ebare_soil_2m::FT: bare soil vapor flux at 2m [kg/m²s]
  • Eveg_int_2m::FT: intercepted water vapor flux at 2m [kg/m²s]
  • Eveg_soil_2m::FT: soil under vegetation vapor flux at 2m [kg/m²s]
  • TEveg_2m::FT: vegetation transpiration at 2m [kg/m²s]
  • Ecan_2m::FT: canyon vapor flux at 2m [kg/m²s]
  • q2m::FT: specific humidity at 2m [kg/kg]
  • e_T2m::FT: vapor pressure at 2m [Pa]
  • RH_T2m::FT: relative humidity at 2m [-]
  • qcan::FT: canyon specific humidity [kg/kg]
  • e_Tcan::FT: canyon vapor pressure [Pa]
  • RH_Tcan::FT: canyon relative humidity [-]
source
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,
    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
  • Gemeotry_m: Geometry parameters
  • 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

UrbanTethysChloris.ModelComponents.accessorsFunction
accessors(T::Type{T}, O::Type{O}) where {T,O}

Create a nested dictionary of accessor functions for type T corresponding to the outputs to save defined by type O. The function is recursive, building the dictionary from the bottom up by decreasing the output type until reaching NoOutputs.

Arguments

  • T::Type{T}: The model component type
  • O::Type{O}: The outputs to save type

Returns

  • Dict{Symbol,Dict{Symbol,Function}}: Nested dictionary of accessor functions
source
UrbanTethysChloris.ModelComponents.create_accessor_dictFunction
create_accessor_dict(::Type{T}, fns::NTuple=fieldnames(T)) where {T}

Create a nested dictionary of accessor functions for type T for the specified fields fns.

Arguments

  • T::Type{T}: The model component type
  • fns::NTuple: The fields to create accessors for (default: all fields of T)

Returns

  • Dict{Symbol,Dict{Symbol,Function}}: Nested dictionary of accessor functions
source
UrbanTethysChloris.ModelComponents.outputs_to_saveFunction
outputs_to_save(::Type{T}, ::Type{O}) where {T, O <: AbstractOutputsToSave}

Get the outputs to save for type T corresponding to the outputs to save defined by type AbstractOutputsToSave. By default, returns an empty tuple. This function is expected to be overloaded for specific types.

Arguments

  • T::Type{T}: The model component type
  • ::Type{AbstractOutputsToSave}: The outputs to save type

Returns

  • Tuple: Tuple of output field names
source

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, N} <: 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, N} <: Abstract1PForcingInputs{FT, N}

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, N}

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, N} <: Abstract1PForcingInputs{FT, N}

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

ModelVariables

UrbanTethysChloris.ModelComponents.ModelVariables.AbsorbedRadiationFluxVariablesSubsetType
AbsorbedRadiationFluxVariablesSubset{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Absorbed shortwave radiation for different urban surfaces.

Fields

  • RoofImp: Absorbed shortwave radiation roof impervious area [W/m² horizontal impervious roof area]
  • RoofVeg: Absorbed shortwave radiation roof vegetated area [W/m² horizontal vegetated roof area]
  • TotalRoof: Total absorbed shortwave radiation by the roof area [W/m² horizontal roof area]
  • GroundImp: Absorbed shortwave radiation ground impervious area [W/m² horizontal impervious ground area]
  • GroundBare: Absorbed shortwave radiation ground bare area [W/m² horizontal bare ground area]
  • GroundVeg: Absorbed shortwave radiation ground vegetated area [W/m² horizontal vegetated ground area]
  • Tree: Absorbed shortwave radiation tree canopy [W/m² horizontally projected tree area]
  • WallSun: Absorbed shortwave radiation sunlit area [W/m² vertical wall area]
  • WallShade: Absorbed shortwave radiation shaded area [W/m² vertical wall area]
  • TotalGround: Total absorbed shortwave radiation by the canyon ground area [W/m²]
  • TotalCanyon: Total absorbed shortwave radiation by all the canyon facets [W/m²]
  • TotalUrban: Total absorbed shortwave radiation by all the urban elements (roof plus canyon) [W/m²]
  • WallSunExt: Absorbed shortwave radiation by the exterior sunlit wall area, average over wall and window area [W/m² vertical wall area]
  • WallShadeExt: Absorbed shortwave radiation by the exterior sunlit wall area, average over wall and window area [W/m² vertical wall area]
  • WallSunTransmitted: Shortwave radiation transmitted through the windows on the sunlit wall area [W/m² vertical wall area]
  • WallShadeTransmitted: Shortwave radiation transmitted through the windows on the sunlit wall area [W/m² vertical wall area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.BEMEnergyUseType
BEMEnergyUse{FT<:AbstractFloat} <: AbstractBEMEnergyUse{FT}

Building energy use variables.

Fields

  • EnergyForAC: Energy consumption for AC [total building interior]
  • EnergyForAC_H: Energy consumption due to sensible heat load for AC [total building interior]
  • EnergyForAC_LE: Energy consumption for AC latent [total building interior]
  • EnergyForHeating: Energy consumption for heating [total building interior]
source
UrbanTethysChloris.ModelComponents.ModelVariables.BEMWasteHeatType
BEMWasteHeat{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building energy model waste heat variables.

Fields

  • SensibleFromAC_Can: Sensible heat added to canyon air due to air conditioning energy use [W/m² canyon ground]
  • LatentFromAC_Can: Latent heat added to canyon air due to air conditioning energy use [W/m² canyon ground]
  • WaterFromAC_Can: Water that is condensed and removed as runoff in sewer system [W/m² canyon ground]
  • SensibleFromHeat_Can: Sensible heat added to canyon air due to heating [W/m² canyon ground]
  • LatentFromHeat_Can: Latent heat added to canyon air due to heating [W/m² canyon ground]
  • SensibleFromVent_Can: Sensible heat removed or added to the canyon due to exchange of indoor to outdoor air [W/m² canyon ground]
  • LatentFromVent_Can: Latent heat removed or added to the canyon due to exchange of indoor to outdoor air [W/m² canyon ground]
  • TotAnthInput_URB: Total anthropogenic heat output to the urban area due to HVAC [W/m² urban]
source
UrbanTethysChloris.ModelComponents.ModelVariables.BuildingEnergyModelVariablesType
BuildingEnergyModelVariables{FT<:AbstractFloat} <: AbstractBuildingEnergyModelVariables{FT}

Container for all building energy model variable components.

Fields

  • TempVecB: Building interior temperatures
  • HumidityBuilding: Building interior humidity variables
  • HbuildInt: Building interior sensible heat fluxes
  • LEbuildInt: Building interior latent heat fluxes
  • GbuildInt: Building interior conductive heat fluxes
  • SWRabsB: Absorbed shortwave radiation in building interior
  • LWRabsB: Absorbed longwave radiation in building interior
  • BEMWasteHeat: Building energy model waste heat variables
  • BEMEnergyUse: Building energy use variables
  • ParACHeat_ts: AC parameters time series variables
source
UrbanTethysChloris.ModelComponents.ModelVariables.CiCO2LeafType
CiCO2Leaf{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Intercellular CO2 concentration in leaf for different urban surfaces.

Fields

  • CiCO2LeafRoofVegSun: Cisunveg sunlit roof leafs [umolCO2/mol]
  • CiCO2LeafRoofVegShd: Cishdveg shaded roof leafs [umolCO2/mol]
  • CiCO2LeafGroundVegSun: Cisunveg sunlit ground leafs [umolCO2/mol]
  • CiCO2LeafGroundVegShd: Cishdveg shaded ground leafs [umolCO2/mol]
  • CiCO2LeafTreeSun: Cisunveg sunlit tree leafs [umolCO2/mol]
  • CiCO2LeafTreeShd: Cishdveg shaded tree leafs [umolCO2/mol]
source
UrbanTethysChloris.ModelComponents.ModelVariables.DefaultRadiationFluxVariablesSubsetType
DefaultRadiationFluxVariablesSubset{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Radiation flux for different urban surfaces.

Fields

  • RoofImp: Incoming shortwave radiation roof impervious area [W/m² horizontal impervious roof area]
  • RoofVeg: Incoming shortwave radiation roof vegetated area [W/m² horizontal vegetated roof area]
  • TotalRoof: Total incoming shortwave radiation by the roof area [W/m² horizontal roof area]
  • GroundImp: Incoming shortwave radiation ground impervious area [W/m² horizontal impervious ground area]
  • GroundBare: Incoming shortwave radiation ground bare area [W/m² horizontal bare ground area]
  • GroundVeg: Incoming shortwave radiation ground vegetated area [W/m² horizontal vegetated ground area]
  • Tree: Incoming shortwave radiation tree canopy [W/m² horizontally projected tree area]
  • WallSun: Incoming shortwave radiation sunlit area [W/m² vertical wall area]
  • WallShade: Incoming shortwave radiation shaded area [W/m² vertical wall area]
  • TotalGround: Total incoming shortwave radiation by the canyon ground area [W/m²]
  • TotalCanyon: Total incoming shortwave radiation by all the canyon facets [W/m²]
  • TotalUrban: Total incoming shortwave radiation by all the urban elements (roof plus canyon) [W/m²]
source
UrbanTethysChloris.ModelComponents.ModelVariables.EBType
EB{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Energy balance checks for different urban components.

Fields

  • EBRoofImp: Energy balance check for impervious roof [W/m² impervious roof area]
  • EBRoofVeg: Energy balance check for vegetated roof [W/m² vegetated roof area]
  • EBGroundImp: Energy balance check for impervious ground [W/m² impervious ground area]
  • EBGroundBare: Energy balance check for bare ground [W/m² bare ground area]
  • EBGroundVeg: Energy balance check for vegetated ground [W/m² vegetated ground area]
  • EBTree: Energy balance check for trees [W/m² horizontally projected tree area]
  • EBWallSun: Energy balance check for sunlit wall [W/m² vertical wall area]
  • EBWallShade: Energy balance check for shaded wall [W/m² vertical wall area]
  • EBWallSunInt: Energy balance check for sunlit wall interior [W/m² vertical wall area]
  • EBWallShadeInt: Energy balance check for shaded wall interior [W/m² vertical wall area]
  • EBCanyonT: Energy balance check for canyon temperature [W/m² canyon area]
  • EBCanyonQ: Energy balance check for canyon humidity [kg/kg]
source
UrbanTethysChloris.ModelComponents.ModelVariables.EfluxType
Eflux{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Evapotranspiration fluxes.

Fields

  • EfluxRoofImp: Evaporation flux of intercepted water from impervious roof area to atmosphere [kg/m²*s horizontal impervious roof area]
  • EfluxRoofVegInt: Evaporation flux of intercepted water on roof vegetation to atmosphere [kg/m²*s horizontal vegetated roof area]
  • EfluxRoofVegPond: Evaporation flux of intercepted water on ground under roof vegetation to atmosphere [kg/m²*s horizontal vegetated roof area]
  • EfluxRoofVegSoil: Evaporation flux of water from roof soil under vegetation to atmosphere [kg/m²*s horizontal vegetated roof area]
  • TEfluxRoofVeg: Evaporation flux of transpiration from roof plants to atmosphere [kg/m²*s horizontal vegetated roof area]
  • EfluxRoofVeg: Total evaporation flux of vegetated roof to atmosphere [kg/m²*s horizontal vegetated roof area]
  • EfluxRoof: Total evaporation flux of roof to atmosphere [kg/m²*s horizontal vegetated roof area]
  • EfluxGroundImp: Evaporation flux of intercepted water on impervious ground area to canyon [kg/m²*s horizontal impervious ground area]
  • EfluxGroundBarePond: Evaporation flux of water on bare ground to canyon [kg/m²*s horizontal bare ground area]
  • EfluxGroundBareSoil: Evaporation flux of water from bare ground to canyon [kg/m²*s horizontal bare ground area]
  • EfluxGroundBare: Total evaporation flux of bare ground area to canyon [kg/m²*s horizontal bare ground area]
  • EfluxGroundVegInt: Evaporation flux of intercepted water on ground vegetation to canyon [kg/m²*s horizontal vegetated ground area]
  • EfluxGroundVegPond: Evaporation flux of intercepted water on ground under vegetation to canyon [kg/m²*s horizontal vegetated ground area]
  • EfluxGroundVegSoil: Evaporation flux of water from ground soil under vegetation to canyon [kg/m²*s horizontal vegetated ground area]
  • TEfluxGroundVeg: Evaporation flux of transpiration from ground plants to canyon [kg/m²*s horizontal vegetated ground area]
  • EfluxGroundVeg: Total evaporation flux of vegetated ground to canyon [kg/m²*s horizontal vegetated ground area]
  • EfluxGround: Total evaporation flux of ground to canyon [kg/m²*s horizontal vegetated ground area]
  • EfluxTreeInt: Evaporation flux of intercepted water on tree canopy to canyon [kg/m²*s horizontally projected tree area]
  • TEfluxTree: Evaporation flux of transpiration from tree canopy to canyon [kg/m²*s horizontally projected tree area]
  • EfluxTree: Total evaporation flux of tree canopy to canyon [kg/m²*s horizontally projected tree area]
  • EfluxWallSun: Evaporation flux of sunlit wall to canyon [kg/m²*s vertical wall area]
  • EfluxWallShade: Evaporation flux of shaded wall to canyon [kg/m²*s vertical wall area]
  • EfluxCanyon: Evaporation flux of canyon to atmosphere [kg/m²*s horizontal canyon area]
  • EfluxUrban: Total evaporation flux of urban area to atmosphere [kg/m²*s horizontal urban area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.EnergyBalanceVariablesType
EnergyBalanceVariables{FT<:AbstractFloat} <: AbstractModelVariableSet{FT}

Container for all energy balance variable components.

Fields

  • WBRoof: Water balance checks for roof surfaces and soil
  • WBCanyonIndv: Individual water balance checks for canyon components
  • WBCanyonTot: Total water balance checks for canyon components and levels
  • EB: Energy balance checks for different urban components
  • Solver: Energy balance solver variables
source
UrbanTethysChloris.ModelComponents.ModelVariables.GbuildIntType
GbuildInt{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building interior conductive heat fluxes.

Fields

  • G2Roof: Conductive heat flux reaching building roof interior [W/m² roof area]
  • G2WallSun: Conductive heat flux reaching building sunlit wall interior [W/m² wall area]
  • G2WallShade: Conductive heat flux reaching building shaded wall interior [W/m² wall area]
  • Gfloor: Conductive heat flux from building floor [W/m² ground area]
  • dSinternalMass: Change in heat storage in internal mass [W/m² wall area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.GfluxType
Gflux{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Conductive heat fluxes for different urban surfaces.

Fields

  • G1RoofImp: Conductive heat flux of first layer of impervious roof [W/m² horizontal impervious roof area]
  • G1RoofVeg: Conductive heat flux of first layer of vegetated roof [W/m² horizontal vegetated roof area]
  • G2RoofImp: Conductive heat flux of second layer of impervious roof [W/m² horizontal impervious roof area]
  • G2RoofVeg: Conductive heat flux of second layer of vegetated roof [W/m² horizontal vegetated roof area]
  • G1Roof: Total conductive heat flux of first layer of roof [W/m² horizontal roof area]
  • G2Roof: Total conductive heat flux of second layer of roof [W/m² horizontal roof area]
  • G1GroundImp: Conductive heat flux of impervious ground [W/m² horizontal impervious ground area]
  • G1GroundBare: Conductive heat flux of bare ground [W/m² horizontal bare ground area]
  • G1GroundVeg: Conductive heat flux of vegetated ground [W/m² horizontal vegetated ground area]
  • G1Ground: Total conductive heat flux of ground [W/m² horizontal ground area]
  • GTree: Conductive heat flux tree [W/m² horizontally projected tree area]
  • G1WallSun: Conductive heat flux of first layer of sunlit wall [W/m² vertical wall area]
  • G1WallShade: Conductive heat flux of first layer of shaded wall [W/m² vertical wall area]
  • G2WallSun: Conductive heat flux of second layer of sunlit wall [W/m² vertical wall area]
  • G2WallShade: Conductive heat flux of second layer of shaded wall [W/m² vertical wall area]
  • G1Canyon: Total conductive heat flux G1 (walls and ground) area-averaged per m² canyon ground [W/m² horizontal canyon area]
  • G2Canyon: Total conductive heat flux G2 (walls and ground=0) area-averaged per m² canyon ground [W/m² horizontal canyon area]
  • G1Urban: Total conductive heat flux G1 area-averaged per m² urban [W/m² horizontal urban area]
  • G2Urban: Total conductive heat flux G2 (G2 of ground is 0) area-averaged per m² urban [W/m² horizontal urban area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.HbuildIntType
HbuildInt{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building interior sensible heat fluxes.

Fields

  • HBinRoof: Sensible heat flux building interior roof area [W/m² roof area]
  • HbinWallSun: Sensible heat flux building interior sunlit wall area [W/m² wall area]
  • HbinWallshd: Sensible heat flux building interior shaded wall area [W/m² wall area]
  • HBinGround: Sensible heat flux building interior ground area [W/m² ground area]
  • HbinIntMass: Sensible heat flux building interior mass area [W/m² wall area]
  • HbuildInSurf: Sensible heat flux building interior total (walls+roof+ceiling+mass) [W/m² ground area]
  • Hvent: Sensible heat flux building due to ventilation [W/m² ground area]
  • Hequip: Sensible heat flux building due to equipment [W/m² ground area]
  • Hpeople: Sensible heat flux building due to people [W/m² ground area]
  • H_AC_Heat: Sensible heat flux building due to HVAC [W/m² ground area]
  • dSH_air: Sensible heat flux building due to change in heat storage in air [W/m² ground area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.HeatFluxVariablesType
HeatFluxVariables{FT<:AbstractFloat} <: AbstractModelVariablesSet{FT}

Container for all heat flux variable components.

Fields

  • Hflux: Sensible heat fluxes for different urban surfaces
  • LEflux: Latent heat fluxes for different urban surfaces
  • Gflux: Conductive heat fluxes for different urban surfaces
  • dStorage: Heat storage in different urban surfaces
  • Results2mEnergyFlux: Energy fluxes at 2m canyon height
source
UrbanTethysChloris.ModelComponents.ModelVariables.HfluxType
Hflux{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Sensible heat fluxes for different urban surfaces.

Fields

  • HfluxRoofImp: Sensible heat flux of impervious roof area to atmosphere [W/m² horizontal impervious roof area]
  • HfluxRoofVeg: Sensible heat flux of vegetated roof area to atmosphere [W/m² horizontal vegetated roof area]
  • HfluxRoof: Total sensible heat flux of roof area to atmosphere [W/m² horizontal roof area]
  • HfluxGroundImp: Sensible heat flux of impervious ground area to canyon [W/m² horizontal impervious ground area]
  • HfluxGroundBare: Sensible heat flux of bare ground area to canyon [W/m² horizontal bare ground area]
  • HfluxGroundVeg: Sensible heat flux of vegetated ground area to canyon [W/m² horizontal vegetated ground area]
  • HfluxGround: Sensible heat flux of ground area to canyon [W/m² horizontal ground area]
  • HfluxTree: Sensible heat flux of tree canopy to canyon [W/m² horizontally projected tree area]
  • HfluxWallSun: Sensible heat flux of sunlit wall to canyon [W/m² vertical wall area]
  • HfluxWallShade: Sensible heat flux of shaded wall to canyon [W/m² vertical wall area]
  • HfluxCanyon: Sensible heat flux of canyon to atmosphere [W/m² horizontal canyon area]
  • HfluxUrban: Total sensible heat flux of urban area to atmosphere [W/m² horizontal urban area]
  • dS_H_air: Change in sensible heat storage in canyon air volume due to temperature change [W/m² horizontal area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.HumidityType
Humidity{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Canyon and atmospheric humidity variables.

Fields

  • CanyonRelative: Relative humidity at canyon calculation height [-]
  • CanyonSpecific: Specific humidity at canyon calculation height [kg/kg]
  • CanyonVapourPre: Vapour pressure at canyon calculation height [Pa]
  • CanyonRelativeSat: Saturation relative humidity at canyon calculation height [-], is always 1
  • CanyonSpecificSat: Specific humidity at saturation at canyon calculation height [kg/kg]
  • CanyonVapourPreSat: Saturation vapor pressure at canyon calculation height [Pa]
  • AtmRelative: Relative humidity at atmospheric forcing height [-]
  • AtmSpecific: Specific humidity at atmospheric forcing height [kg/kg]
  • AtmVapourPre: Vapor pressure at atmospheric forcing height [Pa]
  • AtmRelativeSat: Saturation relative humidity at atmospheric forcing height [-], is always 1
  • AtmSpecificSat: Specific humidity at saturation at atmospheric forcing height [kg/kg]
  • AtmVapourPreSat: Saturation vapour pressure at atmospheric forcing height [Pa]
source
UrbanTethysChloris.ModelComponents.ModelVariables.HumidityBuildingType
HumidityBuilding{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building interior humidity variables.

Fields

  • esatbin: Saturation vapor pressure at building interior temperature [Pa]
  • ebin: Vapor pressure in building interior [Pa]
  • RHbin: Relative humidity in building interior [-]
  • qbin: Specific humidity in building interior [kg/kg]
source
UrbanTethysChloris.ModelComponents.ModelVariables.InfiltrationType
Infiltration{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Infiltration variables for different urban surfaces.

Fields

  • fRoofVeg: Infiltration in first soil layer of vegetated roof [mm/h per horizontal roof area]
  • fGroundBare: Infiltration in first soil layer of bare ground [mm/h per horizontal bare ground area]
  • fGroundVeg: Infiltration in first soil layer of vegetated ground [mm/h per horizontal vegetated ground area]
  • fGroundImp: Infiltration in impervious ground (usually zero) [mm/h per horizontal impervious ground area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.InterceptionType
Interception{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Interception variables for different urban surfaces.

Fields

  • IntRoofImp: Interception on impervious roof area [mm per horizontal impervious roof area]
  • IntRoofVegPlant: Interception on plant surfaces [mm per horizontal vegetated roof area]
  • IntRoofVegGround: Interception on ground [mm per horizontal roof area]
  • IntRooftot: Total interception on roof [mm per horizontal roof area]
  • IntGroundImp: Interception on impervious ground area [mm per horizontal impervious ground area]
  • IntGroundBare: Interception on bare ground area [mm per horizontal bare ground area]
  • IntGroundVegPlant: Interception on plant surfaces [mm per horizontal vegetated ground area]
  • IntGroundVegGround: Interception on ground [mm per horizontal vegetated ground area]
  • IntTree: Interception on tree [mm per horizontally projected tree area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.LEbuildIntType
LEbuildInt{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building interior latent heat fluxes.

Fields

  • LEvent: Latent heat flux building due to ventilation [W/m² ground area]
  • LEequip: Latent heat flux building due to equipment [W/m² ground area]
  • LEpeople: Latent heat flux building due to people [W/m² ground area]
  • LE_AC_Heat: Latent heat flux building due to HVAC [W/m² ground area]
  • dSLE_air: Latent heat flux building due to change in moisture in air [W/m² ground area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.LEfluxType
LEflux{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Latent heat fluxes for different urban surfaces.

Fields

  • LEfluxRoofImp: Latent heat flux of intercepted water from impervious roof area to atmosphere [W/m² horizontal impervious roof area]
  • LEfluxRoofVegInt: Latent heat flux of intercepted water on roof vegetation to atmosphere [W/m² horizontal vegetated roof area]
  • LEfluxRoofVegPond: Latent heat flux of intercepted water on ground under roof vegetation to atmosphere [W/m² horizontal vegetated roof area]
  • LEfluxRoofVegSoil: Latent heat flux of water from roof soil under vegetation to atmosphere [W/m² horizontal vegetated roof area]
  • LTEfluxRoofVeg: Latent heat flux of transpiration from roof plants to atmosphere [W/m² horizontal vegetated roof area]
  • LEfluxRoofVeg: Total latent heat flux of vegetated roof to atmosphere [W/m² horizontal vegetated roof area]
  • LEfluxRoof: Total latent heat flux of roof to atmosphere [W/m² horizontal roof area]
  • LEfluxGroundImp: Latent heat flux of intercepted water on impervious ground area to canyon [W/m² horizontal impervious ground area]
  • LEfluxGroundBarePond: Latent heat flux of water on bare ground to canyon [W/m² horizontal bare ground area]
  • LEfluxGroundBareSoil: Latent heat flux of water from bare ground to canyon [W/m² horizontal bare ground area]
  • LEfluxGroundBare: Total latent heat flux of bare ground area to canyon [W/m² horizontal bare ground area]
  • LEfluxGroundVegInt: Latent heat flux of intercepted water on ground vegetation to canyon [W/m² horizontal vegetated ground area]
  • LEfluxGroundVegPond: Latent heat flux of intercepted water on ground under vegetation to canyon [W/m² horizontal vegetated ground area]
  • LEfluxGroundVegSoil: Latent heat flux of water from ground soil under vegetation to canyon [W/m² horizontal vegetated ground area]
  • LTEfluxGroundVeg: Latent heat flux of transpiration from ground plants to canyon [W/m² horizontal vegetated ground area]
  • LEfluxGroundVeg: Total latent heat flux of vegetated ground to canyon [W/m² horizontal vegetated ground area]
  • LEfluxGround: Total latent heat flux of ground to canyon [W/m² horizontal ground area]
  • LEfluxTreeInt: Latent heat flux of intercepted water on tree canopy to canyon [W/m² horizontally projected tree area]
  • LTEfluxTree: Latent heat flux of transpiration from tree canopy to canyon [W/m² horizontally projected tree area]
  • LEfluxTree: Total latent heat flux of tree canopy to canyon [W/m² horizontally projected tree area]
  • LEfluxWallSun: Latent heat flux of sunlit wall to canyon [W/m² vertical wall area]
  • LEfluxWallShade: Latent heat flux of shaded wall to canyon [W/m² vertical wall area]
  • LEfluxCanyon: Latent heat flux of canyon to atmosphere [W/m² horizontal canyon area]
  • LEfluxUrban: Total latent heat flux of urban area to atmosphere [W/m² horizontal urban area]
  • dS_LE_air: Change in latent heat storage in canyon air volume due to moisture change [W/m² horizontal area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.LWRabsBType
LWRabsB{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Absorbed longwave radiation in building interior.

Fields

  • LWRabsCeiling: Absorbed longwave radiation by building interior ceiling [W/m² roof area]
  • LWRabsWallsun: Absorbed longwave radiation by building interior sunlit wall [W/m² wall area]
  • LWRabsWallshd: Absorbed longwave radiation by building interior shaded wall [W/m² wall area]
  • LWRabsGround: Absorbed longwave radiation by building interior ground [W/m² ground area]
  • LWRabsInternalMass: Absorbed longwave radiation by building internal mass [W/m² wall area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.LeakageType
Leakage{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Leakage variables for different urban surfaces.

Fields

  • LkRoofImp: Leakage from impervious roof [mm/h per horizontal impervious roof area]
  • LkRoofVeg: Leakage from last soil layer of vegetated roof [mm/h per horizontal vegetated roof area]
  • LkRoof: Total leakage of roof [mm/h per horizontal roof area]
  • LkGroundImp: Leakage from impervious ground [mm/h per horizontal impervious ground area]
  • LkGroundBare: Leakage from last soil layer of bare ground [mm/h per horizontal bare ground area]
  • LkGroundVeg: Leakage from last soil layer of vegetated ground [mm/h per horizontal vegetated ground area]
  • LkGround: Total leakage of ground [mm/h per horizontal ground area]
  • LkUrban: Total leakage of ground and roof soil [mm/h per horizontal urban area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.MRTType
MRT{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Mean Radiant Temperature Fields.

Fields

  • Tmrt: Mean radiant temperature [°C]
  • BoleanInSun: Point of Tmrt calculation is in sun or in shade
  • SWRdir_Person: Direct shortwave radiation the person receives [W/m²]
  • SWRdir_in_top: Direct shortwave radiation the person receives from the top [W/m²]
  • SWRdir_in_bottom: Direct shortwave radiation the person receives from the bottom [W/m²]
  • SWRdir_in_east: Direct shortwave radiation the person receives from the east [W/m²]
  • SWRdir_in_south: Direct shortwave radiation the person receives from the south [W/m²]
  • SWRdir_in_west: Direct shortwave radiation the person receives from the west [W/m²]
  • SWRdir_in_north: Direct shortwave radiation the person receives from the north [W/m²]
  • SWRdiff_Person: Diffuse shortwave radiation the person receives [W/m²]
  • LWR_Person: Longwave radiation the person receives [W/m²]
source
UrbanTethysChloris.ModelComponents.ModelVariables.ModelVariableSetType
ModelVariableSet{FT<:AbstractFloat, N, Np} <: Abstract2PModelVariablesSet{FT, N, Np1}

Forcing inputs for the Urban Tethys-Chloris model.

Fields

  • buildingenergymodel: Building energy model variables
  • energybalance: Energy balance variables
  • environmentalconditions: Environmental conditions variables
  • heatflux: Heat flux variables
  • humidity: Humidity variables
  • radiationflux: Radiation flux variables
  • temperature: Temperature variables
  • waterflux: Water flux variables
source
UrbanTethysChloris.ModelComponents.ModelVariables.ModelVariableSetMethod
ModelVariableSet(
    ::Type{FT},
    soil_parameters::SoilParameters{FT},
) where {FT<:AbstractFloat}

Initialize a ModelVariableSet with the given parameters.

Arguments

  • FT::Type: The floating-point type (e.g., Float64).
  • soil_parameters::SoilParameters{FT}: Soil parameters for initialization.
source
UrbanTethysChloris.ModelComponents.ModelVariables.ParACHeat_tsType
ParACHeat_ts{FT<:AbstractFloat} <: AbstractParACHeat_ts{FT}

AC parameters time series variables.

Fields

  • AC_on: Indicating the timesteps in which AC is switched on
  • AC_onCool: Indicating the timesteps in which AC is switched on due to cooling
  • AC_onDehum: Indicating the timesteps in which AC is switched on due to dehumidification
  • Heat_on: Indicating the timesteps in which heating is switched on
source
UrbanTethysChloris.ModelComponents.ModelVariables.QinlatType
Qinlat{FT<:AbstractFloat, MG} <: AbstractLayeredSoilVariables{FT}

Lateral soil water flux variables.

Fields

  • Qin_bare2imp: Lateral water flux from bare soil to impervious areas [mm/h]
  • Qin_veg2imp: Lateral water flux from vegetated soil to impervious areas [mm/h]
  • Qin_veg2bare: Lateral water flux from vegetated soil to bare soil [mm/h]
  • Qin_imp2bare: Lateral water flux from impervious areas to bare soil [mm/h]
  • Qin_bare2veg: Lateral water flux from bare soil to vegetated soil [mm/h]
  • Qin_imp2veg: Lateral water flux from impervious areas to vegetated soil [mm/h]
  • Qin_imp: Total lateral water flux to impervious areas [mm/h]
  • Qin_bare: Total lateral water flux to bare soil [mm/h]
  • Qin_veg: Total lateral water flux to vegetated soil [mm/h]
source
UrbanTethysChloris.ModelComponents.ModelVariables.RadiationFluxVariablesType
RadiationFluxVariables{FT<:AbstractFloat} <: AbstractModelVariableSet{FT}

Container for all radiation variable components.

Fields

  • SWRabs: Absorbed shortwave radiation for different urban surfaces
  • SWRin: Incoming shortwave radiation for different urban surfaces
  • SWRout: Outgoing shortwave radiation for different urban surfaces
  • SWREB: Shortwave radiation energy balance for different urban surfaces
  • LWRabs: Absorbed longwave radiation for different urban surfaces
  • LWRin: Incoming longwave radiation for different urban surfaces
  • LWRout: Outgoing longwave radiation for different urban surfaces
  • LWREB: Longwave radiation energy balance for different urban surfaces
  • AlbedoOutput: Albedo values for urban areas
source
UrbanTethysChloris.ModelComponents.ModelVariables.ResistanceType
Resistance{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Fields

  • raRooftoAtm: Aerodynamic resistance ra from roof to atmosphere [s/m]
  • raCanyontoAtmOrig: Original aerodynamic resistance (without enhancement term) from canyon to atmosphere [s/m]
  • rap_LRoof: Undercanopy resistance rap_L roof [s/m]
  • rb_LRoof: Leaf boundary resistance rb_L roof [s/m]
  • r_soilRoof: Soil resistance rb_soil roof [s/m]
  • rs_sunRoof: Stomata resistance sunlit vegetation rssunroof [s/m]
  • rs_shdRoof: Stomata resistance shaded vegetation rsshdroof [s/m]
  • raCanyontoAtm: Aerodynamic resistance ra from canyon to atmosphere [s/m]
  • rap_can: Aerodynamic urban undercanopy resistance from zom_und to the canyon displacement height plus canyon roughness length [s/m]
  • rap_Htree_In: Vertical aerodynamic resistance applied from tree height to canyon displacement height plus momentum roughness length height [s/m]
  • rb_HGround: Leaf boundary resistance rb_H ground [s/m]
  • rb_LGround: Leaf boundary resistance rb_L ground [s/m]
  • r_soilGroundbare: Soil resistance from bare soil ground [s/m]
  • r_soilGroundveg: Soil resistance from vegetated ground [s/m]
  • alp_soilGroundbare: Factor accounting for soil moisture on r_soil of bare ground [-]
  • alp_soilGroundveg: Factor accounting for soil moisture on r_soil of vegetated ground [-]
  • rs_sunGround: Stomata resistance sunlit vegetation rssunground [s/m]
  • rs_shdGround: Stomata resistance shaded vegetation rsshdground [s/m]
  • rs_sunTree: Stomata resistance sunlit vegetation rssuntree [s/m]
  • rs_shdTree: Stomata resistance shaded vegetation rsshdground [s/m]
  • RES_w1: Horizontal aerodynamic resistance from canyon wall to air for sunlit wall [s/m]
  • RES_w2: Horizontal aerodynamic resistance from canyon wall to air for shaded wall [s/m]
  • rap_W1_In: Vertical aerodynamic resistance applied from 2m height to canyon displacement height plus momentum roughness length height for sunlit wall [s/m]
  • rap_W2_In: Vertical aerodynamic resistance applied from 2m height to canyon displacement height plus momentum roughness length height for shaded wall [s/m]
  • rap_Zp1: Vertical aerodynamic resistance from the ground to 2m height [s/m]
source
UrbanTethysChloris.ModelComponents.ModelVariables.Results2mType
Results2m{FT<:AbstractFloat} <: AbstractResults2m{FT}

Temperature and humidity results at 2-meter canyon height.

Fields

  • T2m: 2m air temperature [K]
  • q2m: 2m specific humidity [kg/kg]
  • e_T2m: 2m vapor pressure [Pa]
  • RH_T2m: 2m relative humidity [-]
  • qcan: Canyon specific humidity [kg/kg]
  • e_Tcan: Canyon vapor pressure [Pa]
  • RH_Tcan: Canyon relative humidity [-]
source
UrbanTethysChloris.ModelComponents.ModelVariables.Results2mEnergyFluxType
Results2mEnergyFlux{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Energy fluxes at 2m canyon height.

Fields

  • DHi: Sensible heat flux from impervious surfaces at 2m height [W/m²]
  • Himp_2m: Sensible heat flux from impervious ground at 2m height [W/m²]
  • Hbare_2m: Sensible heat flux from bare ground at 2m height [W/m²]
  • Hveg_2m: Sensible heat flux from vegetated ground at 2m height [W/m²]
  • Hwsun_2m: Sensible heat flux from sunlit wall at 2m height [W/m²]
  • Hwshade_2m: Sensible heat flux from shaded wall at 2m height [W/m²]
  • Hcan_2m: Total sensible heat flux at 2m height [W/m²]
  • DEi: Latent heat flux at 2m height [W/m²]
  • Eimp_2m: Latent heat flux from impervious ground at 2m height [W/m²]
  • Ebare_soil_2m: Latent heat flux from bare soil at 2m height [W/m²]
  • Eveg_int_2m: Latent heat flux from vegetation interception at 2m height [W/m²]
  • Eveg_soil_2m: Latent heat flux from vegetated soil at 2m height [W/m²]
  • TEveg_2m: Transpiration flux at 2m height [W/m²]
  • Ecan_2m: Total latent heat flux at 2m height [W/m²]
source
UrbanTethysChloris.ModelComponents.ModelVariables.RunoffType
Runoff{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Runoff variables for different urban surfaces.

Fields

  • QRoofImp: Runoff of impervious area of roof [mm/time step per horizontal impervious roof area]
  • QRoofVegDrip: Runoff, Dripping, etc from vegetation to roof ground [mm/time step per horizontal vegetated roof area]
  • QRoofVegPond: Runoff from roof soil under vegetation due to limitation in infiltration capacity [mm/time step per horizontal vegetated roof area]
  • QRoofVegSoil: Runoff due to roof soil saturation [mm/time step per horizontal vegetated roof area]
  • QGroundImp: Runoff of impervious area of ground [mm/time step per horizontal impervious ground area]
  • QGroundBarePond: Runoff of bare area of ground due to limitation in infiltration capacity [mm/time step per horizontal bare ground area]
  • QGroundBareSoil: Runoff of bare area of ground due to soil saturation [mm/time step per horizontal bare ground area]
  • QTree: Runoff, Dripping, etc from tree to ground [mm/time step per horizontally projected tree area]
  • QGroundVegDrip: Runoff, Dripping, etc from vegetation to ground [mm/time step per horizontal vegetated ground area]
  • QGroundVegPond: Runoff from soil under vegetation due to limitation in infiltration capacity [mm/time step per horizontal vegetated ground area]
  • QGroundVegSoil: Runoff due to soil saturation under vegetation on ground [mm/time step per horizontal vegetated ground area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.RunonType
Runon{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Runon variables for urban area.

Fields

  • RunonRoofTot: Total roof runon to the next time step [mm/time step per horizontal roof area]
  • RunoffRoofTot: Total roof runoff that is removed from the system [mm/time step per horizontal roof area]
  • RunonGroundTot: Total runon in canyon to the next time step [mm/time step per horizontal ground area]
  • RunoffGroundTot: Total runoff in canyon that is removed from the system [mm/time step per horizontal ground area]
  • RunonUrban: Total urban runon to the next time step [mm/time step per horizontal urban area]
  • RunoffUrban: Total urban runoff that is removed from the system [mm/time step per horizontal urban area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.SWRabsBType
SWRabsB{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Absorbed shortwave radiation in building interior.

Fields

  • SWRabsCeiling: Absorbed shortwave radiation by building interior ceiling [W/m² roof area]
  • SWRabsWallsun: Absorbed shortwave radiation by building interior sunlit wall [W/m² wall area]
  • SWRabsWallshd: Absorbed shortwave radiation by building interior shaded wall [W/m² wall area]
  • SWRabsGround: Absorbed shortwave radiation by building interior ground [W/m² ground area]
  • SWRabsInternalMass: Absorbed shortwave radiation by building internal mass [W/m² wall area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.SoilPotWType
SoilPotW{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Soil water potential for plants.

Fields

  • SoilPotWRoofVeg_H: Soil water potential for plants, high roof vegetation [MPa]
  • SoilPotWRoofVeg_L: Soil water potential for plants, low roof vegetation [MPa]
  • SoilPotWGroundImp_H: Soil water potential for plants in impervious ground, high vegetation [MPa]
  • SoilPotWGroundImp_L: Soil water potential for plants in impervious ground, low vegetation [MPa]
  • SoilPotWGroundBare_H: Soil water potential for plants in bare ground, high vegetation [MPa]
  • SoilPotWGroundBare_L: Soil water potential for plants in bare ground, low vegetation [MPa]
  • SoilPotWGroundVeg_H: Soil water potential for plants in vegetated ground, high vegetation [MPa]
  • SoilPotWGroundVeg_L: Soil water potential for plants in vegetated ground, low vegetation [MPa]
  • SoilPotWGroundTot_H: Soil water potential for plants in total ground, high vegetation [MPa]
  • SoilPotWGroundTot_L: Soil water potential for plants in total ground, low vegetation [MPa]
source
UrbanTethysChloris.ModelComponents.ModelVariables.SolverVariablesType
SolverVariables{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Optical properties for indoor building surfaces.

Fields

  • Success Boolean indicating convergence of solution of energy balance
  • ValuesEB: Energy balance closure for the different equations [W/m²]
  • Tsolver: Temperatures and humidity of different canyon faces and air [K], [kg/kg]
  • YfunctionOutput: Solver function outputs
source
UrbanTethysChloris.ModelComponents.ModelVariables.TempDampType
TempDamp{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Temperature Dampening Fields.

Fields

  • TDampGroundImp: Dampening temperature ground impervious area [K]
  • TDampGroundBare: Dampening temperature ground bare area [K]
  • TDampGroundVeg: Dampening temperature ground vegetated area [K]
  • TDampTree: Dampening temperature tree canopy [K]
  • TDampGroundBuild: Dampening temperature of ground in building interior [K]
source
UrbanTethysChloris.ModelComponents.ModelVariables.TempVecType
TempVec{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Temperature Vector Fields.

Fields

  • TRoofImp: Temperature roof impervious area [K]
  • TRoofVeg: Temperature roof vegetated area [K]
  • TRoofIntImp: Interior temperature roof impervious area [K]
  • TRoofIntVeg: Interior temperature roof vegetated area [K]
  • TGroundImp: Temperature ground impervious area [K]
  • TGroundBare: Temperature ground bare area [K]
  • TGroundVeg: Temperature ground vegetated area [K]
  • TTree: Temperature tree canopy [K]
  • TWallSun: Temperature sunlit wall area [K]
  • TWallShade: Temperature shaded wall area [K]
  • TWallIntSun: Interior temperature sunlit wall [K]
  • TWallIntShade: Interior temperature shaded wall [K]
  • TCanyon: Temperature canyon [K]
  • Tatm: Temperature atmosphere (measured) [K]
source
UrbanTethysChloris.ModelComponents.ModelVariables.TempVecBType
TempVecB{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Building interior temperatures.

Fields

  • Tceiling: Building interior ceiling temperature [K]
  • Tinwallsun: Building interior sunlit wall temperature [K]
  • Tinwallshd: Building interior shaded wall temperature [K]
  • Twindows: Building window temperature [K]
  • Tinground: Building interior ground/floor temperature [K]
  • Tintmass: Building interior internal heat storage element temperature [K]
  • Tbin: Building interior air temperature [K]
  • qbin: Building interior specific humidity temperature [kg/kg]
source
UrbanTethysChloris.ModelComponents.ModelVariables.VwaterType
Vwater{FT<:AbstractFloat, MR, MG} <: AbstractLayeredSoilVariables{FT}

Water volume in soil for different urban surfaces.

Fields

  • VRoofSoilVeg: Water volume in the different soil layers of roof [mm per horizontal roof area]
  • VGroundSoilImp: Water volume in the different soil layers of ground under impervious [mm per horizontal impervious ground area]
  • VGroundSoilBare: Water volume in the different soil layers of ground under bare [mm per horizontal bare ground area]
  • VGroundSoilVeg: Water volume in the different soil layers of ground under vegetated [mm per horizontal vegetated ground area]
  • VGroundSoilTot: Water volume in the different soil layers of ground total [mm per horizontal ground area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.WBCanyonIndvType
WBCanyonIndv{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Individual water balance checks for canyon components.

Fields

  • WB_In_tree: Water balance check for tree interception
  • WB_In_gveg: Water balance check for ground vegetation interception
  • WB_In_gimp: Water balance check for impervious ground interception
  • WB_In_gbare: Water balance check for bare ground interception
  • WB_Pond_gveg: Water balance check for ponding under ground vegetation
  • WB_Soil_gimp: Water balance check for impervious ground soil
  • WB_Soil_gbare: Water balance check for bare ground soil
  • WB_Soil_gveg: Water balance check for vegetated ground soil
source
UrbanTethysChloris.ModelComponents.ModelVariables.WBCanyonTotType
WBCanyonTot{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Total water balance checks for canyon components and levels.

Fields

  • WBsurf_tree: Water balance check for tree surface
  • WBsurf_imp: Water balance check for impervious surface
  • WBsurf_bare: Water balance check for bare surface
  • WBsurf_veg: Water balance check for vegetated surface
  • WBsoil_imp: Water balance check for impervious soil
  • WBsoil_bare: Water balance check for bare soil
  • WBsoil_veg: Water balance check for vegetated soil
  • WBimp_tot: Water balance check for total impervious area
  • WBbare_tot: Water balance check for total bare area
  • WBveg_tot: Water balance check for total vegetated area
  • WBcanyon_flux: Water balance check for canyon flux
  • WBtree_level: Water balance check at tree level
  • WBground_level: Water balance check at ground level
  • WBsoil_level: Water balance check at soil level
  • WBcanyon_level: Water balance check at canyon level
source
UrbanTethysChloris.ModelComponents.ModelVariables.WBRoofType
WBRoof{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Water balance checks for roof surfaces and soil.

Fields

  • WBRoofImp: Water balance check for impervious roof
  • WBRoofVegInVeg: Water balance check for vegetation interception on roof
  • WBRoofVegInGround: Water balance check for ground interception under roof vegetation
  • WBRoofVegSoil: Water balance check for soil under roof vegetation
  • WBRoofVeg: Water balance check for overall vegetated roof
  • WBRoofTot: Water balance check for total roof
source
UrbanTethysChloris.ModelComponents.ModelVariables.WaterFluxVariablesType
WaterFluxVariables{FT<:AbstractFloat, MR, MG} <: AbstractModelVariableSet{FT}

Container for all water flux variable components.

Fields

  • Eflux: Evapotranspiration fluxes
  • Runoff: Runoff variables for different urban surfaces
  • Runon: Runon variables for urban area
  • Leakage: Leakage variables for different urban surfaces
  • Interception: Interception variables for different urban surfaces
  • dInt_dt: Change in interception variables
  • Infiltration: Infiltration variables for different urban surfaces
  • Vwater: Water volume in soil for different urban surfaces
  • dVwater_dt: Change in water volume in soil
  • Owater: Soil moisture in different soil layers
  • OSwater: Additional soil moisture variables
  • Qinlat: Lateral soil water flux variables
  • ExWater: Extractable water for plants from soil
  • SoilPotW: Soil water potential for plants
  • CiCO2Leaf: Intercellular CO2 concentration in leaf for different urban surfaces
source
UrbanTethysChloris.ModelComponents.ModelVariables.WindType
Wind{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Fields

  • u_Hcan: Wind speed at canyon calculation height (hdisp + canyon roughness height) [m/s]
  • u_Zref_und: Wind speed at undercanopy reference height [m/s]
  • u_ZPerson: Wind speed at person height [m/s]
source
UrbanTethysChloris.ModelComponents.ModelVariables.dStorageType
dStorage{FT<:AbstractFloat} <: AbstractModelVariables{FT}

Heat storage in different urban surfaces.

Fields

  • dsRoofImp: Storage of energy in impervious roof [W/m² horizontal impervious roof area]
  • dsRoofVeg: Storage of energy in vegetated roof [W/m² horizontal vegetated roof area]
  • dsRoof: Storage of energy in total roof [W/m² horizontal roof area]
  • dsGroundImp: Storage of energy in impervious ground [W/m² horizontal impervious ground area]
  • dsGroundBare: Storage of energy in bare ground [W/m² horizontal bare ground area]
  • dsGroundVeg: Storage of energy in vegetated ground [W/m² horizontal vegetated ground area]
  • dsTree: Storage of energy in tree canopy [W/m² horizontally projected tree area]
  • dsWallSun: Storage of energy in sunlit wall [W/m² vertical wall area]
  • dsWallShade: Storage of energy in shaded wall [W/m² vertical wall area]
  • dsCanyonAir: Storage of energy in canyon air [W/m² horizontal canyon area]
source
UrbanTethysChloris.ModelComponents.ModelVariables.fix_soil_moisture!Method
fix_soil_moisture!(
    dest::Owater{FT,MR,MG},
    roof::VegetatedSoilParameters{FT},
    ground::VegetatedSoilParameters{FT},
    O33::NamedTuple,
) where {FT<:AbstractFloat,MR,MG}

Fix soil moisture values in the soil layers according to the settings in the soil parameters.

Arguments

  • dest::Owater{FT,MR,MG}: Soil moisture variables to be modified
  • roof::VegetatedSoilParameters{FT}: Roof soil parameters
  • ground::VegetatedSoilParameters{FT}: Ground soil parameters
  • O33::NamedTuple: Named tuple containing the fixed soil moisture values for roof and ground
source

Outputs

UrbanTethysChloris.Outputs.allocate_resultsMethod
allocate_results(::Type{T}, ::Type{O}, model::AbstractModel{FT}, n_timesteps::Int) where {T,O,FT}

Allocate arrays for storing simulation results with the same nested structure as the accessor dictionary. Each array has a temporal dimension as the first dimension, followed by dimensions matching the field type.

Arguments

  • T::Type{T}: The model component type
  • O::Type{O}: The outputs to save type
  • model::AbstractModel{FT}: The model instance (used to extract type parameters)
  • n_timesteps::Int: Number of timesteps in the simulation

Returns

  • Dict{Symbol,Dict{Symbol,Array}}: Nested dictionary of pre-allocated arrays
source
UrbanTethysChloris.Outputs.assign_results!Method
assign_results!(
    results::Dict{Symbol,Dict{Symbol,Array}},
    accessors::Dict{Symbol,Dict{Symbol,Function}},
    model::AbstractModel{FT},
    timestep::Int,
) where {FT}

Assign the current model variable values to the results arrays at the specified timestep.

Arguments

  • results::Dict{Symbol,Dict{Symbol,Array}}: Nested dictionary of results arrays
  • accessors::Dict{Symbol,Dict{Symbol,Function}}: Nested dictionary of accessor functions
  • model::AbstractModel{FT}: The model instance
  • timestep::Int: The current timestep index
source