NCAR / NCAR/wrf-python

Add a function to check if lat/lon points are within the WRF domain

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
498
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Had a user on ncl-talk try to use wrf_user_ll_to_ij to check if observations are within the WRF domain. The current ll_to_xy routines are simple lat/lon to x/y converters that don't care what the domain size is. A new function should be created to add a check to see if the points are outside of the domain bounds. Not sure how the return should be -- either an array of booleans, or sequences of values for in and out of domain. The boolean way seems to be the more common way of doing this in NCL and numpy, and will work with masking.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing wrf_user_ll_to_ij and ll_to_xy routines to understand their coordinate conversion and domain handling. Define the behavior for points inside and outside the WRF domain, including the return shape, then verify that both cases are represented by the resulting check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.