Helper methods for InputVar#

This tutorial complements the general tutorial on the uncertainty and sensitivity analysis module unsequa.

The InputVar class provides a few helper methods to generate generic uncertainty input variables for exposures, impact function sets, hazards, and entities (including measures cost and disc rates).

import warnings
warnings.filterwarnings('ignore') #Ignore warnings for making the tutorial's pdf. 

Exposures#

The following types of uncertainties can be added:

  • ET: scale the total value (homogeneously)

The value at each exposure point is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_totvalue

  • EN: mutliplicative noise (inhomogeneous)

The value of each exposure point is independently multiplied by a random number sampled uniformly from a distribution with (min, max) = bounds_noise. EN is the value of the seed for the uniform random number generator.

  • EL: sample uniformly from exposure list

From the provided list of exposure is elements are uniformly sampled. For example, LitPop instances with different exponents.

If a bounds is None, this parameter is assumed to have no uncertainty.

Example: single exposures#

#Define the base exposure
from climada.util.constants import EXP_DEMO_H5
from climada.entity import Exposures
exp_base = Exposures.from_hdf5(EXP_DEMO_H5)
2022-07-07 15:13:32,000 - climada.entity.exposures.base - INFO - Reading /Users/ckropf/climada/demo/data/exp_demo_today.h5
from climada.engine.unsequa import InputVar
bounds_totval = [0.9, 1.1] #+- 10% noise on the total exposures value
bounds_noise = [0.9, 1.2] #-10% - +20% noise each exposures point
exp_iv = InputVar.exp([exp_base], bounds_totval, bounds_noise)
#The difference in total value between the base exposure and the average input uncertainty exposure 
#due to the random noise on each exposures point (the average change in the total value is 1.0).
avg_exp = exp_iv.evaluate()
(sum(avg_exp.gdf['value']) - sum(exp_base.gdf['value'])) / sum(exp_base.gdf['value'])
0.03700231587024304
#The values for EN are seeds for the random number generator for the noise sampling and
#thus are uniformly sampled numbers between (0, 2**32-1) 
exp_iv.plot();
../_images/1a4d21e3ee5b4d8365a54160ded320360df8808799aafd947666062820d555c3.png

Example: list of litpop exposures with different exponents#

#Define a generic method to make litpop instances with different exponent pairs.
from climada.entity import LitPop
def generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs,
                          choice_mn, **litpop_kwargs):
    #In-function imports needed only for parallel computing on Windows
    from climada.entity import LitPop
    litpop_base = []
    for [m, n] in choice_mn:
        print('\n Computing litpop for m=%d, n=%d \n' %(m, n))
        litpop_kwargs['exponents'] = (m, n)
        exp = LitPop.from_countries(**litpop_kwargs)
        exp.gdf['impf_' + haz.haz_type] = impf_id
        exp.gdf.drop('impf_', axis=1, inplace=True)
        if value_unit is not None:
            exp.value_unit = value_unit
        exp.assign_centroids(haz, **assign_centr_kwargs)
        litpop_base.append(exp)
    return litpop_base
#Define the parameters of the LitPop instances
tot_pop = 11.317e6
impf_id = 1
value_unit = 'people'
litpop_kwargs = {
    'countries' : ['CUB'],
    'res_arcsec' : 150, 
    'reference_year' : 2020,
    'fin_mode' : 'norm',
    'total_values' : [tot_pop]
}
assign_centr_kwargs={}

# The hazard is needed to assign centroids
from climada.util.constants import HAZ_DEMO_H5
from climada.hazard import Hazard
haz = Hazard.from_hdf5(HAZ_DEMO_H5)
2022-07-07 15:13:32,787 - climada.hazard.base - INFO - Reading /Users/ckropf/climada/demo/data/tc_fl_1990_2004.h5
#Generate the LitPop list

choice_mn = [[0, 0.5], [0, 1], [0, 2]] #Choice of exponents m,n

litpop_list = generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs, choice_mn, **litpop_kwargs)
 Computing litpop for m=0, n=0 

