Skip to content

Commit

Permalink
Optimize pressure-level-extrapolation coarsening for physics diagnost…
Browse files Browse the repository at this point in the history
…ics (#378)

We do not need to compute the blending weights under this coarsening strategy.
This should not change answers, but should make things slightly more
efficient.
  • Loading branch information
spencerkclark authored Aug 22, 2023
1 parent 93ed365 commit b379330
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions FV3/io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,8 @@ subroutine send_diag_manager_controlled_diagnostic_data(Time, Diag, Atm_block, I
allocate(masked_area(nx, ny, levs))
extrapolate = trim(coarsening_strategy) .eq. PRESSURE_LEVEL_EXTRAPOLATE
call get_area(Atm_block, IPD_Data, nx, ny, area)
if (trim(coarsening_strategy) .eq. PRESSURE_LEVEL) then
if (trim(coarsening_strategy) .eq. PRESSURE_LEVEL .or. &
trim(coarsening_strategy) .eq. PRESSURE_LEVEL_EXTRAPOLATE) then
call vertical_remapping_requirements(delp, area, ptop, phalf, phalf_coarse_on_fine)
else
call get_coarse_array_bounds(is_coarse, ie_coarse, js_coarse, je_coarse)
Expand Down Expand Up @@ -3168,7 +3169,8 @@ subroutine fv3gfs_diag_output(time, diag, atm_block, IPD_Data, nx, ny, levs, ntc
allocate(masked_area(nx, ny, levs))
extrapolate = trim(coarsening_strategy) .eq. PRESSURE_LEVEL_EXTRAPOLATE
call get_area(Atm_block, IPD_Data, nx, ny, area)
if (trim(coarsening_strategy) .eq. PRESSURE_LEVEL) then
if (trim(coarsening_strategy) .eq. PRESSURE_LEVEL .or. &
trim(coarsening_strategy) .eq. PRESSURE_LEVEL_EXTRAPOLATE) then
call vertical_remapping_requirements(delp, area, ptop, phalf, phalf_coarse_on_fine)
else
call get_coarse_array_bounds(is_coarse, ie_coarse, js_coarse, je_coarse)
Expand Down

0 comments on commit b379330

Please sign in to comment.