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

Implementation of terrain grid with STF smoothing #1368

Closed
ewquon opened this issue Jan 9, 2024 · 5 comments
Closed

Implementation of terrain grid with STF smoothing #1368

ewquon opened this issue Jan 9, 2024 · 5 comments

Comments

@ewquon
Copy link
Contributor

ewquon commented Jan 9, 2024

Real z_H = 2.44/(1-gamma_m);
Real A;
Real foo = cos((PI/2)*(zz/z_H));
if(zz < z_H) { A = foo*foo*foo*foo*foo*foo; } // A controls rate of return to atm
else { A = 0; }

Appears to follow Eqns 11 and 9 from Klemp 2011 (https://journals.ametsoc.org/view/journals/mwre/139/7/mwr-d-10-05046.1.xml), respectively. However, line 205 is missing any dependence on the actual terrain, i.e., the maximum terrain height (max_h).

@AMLattanzi
Copy link
Collaborator

@ewquon I agree with your findings and will test this modification on the WOA problem to verify it generates an appropriate grid.

@AMLattanzi
Copy link
Collaborator

Original code (left) compared to the suggested modification (right). Not a large change in the constructed grid but the code will be modified for consistency with the reference source.
image

@ewquon
Copy link
Contributor Author

ewquon commented Jan 10, 2024

I imagined you'd see a larger difference if you, say, doubled the height of the hill.

@AMLattanzi
Copy link
Collaborator

See PR 1377 where correction was made.

@ewquon
Copy link
Contributor Author

ewquon commented Sep 17, 2024

Fixed in #1807, including divide by 0 handling (encountered when STF smoothing is applied with flat terrain)

@ewquon ewquon closed this as completed Sep 17, 2024
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

2 participants