2022-07-07 15:13:33,055 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:13:34,051 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,082 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,109 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,135 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,163 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,188 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,223 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,289 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,316 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,325 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:34,326 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,355 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,385 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,410 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,435 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,459 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,487 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,508 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,519 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:34,520 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,543 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,570 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,597 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,621 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,645 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,685 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,710 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,742 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,768 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,791 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,830 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,862 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,899 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,933 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,955 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:34,981 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,019 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,043 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,068 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,090 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,119 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,142 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:35,173 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:13:35,173 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:13:35,174 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:13:35,174 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:13:35,175 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:13:35,179 - climada.entity.exposures.base - INFO - Matching 5524 exposures with 2500 centroids.
2022-07-07 15:13:35,181 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:13:35,189 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 332 coordinates.

 Computing litpop for m=0, n=1 

2022-07-07 15:13:35,416 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:13:36,256 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,284 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,309 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,335 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,367 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,392 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,424 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,494 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,519 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,529 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:36,530 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,556 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,586 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,610 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,637 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,666 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,691 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,716 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,725 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:36,726 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,754 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,786 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,818 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,843 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,872 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,909 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,936 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,965 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:36,989 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,013 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,052 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,087 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,123 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,156 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,177 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,201 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,241 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,263 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,288 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,311 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,343 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,367 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:37,400 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:13:37,400 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:13:37,401 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:13:37,401 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:13:37,402 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:13:37,406 - climada.entity.exposures.base - INFO - Matching 5524 exposures with 2500 centroids.
2022-07-07 15:13:37,407 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:13:37,415 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 332 coordinates.

 Computing litpop for m=0, n=2 

2022-07-07 15:13:37,637 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:13:38,561 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,589 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,615 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,638 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,665 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,689 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,720 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,784 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,808 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,820 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:38,820 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,844 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,873 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,897 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,920 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,944 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,968 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,990 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:38,999 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:13:39,000 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,022 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,047 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,074 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,097 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,123 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,161 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,187 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,217 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,242 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,265 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,304 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,334 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,370 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,402 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,423 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,448 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,487 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,510 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,532 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,554 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,580 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,603 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:13:39,633 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:13:39,634 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:13:39,634 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:13:39,635 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:13:39,635 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:13:39,639 - climada.entity.exposures.base - INFO - Matching 5524 exposures with 2500 centroids.
2022-07-07 15:13:39,641 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:13:39,649 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 332 coordinates.
from climada.engine.unsequa import InputVar
bounds_totval = [0.9, 1.1] #+- 10% noise on the total exposures value
litpop_iv = InputVar.exp(exp_list = litpop_list,
                         bounds_totval=bounds_totval)
# To choose n=0.5, we have to set EL=1 (the index of 0.5 in choice_n = [0, 0.5, 1, 2])
pop_half = litpop_iv.evaluate(ET=1, EL=1)
pop_half.gdf.tail()
value geometry latitude longitude region_id impf_TC centr_TC
5519 92.974926 POINT (-80.52083 23.18750) 23.187500 -80.520833 192 1 619
5520 131.480741 POINT (-80.47917 23.18750) 23.187500 -80.479167 192 1 619
5521 77.695093 POINT (-80.68750 23.18750) 23.187500 -80.687500 192 1 618
5522 43.122163 POINT (-80.89583 23.14583) 23.145833 -80.895833 192 1 617
5523 106.033524 POINT (-80.85417 23.14583) 23.145833 -80.854167 192 1 617
pop_half.plot_hexbin();
2022-07-07 15:13:39,690 - climada.util.plot - WARNING - Error parsing coordinate system 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]'. Using projection PlateCarree in plot.
../_images/2e9334774f8a298b31a2915586b754d006296e1283f9c21dd9c90e92498bb366.png
# To choose n=1, we have to set EL=2 (the index of 1 in choice_n = [0, 0.5, 1, 2])
pop_one = litpop_iv.evaluate(ET=1, EL=2)
pop_one.gdf.tail()
value geometry latitude longitude region_id impf_TC centr_TC
5519 0.567593 POINT (-80.52083 23.18750) 23.187500 -80.520833 192 1 619
5520 1.135089 POINT (-80.47917 23.18750) 23.187500 -80.479167 192 1 619
5521 0.396363 POINT (-80.68750 23.18750) 23.187500 -80.687500 192 1 618
5522 0.122097 POINT (-80.89583 23.14583) 23.145833 -80.895833 192 1 617
5523 0.738231 POINT (-80.85417 23.14583) 23.145833 -80.854167 192 1 617
pop_one.plot_hexbin();
2022-07-07 15:13:45,584 - climada.util.plot - WARNING - Error parsing coordinate system 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]'. Using projection PlateCarree in plot.
../_images/f6db2cda91b0975fe361d8a25503baf7123ce3342658d781c2618204558dd616.png
#The values for EN are seeds for the random number generator for the noise sampling and
#thus are uniformly sampled numbers between (0, 2**32-1) 
litpop_iv.plot();
../_images/435653e0c5d6831359617821ae29acd50f95bb2f6b2d668830c22205e40c9205.png

Hazard#

The following types of uncertainties can be added:

  • HE: sub-sampling events from the total event set

For each sub-sample, n_ev events are sampled with replacement. HE is the value of the seed for the uniform random number generator.

  • HI: scale the intensity of all events (homogeneously)

The instensity of all events is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_int

  • HA: scale the fraction of all events (homogeneously)

The fraction of all events is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_frac

  • HF: scale the frequency of all events (homogeneously)

The frequency of all events is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_freq

  • HL: sample uniformly from hazard list

From the provided list of hazard is elements are uniformly sampled. For example, Hazards outputs from dynamical models for different input factors.

If a bounds is None, this parameter is assumed to have no uncertainty.

#Define the base exposure
from climada.util.constants import HAZ_DEMO_H5
from climada.hazard import Hazard
haz_base = Hazard.from_hdf5(HAZ_DEMO_H5)
2022-07-07 15:13:51,145 - climada.hazard.base - INFO - Reading /Users/ckropf/climada/demo/data/tc_fl_1990_2004.h5
from climada.engine.unsequa import InputVar
bounds_freq = [0.9, 1.1] #+- 10% noise on the frequency of all events
bounds_int = None #No uncertainty on the intensity
n_ev = None 
haz_iv = InputVar.haz([haz_base], n_ev=n_ev, bounds_freq=bounds_freq, bounds_int=bounds_int)
#The difference in frequency for HF=1.1 is indeed 10%.
haz_high_freq = haz_iv.evaluate(HE=n_ev, HI=None, HF = 1.1)
(sum(haz_high_freq.frequency) - sum(haz_base.frequency)) / sum(haz_base.frequency)
0.10000000000000736
bounds_freq = [0.9, 1.1] #+- 10% noise on the frequency of all events
bounds_int = None #No uncertainty on the intensity
bounds_frac = [0.7, 1.1] #noise on the fraction of all events
n_ev = round(0.8 * haz_base.size) #sub-sample with re-draw events to obtain hazards with n=0.8*tot_number_events
haz_iv = InputVar.haz(
    [haz_base], n_ev=n_ev, bounds_freq=bounds_freq, bounds_int=bounds_int, bounds_frac=bounds_frac
)

Note that the HE is not a univariate distribution, but for each sample corresponds to the names of the sub-sampled events. However, to simplify the data stream, the HE is saved as the seed for the random number generator that made the sample. Hence, the value of HE is a label for the given sample. If really needed, the exact chosen events can be obtained as follows.

import numpy as np
HE = 2618981871 #The random seed (number between 0 and 2**32)
rng = np.random.RandomState(int(HE)) #Initialize a random state with the seed
chosen_ev = list(rng.choice(haz_base.event_name, int(n_ev))) #Obtain the corresponding events
#The first event is 
chosen_ev[0]
'1998209N11335'
#The values for HE are seeds for the random number generator for the noise sampling and
#thus are uniformly sampled numbers between (0, 2**32-1) 
haz_iv.plot();
../_images/83b2a589c6fdf9ac2985b744cec4fbe0eaa58ffb92f0e51c51de9a9fc91f285f.png

The number of events per sub-sample is equal to n_ev

