Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Calculation Method in Invest Urban Cooling Module (cc_park_ini.tif) #1726

Open
GuohuaHu opened this issue Dec 25, 2024 · 0 comments

Comments

@GuohuaHu
Copy link

I am using the Invest Urban Cooling module and noticed something strange when checking the intermediate results. The cc_park_ini.tif file seems to be calculated using green_area with an exponential distance weighting, rather than using cci. According to the documentation, the formula should be:

$CC_{park_i}=\sum_{j\in\ d\ radius\ from\ i} g_j \cdot CC_j \cdot e^{\left( \frac{-d(i,j)}{d_{cool}} \right)}$

However, after further inspection, I found the following code snippet in the source on GitHub:
https://github.com/natcap/invest/blob/main/src/natcap/invest/urban_cooling_model.py#L524

green_area_decay_kernel_distance = int(numpy.round(
        float(args['green_area_cooling_distance']) / cell_size))
cc_park_raster_path = os.path.join(
        intermediate_dir, f'cc_park{file_suffix}.tif')
cc_park_task = task_graph.add_task(
        func=convolve_2d_by_exponential,
        args=(
            green_area_decay_kernel_distance,
            task_path_prop_map['green_area'][1],
            cc_park_raster_path),
        target_path_list=[cc_park_raster_path],
        dependent_task_list=[
            task_path_prop_map['green_area'][0]],
        task_name='calculate T air')

This seems to indicate that green_area is being used in the calculation, not cci. Could I be misunderstanding the code? I would appreciate some clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant