Skip to content

Commit

Permalink
Merge branch 'v8_add_1.6_ln_p_diag_interp' into develop (PR #1042)
Browse files Browse the repository at this point in the history
This merge updates the isobaric height diagnostic to vertically interpolate
linearly in ln(p) rather than linearly in p.

The isobaric height diagnostic interpolated pressure as a function of height to
the w points to later interpolate height to pressure levels. This introduces a
low bias in the diagnosed height fields. Interpolating ln(p) to the w levels
alleviates this bias.
  • Loading branch information
mgduda committed Jun 1, 2023
2 parents 46d3e3c + d10136c commit c4d0eaa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core_atmosphere/diagnostics/mpas_isobaric_diagnostics.F
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,10 @@ subroutine interp_diagnostics(mesh, state, time_lev, diag)
do iCell = 1, nCells
w1 = (height(k,iCell)-height(k-1,iCell)) / (height(k+1,iCell)-height(k-1,iCell))
w2 = (height(k+1,iCell)-height(k,iCell)) / (height(k+1,iCell)-height(k-1,iCell))
pressure2(k,iCell) = w1*pressure(k,iCell) + w2*pressure(k-1,iCell)
! pressure2(k,iCell) = w1*pressure(k,iCell) + w2*pressure(k-1,iCell)
!
! switch to use ln(pressure) for more accurate vertical interpolation, WCS 20230407
pressure2(k,iCell) = exp(w1*log(pressure(k,iCell))+w2*log(pressure(k-1,iCell)))
enddo
enddo
k = 1
Expand All @@ -618,7 +621,10 @@ subroutine interp_diagnostics(mesh, state, time_lev, diag)
z2 = 0.5*(height(k+1,iCell)+height(k+2,iCell))
w1 = (z0-z2)/(z1-z2)
w2 = 1.-w1
pressure2(k,iCell) = w1*pressure(k,iCell)+w2*pressure(k+1,iCell)
! pressure2(k,iCell) = w1*pressure(k,iCell)+w2*pressure(k+1,iCell)
!
! switch to use ln(pressure) for more accurate vertical interpolation, WCS 20230407
pressure2(k,iCell) = exp(w1*log(pressure(k,iCell))+w2*log(pressure(k+1,iCell)))
enddo

!calculation of total pressure at cell vertices (at mass points):
Expand Down

0 comments on commit c4d0eaa

Please sign in to comment.