#The number of events per sample is equal to n_ev
haz_sub = haz_iv.evaluate(HE=928165924, HI=None, HF = 1.1, HA=None)
#The number for HE is irrelevant, as all samples have the same n_Ev
haz_sub.size - n_ev
0

ImpactFuncSet#

The following types of uncertainties can be added:

  • MDD: scale the mdd (homogeneously)

The value of mdd at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_mdd

  • PAA: scale the paa (homogeneously)

The value of paa at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_paa

  • IFi: shift the intensity (homogeneously)

The value intensity are all summed with a random number sampled uniformly from a distribution with (min, max) = bounds_int

  • IL: sample uniformly from impact function set list

From the provided list of impact function sets elements are uniformly sampled. For example, impact functions obtained from different calibration methods.

If a bounds is None, this parameter is assumed to have no uncertainty.

from climada.entity import ImpactFuncSet, ImpfTropCyclone
impf = ImpfTropCyclone.from_emanuel_usa()
impf_set_base = ImpactFuncSet([impf])

It is necessary to specify the hazard type and the impact function id. For simplicity, the default uncertainty input variable only looks at the uncertainty on one single impact function.

from climada.engine.unsequa import InputVar
bounds_impfi = [-10, 10] #-10 m/s ; +10m/s uncertainty on the intensity
bounds_mdd = [0.7, 1.1] #-30% - +10% uncertainty on the mdd
bounds_paa = None #No uncertainty in the paa
impf_iv = InputVar.impfset(impf_set_list=[impf_set_base],
                           bounds_impfi=bounds_impfi,
                           bounds_mdd=bounds_mdd,
                           bounds_paa=bounds_paa,
                           haz_id_dict={'TC': [1]})
#Plot the impact function for 50 random samples (note for the expert, these are not global)
n = 50
ax = impf_iv.evaluate().plot()
inten = impf_iv.distr_dict['IFi'].rvs(size=n)
mdd = impf_iv.distr_dict['MDD'].rvs(size=n)
for i, m in zip(inten, mdd):
    impf_iv.evaluate(IFi=i, MDD=m).plot(axis=ax)
ax.get_legend().remove()
../_images/7e36de0779c875f4efb40dcab1f0db9e52200858bf48e8eb336b7b7c86ef4664.png

Entity#

The following types of uncertainties can be added:

  • DR: value of constant discount rate (homogeneously)

The value of the discounts in each year is sampled uniformly from a distribution with (min, max) = bounds_disc

  • CO: scale the cost (homogeneously)

The cost of all measures is multiplied by the same number sampled uniformly from a distribution with (min, max) = bounds_cost

  • ET: scale the total value (homogeneously)

The value at each exposure point is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_totval

  • EN: mutliplicative noise (inhomogeneous)

The value of each exposure point is independently multiplied by a random number sampled uniformly from a distribution with (min, max) = bounds_noise. EN is the value of the seed for the uniform random number generator.

  • EL: sample uniformly from exposure list

From the provided list of exposure is elements are uniformly sampled. For example, LitPop instances with different exponents.

  • MDD: scale the mdd (homogeneously)

The value of mdd at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_mdd

  • PAA: scale the paa (homogeneously)

The value of paa at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_paa

  • IFi: shift the intensity (homogeneously)

The value intensity are all summed with a random number sampled uniformly from a distribution with (min, max) = bounds_int

If a bounds is None, this parameter is assumed to have no uncertainty.

Example: single exposures#

from climada.entity import Entity
from climada.util.constants import ENT_DEMO_TODAY
ent = Entity.from_excel(ENT_DEMO_TODAY)
ent.exposures.ref_year = 2018
ent.check()
2022-07-07 15:18:00,292 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:00,293 - climada.entity.exposures.base - INFO - geometry not set.
2022-07-07 15:18:00,294 - climada.entity.exposures.base - INFO - region_id not set.
2022-07-07 15:18:00,294 - climada.entity.exposures.base - INFO - centr_ not set.
from climada.engine.unsequa import InputVar
ent_iv = InputVar.ent(
    impf_set_list = [ent.impact_funcs],
    disc_rate = ent.disc_rates,
    exp_list = [ent.exposures],
    meas_set = ent.measures,
    bounds_disc=[0, 0.08],
    bounds_cost=[0.5, 1.5],
    bounds_totval=[0.9, 1.1],
    bounds_noise=[0.3, 1.9],
    bounds_mdd=[0.9, 1.05],
    bounds_paa=None,
    bounds_impfi=[-2, 5],
    haz_id_dict={'TC': [1]}
    )
