Skip to content

BuildingsRaster.dat does not trigger building advection scheme #50

@JoshLovesFun

Description

@JoshLovesFun

Describe the bug
When using BuildingsRaster.dat as input, GRAL reads the building heights and counts blocked cells correctly, but the building advection scheme does not run because Program.BuildingsExist is never set. buildings.dat works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Use BuildingsRaster.dat as the building input file.
  2. Run GRAL for any scenario with buildings present.
  3. Observe that the advection scheme related to buildings does not execute, even though the blocked cell count is correct.

Expected behavior
GRAL should treat BuildingsRaster.dat the same as buildings.dat, running the building advection scheme when blocked cells exist.

Screenshots
N/A

Desktop (please complete the following information):
Windows 11

Additional context
I modified ReadBuildings.cs to set Program.BuildingsExist = true when blocked cells exist:

if (block > 0)
{
Program.BuildingsExist = true; // <<< I added this
CalculateSubDomainsForPrognosticWindSimulation();
return true;
}

After this change, the advection scheme runs correctly.

I also noticed that the resulting concentration field is shifted slightly (1–2 meters) to the right when using BuildingsRaster.dat compared to buildings.dat. The raster file was generated directly from building_heights.txt to match the original building layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions