Location
Source/ERF_Tagging.cpp:816-843
- Called from
Source/ERF_Tagging.cpp:349 and Source/ERF_Tagging.cpp:867
Problem
tag_on_distance_from_eye() sets every cell to either TagBox::SET or TagBox::CLEAR.
That means when storm/hurricane tracking runs, cells outside the tracking radius are forcibly cleared, including cel
ls that may already be tagged by other criteria (e.g., density, vorticity, user boxes). This breaks the expected uni
on-of-criteria behavior in AMR tagging.
Why this is a bug
Tagging from multiple criteria should be additive unless explicitly requested otherwise. Clearing in this helper int
roduces hidden criterion precedence and can drop required refinement unexpectedly.
Suggested patch
Only set tags inside the radius and do not clear outside it.
--- a/Source/ERF_Tagging.cpp
+++ b/Source/ERF_Tagging.cpp
@@
- if (dist < rad_tag) {
- tag_arr(i,j,k) = TagBox::SET;
- } else {
- tag_arr(i,j,k) = TagBox::CLEAR;
- }
+ if (dist < rad_tag) {
+ tag_arr(i,j,k) = TagBox::SET;
+ }
Location
Source/ERF_Tagging.cpp:816-843Source/ERF_Tagging.cpp:349andSource/ERF_Tagging.cpp:867Problem
tag_on_distance_from_eye()sets every cell to eitherTagBox::SETorTagBox::CLEAR.That means when storm/hurricane tracking runs, cells outside the tracking radius are forcibly cleared, including cel
ls that may already be tagged by other criteria (e.g., density, vorticity, user boxes). This breaks the expected uni
on-of-criteria behavior in AMR tagging.
Why this is a bug
Tagging from multiple criteria should be additive unless explicitly requested otherwise. Clearing in this helper int
roduces hidden criterion precedence and can drop required refinement unexpectedly.
Suggested patch
Only set tags inside the radius and do not clear outside it.