ent_iv.plot();
../_images/05f3eb44df31a0ddfdc3560207a8615d23e4bd9f2bfcd833d0ea5140759af455.png

Example: list of Litpop exposures with different exponents#

#Define a generic method to make litpop instances with different exponent pairs.
from climada.entity import LitPop
def generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs,
                          choice_mn, **litpop_kwargs):
    #In-function imports needed only for parallel computing on Windows
    from climada.entity import LitPop
    litpop_base = []
    for [m, n] in choice_mn:
        print('\n Computing litpop for m=%d, n=%d \n' %(m, n))
        litpop_kwargs['exponents'] = (m, n)
        exp = LitPop.from_countries(**litpop_kwargs)
        exp.gdf['impf_' + haz.haz_type] = impf_id
        exp.gdf.drop('impf_', axis=1, inplace=True)
        if value_unit is not None:
            exp.value_unit = value_unit
        exp.assign_centroids(haz, **assign_centr_kwargs)
        litpop_base.append(exp)
    return litpop_base
#Define the parameters of the LitPop instances
impf_id = 1
value_unit = None
litpop_kwargs = {
    'countries' : ['CUB'],
    'res_arcsec' : 300, 
    'reference_year' : 2020,
}
assign_centr_kwargs={}

# The hazard is needed to assign centroids
from climada.util.constants import HAZ_DEMO_H5
from climada.hazard import Hazard
haz = Hazard.from_hdf5(HAZ_DEMO_H5)
2022-07-07 15:18:00,956 - climada.hazard.base - INFO - Reading /Users/ckropf/climada/demo/data/tc_fl_1990_2004.h5
#Generate the LitPop list

choice_mn = [[1, 0.5], [0.5, 1], [1, 1]] #Choice of exponents m,n

litpop_list = generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs, choice_mn, **litpop_kwargs)
 Computing litpop for m=1, n=0 

2022-07-07 15:18:01,386 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:01,968 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:01,997 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,022 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,044 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,069 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,093 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,125 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,187 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,210 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,220 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,221 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,233 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,234 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,248 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,249 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,264 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,265 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,278 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,279 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,303 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,330 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,341 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,342 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,351 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,351 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,363 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,364 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,391 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,417 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,443 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,466 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,504 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,528 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,559 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,585 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,596 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,597 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,634 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,666 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,700 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,734 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,758 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,768 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,769 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,809 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,821 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,822 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,845 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,869 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,896 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,919 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:02,930 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:02,959 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:04,013 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:04,017 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:04,028 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:04,029 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:04,030 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:04,031 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:04,032 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:04,037 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:04,039 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:04,046 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.

 Computing litpop for m=0, n=1 

2022-07-07 15:18:04,291 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:04,812 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,842 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,869 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,894 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,923 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,953 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:04,987 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,049 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,075 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,086 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,087 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,098 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,099 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,114 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,115 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,131 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,132 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,148 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,149 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,174 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,199 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,208 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,209 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,220 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,221 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,233 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,234 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,261 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,287 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,310 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,333 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,368 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,392 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,420 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,444 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,455 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,456 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,492 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,523 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,557 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,588 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,611 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,622 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,623 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,659 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,671 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,671 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,693 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,716 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,742 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,764 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:05,775 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:05,801 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:06,617 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:06,621 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:06,630 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:06,631 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:06,631 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:06,632 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:06,632 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:06,636 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:06,637 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:06,643 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.

 Computing litpop for m=1, n=1 

