Skip to content

Commit

Permalink
Fix bug in extrapolation of RH below the surface for MPAS-Atmosphere
Browse files Browse the repository at this point in the history
The change to a constant extrapolation of RH below the surface in
commit 21d4043 crucially depends on levels being processed from top
to bottom, so that a given level can refer to the level above.

This commit corrects the vertical level loop used in the vertical
interpolation of RH, so that levels are processed top to bottom.
  • Loading branch information
mgduda committed Nov 24, 2014
1 parent 4aa04e2 commit b1dd0ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core_init_atmosphere/mpas_init_atm_cases.F
Original file line number Diff line number Diff line change
Expand Up @@ -4004,7 +4004,7 @@ subroutine init_atm_case_gfs(block, mesh, nCells, nEdges, nVertLevels, fg, state
sorted_arr(2,k) = rh_fg(k,iCell)
end do
call mpas_quicksort(nfglevels_actual, sorted_arr)
do k=1,nVertLevels
do k=nVertLevels,1,-1
target_z = 0.5 * (zgrid(k,iCell) + zgrid(k+1,iCell))
! scalars(index_qv,k,iCell) = vertical_interp(target_z, nfglevels_actual, sorted_arr, order=1, extrap=0)
scalars(index_qv,k,iCell) = vertical_interp(target_z, nfglevels_actual-1, &
Expand Down

0 comments on commit b1dd0ca

Please sign in to comment.