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:
- Use BuildingsRaster.dat as the building input file.
- Run GRAL for any scenario with buildings present.
- 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.
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:
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:
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.