2022-07-07 15:18:06,884 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:07,423 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,449 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,473 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,496 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,521 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,544 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,574 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,637 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,660 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,670 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,670 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,682 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,683 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,697 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,698 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,710 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,711 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,723 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,724 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,748 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,773 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,783 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,784 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,793 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,794 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,805 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:07,806 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,832 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,859 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,882 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,907 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,943 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,968 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:07,997 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,021 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,032 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:08,032 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,071 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,102 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,136 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,167 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,189 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,200 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:08,201 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,240 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,252 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:08,253 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,276 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,298 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,323 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,345 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:08,357 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:08,383 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:09,253 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:09,257 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:09,267 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:09,268 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:09,268 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:09,269 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:09,270 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:09,275 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:09,277 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:09,283 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.
from climada.entity import Entity
from climada.util.constants import ENT_DEMO_TODAY
ent = Entity.from_excel(ENT_DEMO_TODAY)
ent.exposures.ref_year = 2020
ent.check()
2022-07-07 15:18:09,400 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:09,401 - climada.entity.exposures.base - INFO - geometry not set.
2022-07-07 15:18:09,402 - climada.entity.exposures.base - INFO - region_id not set.
2022-07-07 15:18:09,402 - climada.entity.exposures.base - INFO - centr_ not set.
from climada.engine.unsequa import InputVar
ent_iv = InputVar.ent(
    impf_set_list = [ent.impact_funcs],
    disc_rate = ent.disc_rates,
    exp_list = litpop_list,
    meas_set = ent.measures,
    bounds_disc=[0, 0.08],
    bounds_cost=[0.5, 1.5],
    bounds_totval=[0.9, 1.1],
    bounds_noise=[0.3, 1.9],
    bounds_mdd=[0.9, 1.05],
    bounds_paa=None,
    bounds_impfi=[-2, 5],
    haz_id_dict={'TC': [1]}
    )
ent_iv.evaluate().exposures.plot_hexbin();
2022-07-07 15:18:09,448 - climada.util.plot - WARNING - Error parsing coordinate system 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]'. Using projection PlateCarree in plot.
../_images/b1b621fd319bbecb198974541fe4582d7db01f970e40e7204a8c73522d0ccfcf.png

Entity Future#

The following types of uncertainties can be added:

  • CO: scale the cost (homogeneously)

The cost of all measures is multiplied by the same number sampled uniformly from a distribution with (min, max) = bounds_cost

  • EG: scale the exposures growth (homogeneously)

The value at each exposure point is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_eg

  • EN: mutliplicative noise (inhomogeneous)

The value of each exposure point is independently multiplied by a random number sampled uniformly from a distribution with (min, max) = bounds_noise. EN is the value of the seed for the uniform random number generator.

  • EL: sample uniformly from exposure list

From the provided list of exposure is elements are uniformly sampled. For example, LitPop instances with different exponents.

  • MDD: scale the mdd (homogeneously)

The value of mdd at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_mdd

  • PAA: scale the paa (homogeneously)

The value of paa at each intensity is multiplied by a number sampled uniformly from a distribution with (min, max) = bounds_paa

  • IFi: shift the impact function intensity (homogeneously)

The value intensity are all summed with a random number sampled uniformly from a distribution with (min, max) = bounds_impfi

  • IL: sample uniformly from impact function set list

From the provided list of impact function sets elements are uniformly sampled. For example, impact functions obtained from different calibration methods.

If a bounds is None, this parameter is assumed to have no uncertainty.

Example: single exposures#

from climada.entity import Entity
from climada.util.constants import ENT_DEMO_FUTURE

ent_fut = Entity.from_excel(ENT_DEMO_FUTURE)
ent_fut.exposures.ref_year = 2040
ent_fut.check()
2022-07-07 15:18:11,936 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:11,937 - climada.entity.exposures.base - INFO - geometry not set.
2022-07-07 15:18:11,938 - climada.entity.exposures.base - INFO - region_id not set.
2022-07-07 15:18:11,938 - climada.entity.exposures.base - INFO - centr_ not set.
entfut_iv = InputVar.entfut(
    impf_set_list = [ent_fut.impact_funcs],
    exp_list = [ent_fut.exposures],
    meas_set = ent_fut.measures,
    bounds_cost=[0.6, 1.2],
    bounds_eg=[0.8, 1.5],
    bounds_noise=None,
    bounds_mdd=[0.7, 0.9],
    bounds_paa=[1.3, 2],
    haz_id_dict={'TC': [1]}
    )

