Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
- Rename `h_dest` to `h_target` in routine and in signature
- Remove extraneous logic
  • Loading branch information
Andrew Shao committed Mar 17, 2020
1 parent 3a3a102 commit e23f03c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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 @@ -1506,7 +1506,7 @@ subroutine post_data_3d(diag_field_id, field, diag_cs, is_static, mask, alt_h)
allocate(remapped_field(size(field,1), size(field,2), diag%axes%nz))
call vertically_reintegrate_diag_field( &
diag_cs%diag_remap_cs(diag%axes%vertical_coordinate_number), diag_cs%G, &
diag_cs%h_extensive,
diag_cs%h_begin, &
diag_cs%diag_remap_cs(diag%axes%vertical_coordinate_number)%h_extensive, &
staggered_in_x, staggered_in_y, diag%axes%mask3d, diag_cs%missing_value, &
field, remapped_field)
Expand Down Expand Up @@ -3258,7 +3258,7 @@ subroutine diag_update_remap_grids(diag_cs, alt_h, alt_T, alt_S, update_intensiv
enddo
endif
if (update_extensive_local) then
CS%h_begin(:,:,:) = CS%h(:,:,:)
diag_cs%h_begin(:,:,:) = diag_cs%h(:,:,:)
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, diag_cs%diag_remap_cs(i)%h_extensive)
Expand Down
12 changes: 3 additions & 9 deletions src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,6 @@ subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, h_targe
remap_cs%initialized = .true.
endif

if (intensive) then
h_target => remap_cs%h
else
h_target => remap_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 Expand Up @@ -493,11 +487,11 @@ subroutine diag_remap_calc_hmask(remap_cs, G, mask)
end subroutine diag_remap_calc_hmask

!> Vertically re-grid an already vertically-integrated diagnostic field to alternative vertical grid.
subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_dest, staggered_in_x, staggered_in_y, &
subroutine vertically_reintegrate_diag_field(remap_cs, G, h, h_target, staggered_in_x, staggered_in_y, &
mask, missing_value, field, reintegrated_field)
type(diag_remap_ctrl), intent(in) :: remap_cs !< Diagnostic coodinate control structure
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
real, dimension(:,:,:), intent(in) :: h !< The thicknesses of the source grid
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
real, dimension(:,:,:), intent(in) :: h !< The thicknesses of the source grid
real, dimension(:,:,:), intent(in) :: h_target !< The thicknesses of the target grid
logical, intent(in) :: staggered_in_x !< True is the x-axis location is at u or q points
logical, intent(in) :: staggered_in_y !< True is the y-axis location is at v or q points
Expand Down

0 comments on commit e23f03c

Please sign in to comment.