Skip to content

Commit

Permalink
Revert "Set target diagnostic grid based on boolean"
Browse files Browse the repository at this point in the history
This reverts commit 9abcb10.
  • Loading branch information
Andrew Shao committed Mar 11, 2020
1 parent 9abcb10 commit 3477bbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3250,13 +3250,13 @@ subroutine diag_update_remap_grids(diag_cs, alt_h, alt_T, alt_S, update_intensiv
if (update_intensive_local) then
do i=1, diag_cs%num_diag_coords
call diag_remap_update(diag_cs%diag_remap_cs(i), diag_cs%G, diag_cs%GV, diag_cs%US, h_diag, T_diag, S_diag, &
diag_cs%eqn_of_state, intensive=.true.)
diag_cs%eqn_of_state, diag_cs%diag_remap_cs(i)%h)
enddo
endif
if (update_extensive_local) then
do i=1, diag_cs%num_diag_coords
call diag_remap_update(diag_cs%diag_remap_cs(i), diag_cs%G, diag_cs%GV, diag_cs%US, h_diag, T_diag, S_diag, &
diag_cs%eqn_of_state, intensive=.false.)
diag_cs%eqn_of_state, diag_cs%diag_remap_cs(i)%h_extensive)
enddo
endif

Expand Down
12 changes: 2 additions & 10 deletions src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function diag_remap_axes_configured(remap_cs)
!! height or layer thicknesses changes. In the case of density-based
!! coordinates then technically we should also regenerate the
!! target grid whenever T/S change.
subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, intensive)
subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, h_target)
type(diag_remap_ctrl), intent(inout) :: remap_cs !< Diagnostic coordinate control structure
type(ocean_grid_type), pointer :: G !< The ocean's grid type
type(verticalGrid_type), intent(in ) :: GV !< ocean vertical grid structure
Expand All @@ -281,9 +281,7 @@ subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, intensi
real, dimension(:, :, :), intent(in ) :: T !< Temperatures used to construct new diagnostic grid
real, dimension(:, :, :), intent(in ) :: S !< Salinity used to construct new diagnostic grid
type(EOS_type), pointer :: eqn_of_state !< A pointer to the equation of state
logical, intent(in ) :: intensive !< If true, update the intensive diagnostic array

real, dimension(:,:,:), pointer :: h_target !< Where to store the new diagnostic array
real, dimension(:, :, :), intent(inout) :: h_target !< Where to store the new diagnostic array

! Local variables
real, dimension(remap_cs%nz + 1) :: zInterfaces
Expand Down Expand Up @@ -314,12 +312,6 @@ subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, intensi
remap_cs%initialized = .true.
endif

if (intensive) then
h_target => remap_cs%h
else
h_target => reamp_cs%h_extensive
endif

! Calculate remapping thicknesses for different target grids based on
! nominal/target interface locations. This happens for every call on the
! assumption that h, T, S has changed.
Expand Down

0 comments on commit 3477bbe

Please sign in to comment.