Example: list of exposures#

#Define a generic method to make litpop instances with different exponent pairs.
from climada.entity import LitPop
def generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs,
                          choice_mn, **litpop_kwargs):
    #In-function imports needed only for parallel computing on Windows
    from climada.entity import LitPop
    litpop_base = []
    for [m, n] in choice_mn:
        print('\n Computing litpop for m=%d, n=%d \n' %(m, n))
        litpop_kwargs['exponents'] = (m, n)
        exp = LitPop.from_countries(**litpop_kwargs)
        exp.gdf['impf_' + haz.haz_type] = impf_id
        exp.gdf.drop('impf_', axis=1, inplace=True)
        if value_unit is not None:
            exp.value_unit = value_unit
        exp.assign_centroids(haz, **assign_centr_kwargs)
        litpop_base.append(exp)
    return litpop_base
#Define the parameters of the LitPop instances
impf_id = 1
value_unit = None
litpop_kwargs = {
    'countries' : ['CUB'],
    'res_arcsec' : 300, 
    'reference_year' : 2040,
}
assign_centr_kwargs={}

# The hazard is needed to assign centroids
from climada.util.constants import HAZ_DEMO_H5
from climada.hazard import Hazard
haz = Hazard.from_hdf5(HAZ_DEMO_H5)
2022-07-07 15:18:11,958 - climada.hazard.base - INFO - Reading /Users/ckropf/climada/demo/data/tc_fl_1990_2004.h5
#Generate the LitPop list

choice_mn = [[1, 0.5], [0.5, 1], [1, 1]] #Choice of exponents m,n

litpop_list = generate_litpop_base(impf_id, value_unit, haz, assign_centr_kwargs, choice_mn, **litpop_kwargs)
 Computing litpop for m=1, n=0 

2022-07-07 15:18:12,244 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:12,773 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,773 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,803 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,804 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,830 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,831 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,854 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,854 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,881 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,881 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,906 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,907 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:12,937 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:12,938 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,001 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,002 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,025 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,025 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,034 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,035 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,035 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,047 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,048 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,048 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,062 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,063 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,064 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,077 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,078 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,078 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,090 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,090 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,091 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,117 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,118 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,144 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,145 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,155 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,156 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,157 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,165 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,166 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,166 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,178 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,178 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,179 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,202 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,203 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,231 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,232 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,256 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,257 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,281 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,281 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,316 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,316 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,344 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,344 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,374 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,375 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,399 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,400 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,412 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,412 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,413 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,451 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,452 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,483 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,483 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,521 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,522 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,554 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,555 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,579 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,579 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,590 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,591 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,592 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,630 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,630 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,643 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,644 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,644 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,666 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,667 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,690 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,691 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,718 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,718 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,742 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:13,742 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:13,754 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:13,780 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:14,384 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:14,388 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:14,396 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:14,397 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:14,397 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:14,398 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:14,398 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:14,401 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:14,403 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:14,409 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.

 Computing litpop for m=0, n=1 

2022-07-07 15:18:14,640 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:15,172 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,173 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,199 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,200 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,223 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,224 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,249 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,250 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,279 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,279 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,301 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,302 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,330 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,331 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,390 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,391 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,417 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,418 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,428 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,429 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,429 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,441 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,441 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,442 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,457 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,457 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,458 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,471 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,472 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,472 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,483 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,484 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,485 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,512 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,513 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,539 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,540 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,550 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,551 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,552 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,562 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,562 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,563 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,575 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,575 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,576 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,601 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,602 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,633 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,634 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,661 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,662 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,688 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,689 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,729 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,730 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,757 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,758 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,787 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,787 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,812 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,813 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,824 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:15,824 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,825 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,862 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,862 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,893 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,894 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,928 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,929 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,961 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,962 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,984 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:15,985 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:15,999 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:16,000 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,000 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,040 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,040 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,051 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:16,052 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,052 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,076 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,077 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,103 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,103 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,131 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,132 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,156 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:16,156 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:16,167 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:16,195 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:17,186 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:17,190 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:17,200 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:17,201 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:17,201 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:17,202 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:17,203 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:17,208 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:17,210 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:17,216 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.

 Computing litpop for m=1, n=1 

