Skip to content

Commit

Permalink
Update fms_diag_bbox.F90
Browse files Browse the repository at this point in the history
Public member _bounds3D_ of the fmsDiagBoundsHalos_type is changed to private and adds a getter function _get_bounds3D_ to access the memter.
  • Loading branch information
ganganoaa authored Jul 24, 2023
1 parent 4a5ad15 commit 731486b
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions diag_manager/fms_diag_bbox.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MODULE fms_diag_bbox_mod
!! in I and J dimensions.
type, public :: fmsDiagBoundsHalos_type
private
type(fmsDiagIbounds_type), public :: bounds3D !< Holds starting and ending indices of
type(fmsDiagIbounds_type) :: bounds3D !< Holds starting and ending indices of
!! the I, J, and K dimensions
integer :: hi !< Halo size in the I dimension
integer :: hj !< Halo size in the J dimension
Expand All @@ -82,6 +82,7 @@ MODULE fms_diag_bbox_mod
procedure :: get_fie
procedure :: get_fjs
procedure :: get_fje
procedure :: get_bounds3D
end type fmsDiagBoundsHalos_type

public :: recondition_indices
Expand Down Expand Up @@ -175,34 +176,42 @@ pure integer function get_hj (this) result(rslt)
rslt = this%hj
end function get_hj

!> @brief Gets the updated index `fis' of fmsDiagBoundsHalos_type in the I dimension
!> @brief Gets the updated starting index `fis' of fmsDiagBoundsHalos_type in the I dimension
!! @return copy of integer member `fis'
pure integer function get_fis (this) result(rslt)
class (fmsDiagBoundsHalos_type), intent(in) :: this !< Calling object
rslt = this%fis
end function get_fis

!> @brief Gets the updated index `fie' of fmsDiagBoundsHalos_type in the I dimension
!> @brief Gets the updated ending index `fie' of fmsDiagBoundsHalos_type in the I dimension
!! @return copy of integer member `fie'
pure integer function get_fie (this) result(rslt)
class (fmsDiagBoundsHalos_type), intent(in) :: this !< Calling object
rslt = this%fie
end function get_fie

!> @brief Gets the updated index `fjs' of fmsDiagBoundsHalos_type in the I dimension
!> @brief Gets the updated starting index `fjs' of fmsDiagBoundsHalos_type in the J dimension
!! @return copy of integer member `fjs'
pure integer function get_fjs (this) result(rslt)
class (fmsDiagBoundsHalos_type), intent(in) :: this !< Calling object
rslt = this%fjs
end function get_fjs

!> @brief Gets the updated index `fje' of fmsDiagBoundsHalos_type in the I dimension
!> @brief Gets the updated ending index `fje' of fmsDiagBoundsHalos_type in the J dimension
!! @return copy of integer member `fje'
pure integer function get_fje (this) result(rslt)
class (fmsDiagBoundsHalos_type), intent(in) :: this !< Calling object
rslt = this%fje
end function get_fje

!> @brief Gets a member of fmsDiagIbounds_type, `bounds3D`, of calling fmsDiagBoundsHalos_type object.
!! @return Returns a copy of fmsDiagIbounds_type member `bounds3D`
pure function get_bounds3D(this) result(bounds_obj)
class(fmsDiagBoundsHalos_type), intent(in) :: this !< Calling object
type(fmsDiagIbounds_type) :: bounds_obj !< Object copy to return
bounds_obj = this%bounds3D
end function

!> @brief Reset the instance bounding lower and upper bounds to lower_val and upper_val, respectively.
SUBROUTINE reset_bounds (this, lower_val, upper_val)
class (fmsDiagIbounds_type), target, intent(inout) :: this !< ibounds instance
Expand Down

0 comments on commit 731486b

Please sign in to comment.