NBSINFRA Prague
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
THINGS TO NOTICE
(suggested things for the user to notice while running the model)
THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
globals [
;; seasons ;;
season ; conditions of weather, temperature, humidity in different seasons of the year
;; soil water retention variables ;;
soil_humidity
soil_suction ; related to soil humidity
;; vegetation variables ;;
ntree_num ; number of patches with trees of naturally green areas
nshrub_num ; number of patches with shrubs of naturally green areas
nveg_ratio ; ratio of trees over shrubs of naturally green areas
fshrub_num ; number of patches with vegetation of fluvial areas
utree_num ; number of patches with trees of urban green areas
ushrub_num ; number of patches with shrubs of urban green areas
uveg_ratio ; ratio of trees over shrubs of urban green areas
flora ; IVI, composite index to monitor the diversity and density of flora species
veg_cover ; ratio between vegetation elements (vgts) and total area (patches)
ideal_veg ; intial IVI at tick 0, estimated at 79.33 for woody plants in urban green spaces by Muthulingam & Thangavel, 2012
current_regeneration_rate ; the regeneration rate of every tick, as defined by soil humidity and fertility
sfi ; soil fertility index calculated as: SFI= organic C% + pH adjusted from Panwar et al. 2011
ideal_sfi ; soil fertility index for min carbon content 5% and max soil acidity 6.0
vegetation ; composite index to monitor the condition of the flora and the soil fertility
;; biodiversity variables ;;
flora_diversity ; Shannon's divesity index (H') -Σp*lnp (Morris et al. 2014) at the beginning of the simulation
fl_d ; Shannon's divesity index (H') at every tick
d_1
d_2
d_3
d_4
d_5
fauna_diversity ; correlated to flora_diversity and soil quality according to Qian 2007
fn_d ; fauna diversity at every tick
ideal_biodiversity ; ideal biodiversity value calculated at the begginging of the run
biodiversity ; total biodiversity performance index assessed in every tick
;; community variables ;;
initial_community_index ; density of people attracted by culture and recreation at the beginning of the run
community_index ; density of people attracted by culture and recreation in every tick
community ; assessed community index (percentage difference form initial state) in every tick
;; air quality variables ;;
air ; composite index to monitor the quality of air (cooling + aqii)
air_sample ; total patches of atmosphere in contact with NBS area - sample for the assessment
cool_patches ; total patches of atmosphere in contact with vegetation agents (vgts)
aqii ; composite index Air Quality Impact Index (AQII) by Datta et al. 2021,
;adjusted only for the physical characterisits of plants
;assuming that all examined plants have similar Air Pollution Tolerance Index (API)
ideal_aqii ; reference AQII index for the specific NBS
;;; ECOSYSYEM SERVICES ;;;
regulating ; services that regulate the elements and functions of the examined ecosystem
erosion_control_value ;
gas_regulation_value ;
microclimate_regulation_value ;
nutrient_cycling_value ;
pollination_value ;
refugia_value ;
soil_formation_value ;
water_regulation_value ;
waste_treatment_value ;
provisioning ; services that provide additional properties to the examined ecosystem
food_production_value ;
genetic_resources_value ;
raw_materials_value ;
water_savings_value ;
cultural ; services that provide cultural, recreational, aesthetic aspects to the examined ecosystems
cultural_use_value ;
recreation_value
]
;; BUTTONS, SWITCHES, AND SLIDERS ;;
;; NBS Alternatives defined by the City Lab of Prague ;;
; bioswales ; and rain gardens, show size and depths
; green_roofs ; typology of green roof (extensive vs intensive) hybrid green roof and grey water recycling
; green_facades ; dimension and type of green façade
; green_enhancement ; additional trees and wildflower meadows, different selection and location of trees, area and location of wildflower meadows
; permeable_pavement ; area, location and materials of permeable pavements,
;soil_temperature ; absolute temperature of soil as estimated per season
;NBS_attractiveness ; quantitive estimation of attractiveness of local community to NBS infrastructure
breed [nvgts nvgt]
breed [uvgts uvgt]
breed [fvgts fvgt]
breed [ppls ppl]
breed [anms anm]
patches-own
[
is-natural? ;whether a patch represents natural green surface
is-urban? ;whether a patch represents urban green surface
is-fluvial? ;whether a patch represents fluvial surface
is-agric? ;whether a patch represents agricultutal surface
is-paved? ;whether a patch represents paved surface
is-perm? ;whether a patch represents a permeable surface
atmosphere? ;whether a patch represents atmospheric volume
; related to cultural / social aspects
imp-bld? ;whether a patch represents an important building such as the library
; related to soil water retention
surface ; composite index of surface characterisitcs (LID BMP parameter)
; storage depth/berm height/barrel height, vegetation volume, surface roughness, surface slope
soil ; composite index of soil characterisitcs (LID BMP parameter)
; wilting point, humidity
soil_water_retention ; index combining both the surfance and soil indices
surface_roughness; 0.1 for soil and different vegetation roughness
ideal_roughness; 0.1 for RG
vegetation_volume ; average size of vegetation agents in radius 3 of the examined patch
ideal_vegetation_volume ;5/100 for RG
ideal_soil_humidity; 0.32 /32% for normal clay (Minnesota Stormwater Manual, 2022)
s_h; soil humidity of patches
max_soil_humidity; 0.45 for average normal clay
wilting_point; 0.20 minimum amount of water in the soil that the plant requires not to wilt
min_wilting_point; 0.15 for normal clay (Minnesota Stormwater Manual, 2022)
ideal_soil_suction ; max soil suction for 32% relative humidity in 25oC
; related to vegetation
organic_content; percnetage of organic material in soil, necessary for the vegetation
; related to air quality - cooling due to shading and evapotranspiration and reduction of the pollution levels
cooling ; percentage of air patches with reduced temperature * mean temperature reduction
cool_dif ; absolute mean temperature difference during daytime determined by Kim et al. 2024
air_temperature ; temperature of patches of air
]
turtles-own
[
aqii_habit ; subindex of tree habit, based on plant's appearance, growth form and architecture
aqii_canopy ; density of canopy structure: sparse-semidense-dense
aqii_leaf ; Leaf Area Index (LAI) for each species
original_size ; the reference size of vegetation agents at the beginning of the run
]
to setup
clear-all
import-pcolors "Dejvice map.png"
setup-model
setup-vegetation
setup-soil-water-retention
setup-community
setup-biodiversity
setup-NBS_alternatives
reset-ticks
end
to go
assess-soil-water-retention
assess-vegetation
assess-biodiversity
assess-community
assess-air
assess-ES
if heatwave?
[heatwave
recover_heatwave]
tick
if ticks >= 10
[stop]
end
;;; SETUP PROCEDURES ;;; SETUP PROCEDURES ;;; SETUP PROCEDURES ;;;
to setup-model
ask patches
[set is-natural? false
set is-urban? false
set is-fluvial? false
set is-paved? false
set is-perm? false
set atmosphere? false ]
;; setup buildings
ask patches with [pcolor > 6 and pcolor < 9]
[set pcolor grey
set is-paved? true
ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor < 3]
[set pcolor grey
set is-paved? true]]
ask (patch-set patch -22 10 1 patch -23 10 1 patch -24 10 1
patch -21 9 1 patch -22 9 1 patch -23 9 1 patch -24 9 1 patch -25 9 1
patch -20 8 1 patch -21 8 1 patch -22 8 1 patch -23 8 1 patch -24 8 1 patch -25 8 1 patch -26 8 1
patch -20 7 1 patch -21 7 1 patch -22 7 1 patch -23 7 1 patch -24 7 1 patch -25 7 1 patch -26 7 1 patch -27 7 1
patch -19 6 1 patch -20 6 1 patch -21 6 1 patch -22 6 1 patch -23 6 1 patch -24 6 1 patch -25 6 1 patch -26 6 1 patch -27 6 1
patch -19 5 1 patch -20 5 1 patch -21 5 1 patch -22 5 1 patch -23 5 1 patch -24 5 1 patch -25 5 1 patch -26 5 1 patch -27 5 1
patch -21 4 1 patch -22 4 1 patch -23 4 1 patch -24 4 1 patch -25 4 1 patch -26 4 1 patch -27 4 1 patch -28 4 1
patch -21 3 1 patch -22 3 1 patch -23 3 1 patch -26 3 1 patch -27 3 1 patch -28 3 1 patch -29 3 1
patch -22 2 1 patch -27 2 1 patch -28 2 1 patch -29 2 1 patch -30 2 1
patch -28 1 1 patch -29 1 1 patch -30 1 1 patch -31 1 1
patch -29 0 1 patch -30 0 1 patch -31 0 1
patch -30 -1 1 patch -31 -1 1 patch -32 -1 1
patch -30 -2 1 patch -31 -2 1 patch -32 -2 1 patch -33 -2 1
patch -31 -3 1 patch -32 -3 1 patch -33 -3 1 patch -34 -3 1
patch -32 -4 1 patch -33 -4 1
patch -15 19 1
patch -14 18 1 patch -15 18 1 patch -16 18 1
patch -13 17 1 patch -14 17 1 patch -15 17 1
patch -12 16 1 patch -13 16 1 patch -14 16 1
patch -11 15 1 patch -12 15 1 patch -13 15 1
patch -10 14 1 patch -11 14 1 patch -12 14 1 patch -13 14 1
patch -11 13 1
patch 14 -3 1
patch 13 -2 1 patch 14 -2 1 patch 15 -2 1
patch 14 -1 1 patch 15 -1 1 patch 16 -1 1
patch 15 0 1 patch 16 0 1 patch 17 0 1
patch 16 1 1 patch 17 1 1 patch 18 1 1
patch 17 2 1 patch 18 2 1
patch 21 -8 1
patch 20 -7 1 patch 21 -7 1 patch 22 -7 1
patch 21 -6 1 patch 22 -6 1 patch 23 -6 1
patch 22 -5 1 patch 23 -5 1 patch 24 -5 1
patch 23 -4 1 patch 24 -4 1
patch 23 -3 1
patch 27 -13 1 patch 28 -13 1
patch 27 -12 1 patch 28 -12 1 patch 29 -12 1
patch 28 -11 1 patch 29 -11 1 patch 30 -11 1
patch 29 -10 1 patch 30 -10 1
patch 30 -9 1 patch 31 -9 1)
[ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 3]
[set pcolor grey
set is-paved? true]
ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 4]
[set pcolor grey
set is-paved? true]
ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 5]
[set pcolor grey
set is-paved? true]]
ask (patch-set patch -8 27 1 patch -7 27 1
patch -9 26 1 patch -8 26 1 patch -7 26 1 patch -6 26 1 patch -5 26 1
patch -10 25 1 patch -9 25 1 patch -8 25 1 patch -7 25 1 patch -6 25 1 patch -5 25 1 patch -4 25 1 patch -3 25 1
patch -11 24 1 patch -10 24 1 patch -9 24 1 patch -8 24 1 patch -7 24 1 patch -6 24 1 patch -5 24 1 patch -4 24 1 patch -3 24 1
patch -12 23 1 patch -11 23 1 patch -10 23 1 patch -9 23 1 patch -8 23 1 patch -7 23 1 patch -6 23 1 patch -5 23 1 patch -4 23 1 patch -3 23 1 patch -2 23 1
patch -12 22 1 patch -11 22 1 patch -10 22 1 patch -9 22 1 patch -8 22 1 patch -7 22 1 patch -6 22 1 patch -5 22 1 patch -4 22 1 patch -3 22 1 patch -2 22 1
patch -12 21 1 patch -11 21 1 patch -10 21 1 patch -9 21 1 patch -8 21 1 patch -5 21 1 patch -4 21 1 patch -3 21 1 patch -2 21 1
patch -11 20 1 patch -10 20 1 patch -9 20 1 patch -4 20 1 patch -3 20 1
patch -10 19 1)
[ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 3]
[set pcolor grey
set is-paved? true]]
;; setup urban green speces
ask patches with [pcolor > 50 and pcolor < 65]
[set pcolor 57
set is-urban? true
set is-paved? false]
ask patches with [pxcor >= -3 and pxcor < 13 and pycor > -1 and pycor < 12 and pzcor = 2 and is-paved? = true]
[ ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 3]
[set pcolor 57
set is-urban? true
set is-paved? false] ]
ask (patch-set patch -8 21 3 patch -7 22 3 patch -6 22 3 patch -5 21 3 patch -4 20 3 patch -3 20 3 patch -2 21 3 patch -2 22 3 patch -2 23 3 patch -3 24 3 patch -3 25 3 patch -4 25 3 patch -5 26 3
patch -6 26 3 patch -7 27 3 patch -8 27 3 patch -8 26 3 patch -9 26 3 patch -10 25 3 patch -10 24 3 patch -11 24 3
patch -12 24 3 patch -12 23 3 patch -12 22 3 patch -12 21 3 patch -11 20 3 patch -10 19 3 patch -9 20 3 patch -9 21 3 )
[ ask patches with [pxcor = [pxcor] of myself and pycor = [pycor] of myself and pzcor = 4]
[set pcolor 57
set is-urban? true
set is-paved? false] ]
ask patches with [is-urban? = false and pzcor = 0]
[set pcolor 9
set is-paved? true]
;; setup atmosphere
ask patches with [pzcor > 0 and is-paved? = false]
[set atmosphere? true
set air_temperature soil_temperature]
ask patch 10 0 3
[set is-urban? false
set pcolor 0
set atmosphere? true
set air_temperature soil_temperature]
end
to setup-vegetation
;;; setup the trees ;;;
ask (patch-set patch 0 -4 0 patch -1 -3 0 patch -2 -2 0 patch -3 -1 0 patch -4 0 0 patch -5 1 0 patch -6 2 0 patch -7 3 0
patch 12 -14 0 patch 13 -15 0 patch 14 -16 0
patch 18 -19 0 patch 19 -20 0 patch 20 -21 0 patch 21 -22 0)
[sprout-nvgts 1 [set color green
set zcor 1
set shape "circle"
set size 1.5
set aqii_leaf 3 ]]
;;; setup shrubs and flowers ;;;
ask (patch-set patch -9 1 0 patch -8 0 0 patch -7 -1 0 patch -6 -2 0 patch -4 -3 0 patch -3 -4 0 patch -2 -5 0 patch -1 -6 0 patch -1 -7 0 patch -1 -8 0
patch 5 -8 0 patch 6 -9 0 patch 6 -8 0 patch 7 -10 0 patch 7 -9 0
patch 7 -15 0 patch 7 -14 0 patch 9 -17 0 patch 10 -17 0 patch 10 -16 0 patch 13 -18 0 patch 13 -19 0 patch 16 -22 0
patch -15 -34 0 patch -15 -37 0 patch -15 -38 0 patch -15 -39 0
patch -11 -29 0 patch -10 -29 0 patch -9 -29 0
patch -10 -22 0 patch -11 -23 0 patch -11 -24 0 patch -10 -25 0 patch -9 -26 0 patch -8 -26 0 patch -7 -26 0
patch -41 -30 0 patch -40 -30 0 patch -39 -30 0
patch -15 27 0 patch -13 29 0 patch -12 30 0 patch -14 38 0 patch -13 37 0 patch -12 35 0 patch -11 35 0
patch 14 -33 0 patch 13 -33 0 patch 11 -32 0 patch 10 -32 0)
[sprout-uvgts 1 [set color 57
set zcor 0.7
set shape "circle"
set size 0.25
forward 0.5
set aqii_leaf 1 ]]
ask (patch-set patch 14 -39 0 patch 12 -36 0 patch 11 -36 0 patch 10 -35 0 patch 9 -35 0 patch 8 -35 0)
[sprout-uvgts 1 [set color green
set zcor 0.7
set shape "circle"
set size 0.45
forward 0.5
set aqii_leaf 1.5]]
end
to setup-soil-water-retention
ask patches with [pzcor = 0]
[set ideal_vegetation_volume 0.05
set ideal_roughness 0.1
set ideal_soil_humidity 0.32
set s_h ideal_soil_humidity
set max_soil_humidity 0.40
set min_wilting_point 0.15
set ideal_soil_suction -0.00001 * ((8.314 * 298)/ 1 * 18.016) * ln(0.32)]
ask patches with [is-urban? = true and pzcor != 0]
[set ideal_vegetation_volume 0.50
set ideal_roughness 0.15
set ideal_soil_humidity 0.32
set s_h ideal_soil_humidity
set max_soil_humidity 0.40
set min_wilting_point 0.15
set ideal_soil_suction -0.00001 * ((8.314 * 298)/ 1 * 18.016) * ln(0.32)]
ask patches with [s_h > 0]
[set soil_humidity mean [s_h] of patches with [s_h > 0] ];set this variable to specific number for quick runs
ifelse soil_humidity != 0
[set soil_suction -0.00001 * ((8.314 * soil_temperature)/ 1 * 18.016) * ln(soil_humidity)]
[set soil_suction -0.00001 * (8.314 * soil_temperature)/ 1 * 18.016 ]
ask patches with [s_h > 0 and any? nvgts-here or any? uvgts-here or any? fvgts-here in-radius 2]
[set vegetation_volume mean [size] of (turtle-set nvgts uvgts fvgts) in-radius 2]
ask patches
[ifelse vegetation_volume > 0.001
[set surface_roughness vegetation_volume ]
[set surface_roughness 0.10] ]
ask patches with [is-natural? = true]
[set organic_content 28]
ask patches with [is-urban? = true]
[set organic_content 8]
ask patches with [is-fluvial? = true]
[set organic_content 10]
ask patches with [is-paved? = true]
[set organic_content 0]
end
to setup-biodiversity
let vgts (turtle-set nvgts fvgts uvgts)
ask vgts
[ifelse any? nvgts with [size <= 1]
[let diversity_1 (count nvgts with [size <= 1] / count vgts)
set d_1 -1 * diversity_1 * ln diversity_1] ; Shannon's divesity index (H') in Morris et al. 2014
[set d_1 0]
ifelse any? nvgts with [size > 1]
[let diversity_2 (count nvgts with [size > 1] / count vgts)
set d_2 -1 * diversity_2 * ln diversity_2]
[set d_2 0]
ifelse any? fvgts
[let diversity_3 (count fvgts / count vgts)
set d_3 -1 * diversity_3 * ln diversity_3 ]
[set d_3 0]
ifelse any? uvgts with [size <= 0.30]
[let diversity_4 (count uvgts with [size <= 0.30] / count vgts)
set d_4 -1 * diversity_4 * ln diversity_4]
[set d_4 0]
ifelse any? uvgts with [size > 0.30]
[let diversity_5 (count uvgts with [size > 0.30] / count vgts)
set d_5 -1 * diversity_5 * ln diversity_5]
[set d_5 0]
set flora_diversity d_1 + d_2 + d_3 + d_4 + d_5 ]
set ideal_biodiversity flora_diversity
end
to setup-community
;; community agents ;;
;all buidlings in the campus share the same level of importance for the university community
ask patches with [count (neighbors with [pzcor = 0 and is-paved? = false]) > 2]
[sprout-ppls NBS_attractiveness [set color orange
set zcor [pzcor] of myself
set shape "square"
set size 0.10
forward 1]]
let vgts (turtle-set nvgts uvgts fvgts)
ask patches with [pzcor = 0 and is-paved? = false and any? vgts = true]
[sprout-ppls NBS_attractiveness * 2 [set color orange
set zcor [pzcor] of myself
set shape "square"
set size 0.10
forward 1]]
set initial_community_index count ppls / count patches with [pzcor = 0]
end
to setup-NBS_alternatives
;; setup bioswales and rain gardens
if bioswales = true
[ask n-of (bs_area / 49) patches with [is-urban? = true and count neighbors6 with [is-paved? = false] > 2 and pzcor = 0]
[set is-fluvial? true
set pcolor cyan
set vegetation_volume 0.80
set surface_roughness 0.80
set ideal_soil_humidity 0.50
sprout-fvgts 3 [set color cyan
set zcor 0.50
set size random-float 0.50
forward 0.5 ]
set max_soil_humidity 0.70]
set satisfaction_level (1 + (bs_area / 49) * satisfaction_level / 300) * satisfaction_level]
;; setup green roofs
if green_roofs = true
[if gr_type = "ext"
[ask n-of (gr_area / 49) patches with [is-urban? = true and pzcor > 0]
[sprout-uvgts 3 [set color green
set shape "circle"
set zcor pzcor + 0.5
set size random-float 0.5
set aqii_leaf 1.5]
set vegetation_volume 0.60
set surface_roughness 0.60
set max_soil_humidity 0.40 ]]
if gr_type = "int"
[ask n-of (gr_area / 49) patches with [is-urban? = true and pzcor > 0]
[sprout-uvgts 4 [set color green
set shape "circle"
set zcor pzcor + 0.5
set size random-float 1.5
set aqii_leaf 2]
set vegetation_volume 0.80
set surface_roughness 0.80
set max_soil_humidity 0.40 ]] ]
;; setup green facades
if green_facades = true
[ask n-of ((gf_area / 49) / 4) patches with [is-paved? = true and pzcor > 0 and any? neighbors6 with [atmosphere? = true]]
[sprout-uvgts 2 [set color green
set ycor pycor + 0.5
set xcor pxcor + 0.5
set size random-float 0.5
set aqii_leaf 1.5
forward 0.5]
ask patches in-radius 1 with [is-paved? = true and pzcor > 0 and any? neighbors6 with [atmosphere? = true]]
[sprout-uvgts 2 [set color green
set ycor pycor + 0.50
set xcor pxcor + 0.50
set size random-float 0.5
set aqii_leaf 1.5
forward 0.50]] ]
set satisfaction_level (1 + (bs_area / 49) * satisfaction_level / 500) * satisfaction_level]
;; setup green engancement
if green_enhancement = true
[ask n-of (ge_area / 49) patches with [is-urban? = true and pzcor = 0]
[ifelse count neighbors6 with [is-paved? = false] > 2
[sprout-nvgts 1 [set color green
set zcor 1
set size random-float 1.0
set aqii_leaf 2]
sprout-uvgts 2 [set color green
set zcor 0.5
set size random-float 0.7
set aqii_leaf 1] ]
[sprout-uvgts 4 [set color green
set zcor 0.5
set size random-float 0.5
set aqii_leaf 1.5]]
set vegetation_volume 0.60
set surface_roughness 0.60
set max_soil_humidity 0.40]
set satisfaction_level (1 + (ge_area / 49) * satisfaction_level / 100) * satisfaction_level ]
;; setup permeable pavement
if permeable_pavement = true
[ask n-of (pp_area / 49) patches with [is-paved? = true and count neighbors6 with [is-urban? = true or is-fluvial? = true] > 1 ]
[set is-perm? true
set pcolor brown
set surface_roughness 0.40
set organic_content 8
set max_soil_humidity 0.60]]
end
;;; ASSESSMENT PROCEDURES ;;; ASSESSMENT PROCEDURES ;;; ASSESSMENT PROCEDURES ;;;
to assess-soil-water-retention
ask patches with [ideal_vegetation_volume > 0]
[set surface (((vegetation_volume - ideal_vegetation_volume)/ ideal_vegetation_volume) / 2 +
((surface_roughness - ideal_roughness) / ideal_roughness) / 2 ) * 100
set soil (((max_soil_humidity - s_h) / ideal_soil_humidity) / 3 +
((s_h - min_wilting_point ) / min_wilting_point) / 3 +
((soil_suction) / ideal_soil_suction) / 3 ) * 100 ]
ask patches
[set soil_water_retention (surface / 2) + (soil / 2)]
end
to assess-vegetation
ask patches with [organic_content > 0]
[ifelse organic_content > 0 ;and soil_humidity > 0 min_wilting_point and soil_humidity < max_soil_humidity
[set sfi (organic_content / 100) + (soil_humidity / min_wilting_point) + (max_soil_humidity / soil_humidity)] ;average soil pH at 6.5
[set sfi 0]
set ideal_sfi 21.785 + (32 / 15) + (60 / 32)] ;21.785 :mean [organic_content] of patches of the ground
let vgts (turtle-set nvgts uvgts fvgts)
set veg_cover (count patches with [s_h > 0 and is-paved? = false] / count patches with [s_h > 0]) / 2 +
((count vgts * mean [size] of vgts) / count patches with [s_h > 0]) / 2
set ideal_veg 0.25 ; count patches with [is-natural? ] * 3 / count patches with [s_h > 0] ] 30% grass and 20% tree cover Meili 2021
if ideal_veg > 0 ;; set a standard ideal_veg for this type of city
[set flora (veg_cover - ideal_veg) / ideal_veg] ;
let sfi_perf (sfi - ideal_sfi / ideal_sfi)
set vegetation flora + sfi_perf
end
to assess-biodiversity
let vgts (turtle-set nvgts uvgts fvgts)
ask (vgts)
[ifelse any? nvgts with [size <= 1]
[let diversity_1 (count nvgts with [size <= 1] / count vgts)
set d_1 -1 * diversity_1 * ln diversity_1] ; Shannon's divesity index (H') in Morris et al. 2014
[set d_1 0]
ifelse any? nvgts with [size > 1]
[let diversity_2 (count nvgts with [size > 1] / count vgts)
set d_2 -1 * diversity_2 * ln diversity_2]
[set d_2 0]
ifelse any? fvgts
[let diversity_3 (count fvgts / count vgts)
set d_3 -1 * diversity_3 * ln diversity_3 ]
[set d_3 0]
ifelse any? uvgts with [size <= 0.30]
[let diversity_4 (count uvgts with [size <= 0.30] / count vgts)
set d_4 -1 * diversity_4 * ln diversity_4]
[set d_4 0]
ifelse any? uvgts with [size > 0.30]
[let diversity_5 (count uvgts with [size > 0.30] / count vgts)
set d_5 -1 * diversity_5 * ln diversity_5]
[set d_5 0]
set fl_d d_1 + d_2 + d_3 + d_4 + d_5 ]
set biodiversity ((fl_d) - ideal_biodiversity ) / ideal_biodiversity
end
to assess-community
ask ppls [forward 1]
ask patches with [is-paved? = true and any? ppls-here = true]
[ask ppls-here [die]]
ask patches with [count (neighbors with [pzcor = 0 and is-paved? = false ]) > 2 and any? ppls-here = false]
[sprout-ppls NBS_attractiveness [set color orange
set zcor [pzcor] of myself
set shape "square"
set size 0.10
forward 1]]
let vgts (turtle-set nvgts uvgts fvgts)
ask patches with [pzcor = 0 and is-paved? = false and any? vgts = true and any? ppls-here = false]
[sprout-ppls NBS_attractiveness * 2 [set color orange
set zcor [pzcor] of myself
set shape "square"
set size 0.10
forward 1]]
set community_index count ppls / count patches with [pzcor = 0]
set community (community_index - initial_community_index)/ initial_community_index
ask ppls [forward 1]
end
to assess-air
let vgts (turtle-set nvgts fvgts uvgts)
ask vgts
[ask patches in-radius (3 * [size] of self) with [atmosphere? = true]
[if temperature_variation = "<10"
[set cool_dif -1.5]
if temperature_variation = "10-20"
[set cool_dif -0.9]
if temperature_variation = "20-30"
[set cool_dif -0.8]]]
ask vgts with [size <= 0.5]
[set aqii_habit 1
set aqii_canopy 1]
ask vgts with [size > 0.5 and size < 1]
[set aqii_habit 2
set aqii_canopy 2]
ask vgts with [size >= 1]
[set aqii_habit 3
set aqii_canopy 3]
set ideal_aqii count vgts * (reference_habit + reference_canopy + mean [aqii_leaf] of vgts)
ask patches with [atmosphere? = true]
[set air_sample count patches with [atmosphere? = true]]
set cool_patches count patches with [atmosphere? = true and any? nvgts-here = true or any? uvgts-here = true or any? fvgts-here = true] * 8 * mean [size] of vgts
let cool_p patches with [atmosphere? = true and any? nvgts-here = true or any? uvgts-here = true or any? fvgts-here = true]
ask cool_p
[ifelse air_temperature > 298
[set air_temperature (air_temperature + cool_dif)]
[set air_temperature 298]]
diffuse cool_dif 1
ask patches with [atmosphere? = true]
[set cooling (cool_patches / air_sample) * (-1 * cool_dif) * 100]
ask vgts
[set aqii mean [aqii_habit] of vgts + mean [aqii_canopy] of vgts + 3
set air ((aqii - ideal_aqii) / ideal_aqii) + (cooling)]
end
to assess-ES
let vgts (turtle-set nvgts fvgts uvgts)
ifelse erosion_control = true
[set erosion_control_value mean [soil_water_retention] of patches ]
[set erosion_control_value 0]
ifelse gas_regulation = true
[set gas_regulation_value aqii]
[set gas_regulation_value 0 ]
ifelse microclimate_regulation = true
[set microclimate_regulation_value mean [cooling] of patches ]
[set microclimate_regulation_value 0]
ifelse nutrient_cycling = true
[set nutrient_cycling_value (sfi - ideal_sfi / ideal_sfi)] ;soil reftility perfomance
[set nutrient_cycling_value 0]
ifelse pollination = true
[set pollination_value (cool_patches / count patches with [atmosphere? = true]) ]
[set pollination_value 0]
ifelse refugia = true
[set refugia_value 1 * (count vgts * 10 / count patches with [is-paved? = false and atmosphere? = false]) ] ; Abd-Allah et al. 2012
[set refugia_value 0]
ifelse soil_formation = true
[set soil_formation_value mean [soil] of patches]
[set soil_formation_value 0]
ifelse water_regulation = true
[set water_regulation_value 0.10 * abs ((mean [soil_suction] of patches - mean [ideal_soil_suction] of patches) / mean [ideal_soil_suction] of patches) ]
[set water_regulation_value 0]
set regulating (erosion_control_value + gas_regulation_value + microclimate_regulation_value + nutrient_cycling_value + pollination_value + refugia_value + soil_formation_value + water_regulation_value ) / 8 ; average of all regulating services
ifelse genetic_resources = true
[set genetic_resources_value (0.001 * count vgts) + (0.001 * count vgts * 10)]
[set genetic_resources_value 0]
ifelse raw_materials_value = true
[set raw_materials_value 0.1 * count vgts]
[set raw_materials_value 0]
ifelse water_savings = true
[set water_savings_value (mean [soil_water_retention] of patches / 10) ]
[set water_savings_value 0]
set provisioning (genetic_resources_value + raw_materials_value + water_savings_value) / 3 ; average of all provisioning services
ifelse cultural_use = true
[set cultural_use_value 0.10 * usage_level * count ppls / 1000 ]
[set cultural_use_value 0]
ifelse recreation = true
[set recreation_value veg_cover * satisfaction_level * count ppls / 1000]
[set recreation_value 0]
set cultural (cultural_use_value + recreation_value) / 2 ; average of all cultural services
end
;;; RECOVERY PROCEDURES OF NBS ;;; RECOVERY PROCEDURES OF NBS;;; RECOVERY PROCEDURES OF NBS;;;
to recover_heatwave
ask patches
[set soil_temperature air_temperature]
ask patches with [atmosphere? = true]
[ifelse air_temperature - 298 > 0
[set air_temperature air_temperature - 0.5 ]
[set air_temperature 298]
if hw_temperature - 298 <= 10
[set cool_dif -1.5]
if hw_temperature - 298 > 10 and hw_temperature - 298 <= 20
[set cool_dif -0.9]
if hw_temperature - 298 > 20 and hw_temperature - 298 <= 30
[set cool_dif -0.8] ]
end
;;; DISRUPTIVE EVENTS ;;; DISRUPTIVE EVENTS ;;; DISRUPTIVE EVENTS ;;;
to heatwave
let vgts (turtle-set nvgts uvgts fvgts)
if heatwave? = true and ticks = 1
[ask patches with [is-paved? = true]
[set soil_temperature hw_temperature * 1.2]
ask patches with [is-paved? = false and atmosphere? = false]
[set soil_temperature air_temperature
set s_h hw_humidity]
ask uvgts
[ask n-of ((hw_temperature - 298) / 10) uvgts [die]]
ask patches with [atmosphere? = true]
[set air_temperature hw_temperature]
ask ppls
[ask n-of ((abs(hw_temperature - 298)) * 0.1) ppls [die]]
set satisfaction_level satisfaction_level * (1 - (abs (hw_temperature - 298) / 100))
set NBS_attractiveness NBS_attractiveness * (1 - (abs (hw_temperature - 298) / 100))]
end
There is only one version of this model, created 17 days ago by Anastasia Tzioutziou.
Attached files
| File | Type | Description | Last updated | |
|---|---|---|---|---|
| NBSINFRA Prague.png | preview | Preview for 'NBSINFRA Prague' | 17 days ago, by Anastasia Tzioutziou | Download |
This model does not have any ancestors.
This model does not have any descendants.
Download this model