Skip to content

Commit

Permalink
Reorder dzRegrid diagnostic
Browse files Browse the repository at this point in the history
  Move the post_data call for dzRegrid to immediately follow its calculation in
regridding main.  All answers and diagnostics are bitwise identical, but because
this commit changes the order in which some diagnostics are posted, the TC
testing falsely reports a failure due to changed diagnostics.
  • Loading branch information
Hallberg-NOAA authored and adcroft committed Oct 20, 2022
1 parent 992f1c7 commit 37acb38
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/ALE/MOM_ALE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MOM_ALE

use MOM_debugging, only : check_column_integrals
use MOM_diag_mediator, only : register_diag_field, post_data, diag_ctrl
use MOM_diag_mediator, only : time_type, diag_update_remap_grids
use MOM_diag_mediator, only : time_type, diag_update_remap_grids, query_averaging_enabled
use MOM_diag_vkernels, only : interpolate_column, reintegrate_column
use MOM_domains, only : create_group_pass, do_group_pass, group_pass_type
use MOM_error_handler, only : MOM_error, FATAL, WARNING
Expand Down Expand Up @@ -491,14 +491,16 @@ subroutine ALE_main( G, GV, US, h, h_new, dzRegrid, u, v, tv, Reg, CS, OBC, dt,
call regridding_main( CS%remapCS, CS%regridCS, G, GV, h, tv, h_new, dzRegrid, &
frac_shelf_h=frac_shelf_h, PCM_cell=PCM_cell)

if (CS%id_dzRegrid>0) then ; if (query_averaging_enabled(CS%diag)) then
call post_data(CS%id_dzRegrid, dzRegrid, CS%diag, alt_h=h_new)
endif ; endif

if (showCallTree) call callTree_waypoint("new grid generated (ALE_main)")

! Remap all variables from the old grid h onto the new grid h_new
call remap_tracers(CS, G, GV, h, h_new, Reg, showCallTree, dt, PCM_cell=PCM_cell)
call remap_velocities(CS, G, GV, h, h_new, u, v, OBC, dzRegrid, debug=showCallTree, dt=dt)

if (CS%id_dzRegrid>0 .and. present(dt)) call post_data(CS%id_dzRegrid, dzRegrid, CS%diag, alt_h=h_new)

if (showCallTree) call callTree_leave("ALE_main()")

end subroutine ALE_main
Expand Down Expand Up @@ -535,14 +537,16 @@ subroutine ALE_main_offline( G, GV, h, h_new, dzRegrid, tv, Reg, CS, OBC, dt)
dzRegrid(:,:,:) = 0.0
call regridding_main( CS%remapCS, CS%regridCS, G, GV, h, tv, h_new, dzRegrid)

if (CS%id_dzRegrid>0) then ; if (query_averaging_enabled(CS%diag)) then
call post_data(CS%id_dzRegrid, dzRegrid, CS%diag, alt_h=h_new)
endif ; endif

if (showCallTree) call callTree_waypoint("new grid generated (ALE_main)")

! Remap all tracers from old grid h onto new grid h_new

call remap_tracers(CS, G, GV, h, h_new, Reg, debug=CS%show_call_tree, dt=dt)

if (CS%id_dzRegrid>0 .and. present(dt)) call post_data(CS%id_dzRegrid, dzRegrid, CS%diag, alt_h=h_new)

if (showCallTree) call callTree_leave("ALE_main_offline()")

end subroutine ALE_main_offline
Expand Down

0 comments on commit 37acb38

Please sign in to comment.