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

Trim WRF domain edges #484

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Trim WRF domain edges #484

merged 1 commit into from
Jan 9, 2025

Conversation

nicolejkeeney
Copy link
Collaborator

@nicolejkeeney nicolejkeeney commented Jan 9, 2025

Summary of changes and related issue

WRF domain was trimmed by 10 grid cells for every resolution.

Relevant motivation and context

WRF output needs to be trimmed, because data at the domain edges has weird numerical stuff going on and it takes some time to “relax” onto the domain’s grid.

Per an email conversation with Stefan: we recommend trimming ~10 grid points from the right, left, top, and bottom edges of each domain (d03, d02, and d01). Ideally there will be some investigation for the amount of trimming; this is our best guess right now.

This is what the code does, for 9 km resolution... you can see the untrimmed WRF data (blue) behind the trimmed WRF grid (coolwarm cmap data on top):

clipping

WE NEED TO UPDATE THE GUIDANCE BUT I DON'T THINK I'M THE RIGHT PERSON TO DO THAT

How to test

Try retrieving WRF data for the entire domain using climakitae. Make sure it works... and, just review the code using the diff comparison feature.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • None of the above

To-Do

  • Unit tests
    • Existing unit tests are passing
    • If relevant, new unit tests are written (required 80% unit test coverage)
  • Documentation
  • Naming conventions followed
    • Helper functions hidden with _ before the name
  • Any notebooks known to utilize the affected functions are still working
  • Black formatting has been utilized
  • Tagged/notified 2 reviewers for this PR

@nicolejkeeney nicolejkeeney changed the base branch from main to wind-rotation January 9, 2025 16:50
Copy link
Contributor

@vicford vicford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on monthly 45km data:

  • Confirmed that the x, y dimensions were trimmed appropriately
  • Confirmed that visualization also showed a trimmed domain

Copy link
Contributor

@elehmer elehmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me as well

Copy link
Contributor

@bethem bethem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@nicolejkeeney nicolejkeeney merged commit 5e73552 into wind-rotation Jan 9, 2025
5 checks passed
@nicolejkeeney nicolejkeeney deleted the wrf-domain-trimming branch January 9, 2025 23:31
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.

4 participants