Skip to content

Commit

Permalink
feat: reproducer for bug 524
Browse files Browse the repository at this point in the history
NCAR#524

Run filter with a single observation
  • Loading branch information
hkershaw-brown committed Oct 30, 2024
1 parent e218864 commit a279136
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion models/mpas_atm/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4559,7 +4559,8 @@ subroutine convert_vert_distrib(state_handle, ens_size, location, obs_kind, ztyp
ztypein = nint(query_location(location(1), 'which_vert'))
if ((ztypein == ztypeout) .or. (ztypein == VERTISUNDEF)) then
istatus = 0
return
print*, "HK skipping early return ztypein == ztypeout == VERTISHIEGHT"
!return
else
if (debug > 9 .and. do_output()) then
write(string1,'(A,3X,2I3)') 'ztypein, ztypeout:',ztypein,ztypeout
Expand Down Expand Up @@ -4683,6 +4684,19 @@ subroutine convert_vert_distrib(state_handle, ens_size, location, obs_kind, ztyp
return
endif

print*, "HK location lon", llv_loc(1,:)
print*, "HK location lat", llv_loc(2,:)
print*, "HK location vert", llv_loc(3,:)


print*, "HK convert_vert_distrib k_low, k_up", k_low, k_up

print*, "HK zGridFace(k_low(i, :)", zGridFace(k_low(1, :), c(1))
print*, "HK zGridFace(k_up(i, :)", zGridFace(k_up(1, :), c(1))

print*, "HK zGridCenter(k_low(i, :)", zGridCenter(k_low(1, :), c(1))
print*, "HK zGridCenter(k_up(i, :)", zGridCenter(k_up(1, :), c(1))

fdata = 0.0_r8
do i = 1, n
where (istatus == 0)
Expand All @@ -4701,6 +4715,9 @@ subroutine convert_vert_distrib(state_handle, ens_size, location, obs_kind, ztyp
endif
enddo

print*, "HK zin(:) ", zin(:)
print*, "HK zout(:)", zout(:)

if (debug > 9 .and. do_output()) then
write(string2,'("zout_in_height [m] for member 1:",F10.2)') zout(1)
call error_handler(E_MSG, 'convert_vert_distrib',string2,source, revision, revdate)
Expand Down Expand Up @@ -5325,6 +5342,8 @@ subroutine find_vert_level(state_handle, ens_size, loc, nc, ids, oncenters, lowe
vert = llv(3)
verttype = nint(query_location(loc))

print*, "HK verttype", verttype

! these first 3 types need no cell/edge location information.
if ((debug > 9) .and. do_output()) then
write(string2,'("vert, which_vert:",3F20.12,I5)') lon,lat,vert,verttype
Expand Down

0 comments on commit a279136

Please sign in to comment.