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

bug-fix: get_dist calculation for observations with VERTISUNDEF in WRF #510

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions models/wrf/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6403,6 +6403,13 @@ subroutine get_close(gc, base_loc, base_type, locs, loc_qtys, &
local_loc = locs(t_ind)
local_which = nint(query_location(local_loc))

if (present(dist)) then
if (local_which == VERTISUNDEF) then
dist(k) = get_dist(base_loc, local_loc, base_type, loc_qtys(t_ind))
cycle
endif
endif

! Convert local vertical coordinate to requested vertical coordinate if necessary.
! This should only be necessary for obs priors, as state location information already
! contains the correct vertical coordinate (filter_assim's call to get_state_meta_data).
Expand Down