2022-07-07 15:18:17,454 - climada.entity.exposures.litpop.litpop - INFO - 
 LitPop: Init Exposure for country: CUB (192)...

2022-07-07 15:18:17,967 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:17,967 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:17,997 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:17,998 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,024 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,024 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,050 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,050 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,079 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,080 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,111 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,111 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,155 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,155 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,223 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,224 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,250 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,251 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,261 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,262 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,263 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,275 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,275 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,276 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,291 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,291 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,292 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,304 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,305 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,305 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,316 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,317 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,317 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,344 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,345 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,371 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,372 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,385 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,386 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,387 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,399 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,399 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,400 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,413 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,414 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,414 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,440 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,441 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,468 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,469 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,492 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,493 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,516 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,516 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,553 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,553 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,577 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,578 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,607 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,607 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,631 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,632 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,644 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,644 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,645 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,681 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,682 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,714 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,714 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,748 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,748 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,782 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,782 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,804 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,804 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,816 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,817 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,818 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,855 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,856 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,866 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:18,867 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,867 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,891 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,891 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,914 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,914 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,942 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,943 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,965 - climada.entity.exposures.litpop.gpw_population - WARNING - Reference year: 2040. Using nearest available year for GPW data: 2020
2022-07-07 15:18:18,966 - climada.entity.exposures.litpop.gpw_population - INFO - GPW Version v4.11
2022-07-07 15:18:18,978 - climada.entity.exposures.litpop.litpop - INFO - No data point on destination grid within polygon.
2022-07-07 15:18:19,006 - climada.util.finance - WARNING - No data available for country. Using non-financial wealth instead
2022-07-07 15:18:19,855 - climada.util.finance - INFO - GDP CUB 2020: 1.074e+11.
2022-07-07 15:18:19,859 - climada.util.finance - WARNING - No data for country, using mean factor.
2022-07-07 15:18:19,869 - climada.entity.exposures.base - INFO - Hazard type not set in impf_
2022-07-07 15:18:19,870 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:19,870 - climada.entity.exposures.base - INFO - cover not set.
2022-07-07 15:18:19,871 - climada.entity.exposures.base - INFO - deductible not set.
2022-07-07 15:18:19,872 - climada.entity.exposures.base - INFO - centr_ not set.
2022-07-07 15:18:19,875 - climada.entity.exposures.base - INFO - Matching 1388 exposures with 2500 centroids.
2022-07-07 15:18:19,878 - climada.util.coordinates - INFO - No exact centroid match found. Reprojecting coordinates to nearest neighbor closer than the threshold = 100
2022-07-07 15:18:19,884 - climada.util.coordinates - WARNING - Distance to closest centroid is greater than 100km for 78 coordinates.
from climada.entity import Entity
from climada.util.constants import ENT_DEMO_FUTURE

ent_fut = Entity.from_excel(ENT_DEMO_FUTURE)
ent_fut.exposures.ref_year = 2040
ent_fut.check()
2022-07-07 15:18:19,989 - climada.entity.exposures.base - INFO - category_id not set.
2022-07-07 15:18:19,989 - climada.entity.exposures.base - INFO - geometry not set.
2022-07-07 15:18:19,990 - climada.entity.exposures.base - INFO - region_id not set.
2022-07-07 15:18:19,990 - climada.entity.exposures.base - INFO - centr_ not set.
from climada.engine.unsequa import InputVar
entfut_iv = InputVar.entfut(
    impf_set_list = [ent_fut.impact_funcs],
    exp_list = litpop_list,
    meas_set = ent_fut.measures,
    bounds_cost=[0.6, 1.2],
    bounds_eg=[0.8, 1.5],
    bounds_noise=None,
    bounds_mdd=[0.7, 0.9],
    bounds_paa=[1.3, 2],
    haz_id_dict={'TC': [1]}
    )