Skip to content

Conversation

@magpowell
Copy link
Contributor

I'm proposing using the skipping boundary crossings in x and y as our compression algorithm over the previous manual one. Skipping boundary crossings in x and y works to "compress" the tilted field as the number of layers out is always equal to the number in. Rather than merge vertical layers from the top down, we only record values and create new path segments when a z boundary is crossed. This distributes the compression randomly throughout the column rather than starting at the top.

The key change is here:

--   if ((std::abs(l - lx) < epsilon) ||  (std::abs(l - ly) < epsilon) || ( (std::abs(l - lz) < epsilon || zp >= zh[k+1]))){
++   if ( (std::abs(l - lz) < epsilon || zp >= zh[k+1])){
            // Create a new path segment after crossing boundary
            tilted_path.push_back({i, j, k});
            dz_tilted.push_back(0.0);
}

image
It would skip the boundary crossings and values for the pixels highlighted. Those segments still count toward the path length of the previous value.

I was motivated to look into this after than errors we saw in the aerosol PR:
image

Now, with this change we don't have higher percent differences with the 3D direct surface field for some solar zenith angles:
image

In fact, the simplified TICA has lower errors overall for runs with and without aerosols. It also has the added benefits of:

  • simpler, more readable code (100s of lines fewer)
  • runs faster

Finally, the simplified TICA can be run for theta greater than 70 degrees, but percent absolute errors increase dramatically after ~75 degrees:
image

@magpowell magpowell closed this Apr 23, 2025
@magpowell magpowell deleted the tica_simple branch April 25, 2025 17:33
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

Successfully merging this pull request may close these issues.

1 participant