Hi there,
I am having an issue with the results produced by my AAL pipeline. I am hoping to get this issue fixed before switching to the new trapz function as I think the issue will persist no matter which function I use.
In the case of loss in this analysis, loss=population exposure. I am exposing the total population against 20 10m increments of sea level rise, each sea level rise csv file links multiple ARI tiffs that represent the multiple ari for that slr scenario.
My issue is that the outputs, no matter the slr, are exactly the same. I have also ran single tiff files.
The result of the single tiff runs produce a different output across SLR, however, the same output between ARI. i.e. a sea level rise of 200 w/ ari 1000 has the exact output as a slr of 10 with an ari of 1000. Yet, the slr 10+ari 1000 has a different output to slr10+ari 200 [i do have this data if this is hard to follow in writing].
SLR10 vs 80
- the csv file from SLR that loops through average return interval tiffs for SLR*
Therefore, I wonder if there is an issue with the way I am looking at the tiff layers as it is the last layer (ARI1000) that is being output as representing total AAL for each SLR each event?
.
.
.
~~ Beginning of Pipeline ~~
#below is to run AAE
→ join(on: true) as exposures_join_hazards
→ select({, sample(geometry: exposure, coverage: event.coverage) as hazard_sampled})
→ select({, map(hazard_sampled, h → h.sampled) as hazard})
→ select({}) as sampled
→ select({, hazard: max(hazard)})
→ select({, consequence: map(hazard, hv → is_exposed(exposure, hv))})
→ select({, exceedance_probability: 1 - exp(0-(1/float(event.ari)))}) as analysis
input(relation: ‘SLR0’) as hazard_input
→ select({
{
*,
# flood is a ‘template’ bookmark - the location is replaced, but everything else stays the same
bookmark(‘flood’, {location: location}, type: ‘coverage(floating)’) as coverage
} as event
}) as hazard_and_coverage → exposures_join_hazards.rhs
#works
analysis
→ select({*})
→ group(by: {exposure.fid as Building, event.ari as ari, event.slr as slr,
},
select: {Building,
ari,
slr,
})
->save(name: ‘CHANGE Depth-table-High-SLR0’, format: ‘csv’)
analysis
→ select({*})
→ group(by: {exposure.fid as Building, exceedance_probability, event.ari, event.slr,
exposure.land_distr as district,
},
select: {Building,
district,
exceedance_probability,
ari,
slr,
max(pp_tot) as Loss})
→ sort({exceedance_probability, Building}) as aggregate_Property #removed UProperty
→ save(name: ‘Tot_pop_build-exposure-5SLR’, format: ‘csv’)
aggregate_Property
→ select({Building,
ari,
slr,
district,
float(exceedance_probability) as exceedance_probability_float,
float(Loss) as loss}) as event_loss_table
event_loss_table
→ group(by: {Building,
district,
loss},
select: {*, min(exceedance_probability_float) as exceedance_probability_min})
→ group(by: {Building,
district},
select: {
Building:Building,
district:district,
loss_curve: fit_curve(
x-value: loss,
y-value: exceedance_probability_min, #unsure if this should be _min or _float. _min is the current exacuted approach
fitters: {'continuous'}
)
}
)
→ join(on:max.Building=Building).rhs as max_loss_join
→ select({
Building as Building,
district,
if_then_else(is_null(max.max_loss) or max.max_loss <= 0,
0.0,
trapz(
function: loss_curve.function,
a: 1.0,
# a = 1 means annual, 50 would 50 year timeframe exposure etc.
b: if_null(max.max_loss, 0.0),
#b: max.max_exposure,
intervals: 1000)
) as aal})
->save(‘Res_Build_Demograph-AAE-High-SLR0’, format: ‘csv’)
event_loss_table
→ group(
by: Building,
select: {max: {Building, max(loss) as max_loss}}
) as max
→ save(‘Res_Build_Demograph-loss-High-SLR0’, format: ‘csv’)
max → max_loss_join.lhs