Skip to content

Convert a single point once per reference point on a moving nest - #322

Open
arpitjain099 wants to merge 1 commit into
NCAR:developfrom
arpitjain099:fix/moving-nest-scalar-latlon
Open

arpitjain099 wants to merge 1 commit into
NCAR:developfrom
arpitjain099:fix/moving-nest-scalar-latlon

Conversation

@arpitjain099

Copy link
Copy Markdown

On a moving nest _get_proj_params returns one reference point per time, but the scalar branch of ll_to_xy and xy_to_ll handed the whole ref_lat array to the Fortran routine, which only uses the first element. So ll_to_xy(f, 33.0, -98.0, timeidx=ALL_TIMES) answers for the first time only, while ll_to_xy(f, [33.0], [-98.0], timeidx=ALL_TIMES) answers for all of them. This loops over the reference points the way the sequence branch already does, and indexing ref_lat[0] in the single-reference case also clears a numpy "ndim > 0 to a scalar" DeprecationWarning. Non-moving results are unchanged and the CI tests pass. Added a check to test_proj_params.py.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
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