FMS
2024.03
Flexible Modeling System
|
fms_diag_bbox_mod defines classes encapsulating bounding boxes and interval bounds. More...
Data Types | |
type | fmsdiagboundshalos_type |
Data structure holding starting and ending indices in the I, J, and K dimensions. It also has extra members related to halo sizes and updated indices in I and J dimensions. More... | |
Functions/Subroutines | |
logical pure function, public | determine_if_block_is_in_region (subregion_start, subregion_end, bounds, dim) |
The PEs grid points are divided further into "blocks". This function determines if a block. More... | |
procedure | get_fie |
pure integer function | get_fie (this) |
Gets the updated index ‘fie’ of fmsDiagBoundsHalos_type in the I dimension. More... | |
procedure | get_fis |
pure integer function | get_fis (this) |
Gets the updated index ‘fis’ of fmsDiagBoundsHalos_type in the I dimension. More... | |
procedure | get_fje |
pure integer function | get_fje (this) |
Gets the updated index ‘fje’ of fmsDiagBoundsHalos_type in the I dimension. More... | |
procedure | get_fjs |
pure integer function | get_fjs (this) |
Gets the updated index ‘fjs’ of fmsDiagBoundsHalos_type in the I dimension. More... | |
procedure | get_hi |
pure integer function | get_hi (this) |
Gets the halo size of fmsDiagBoundsHalos_type in the I dimension. More... | |
procedure | get_hj |
pure integer function | get_hj (this) |
Gets the halo size of fmsDiagBoundsHalos_type in the J dimension. More... | |
procedure | get_imax |
pure integer function | get_imax (this) |
Gets imax of fmsDiagIbounds_type. More... | |
procedure | get_imin |
pure integer function | get_imin (this) |
Gets imin of fmsDiagIbounds_type. More... | |
procedure | get_jmax |
pure integer function | get_jmax (this) |
Gets jmax of fmsDiagIbounds_type. More... | |
procedure | get_jmin |
pure integer function | get_jmin (this) |
Gets jmin of fmsDiagIbounds_type. More... | |
procedure | get_kmax |
pure integer function | get_kmax (this) |
Gets kmax of fmsDiagIbounds_type. More... | |
procedure | get_kmin |
pure integer function | get_kmin (this) |
Gets kmin of fmsDiagIbounds_type. More... | |
procedure | rebase_input |
subroutine | rebase_input (bounds_in, bounds, starting, ending, dim) |
Rebase the input bounds for a given dimension based on the starting and ending indices of a subregion. This is for when blocking is used. More... | |
procedure | rebase_output |
subroutine | rebase_output (bounds_out, starting, ending, dim) |
Rebase the ouput bounds for a given dimension based on the starting and ending indices of a subregion. This is for when blocking is used. More... | |
logical function, public | recondition_indices (indices, field, is_in, js_in, ks_in, ie_in, je_in, ke_in, err_msg) |
Updates indices based on presence/absence of input indices is, js, ks, ie, je, and ke. More... | |
procedure | reset => reset_bounds |
subroutine | reset_bounds (this, lower_val, upper_val) |
Reset the instance bounding lower and upper bounds to lower_val and upper_val, respectively. More... | |
procedure | reset_bounds_from_array_4d |
subroutine | reset_bounds_from_array_4d (this, array) |
Reset the instance bounding box with the bounds determined from the first three dimensions of the 5D "array" argument. More... | |
procedure | reset_bounds_from_array_5d |
subroutine | reset_bounds_from_array_5d (this, array) |
Reset the instance bounding box with the bounds determined from the first three dimensions of the 5D "array" argument. More... | |
procedure | set_bounds |
character(len=150) function | set_bounds (this, field_data, lower_i, upper_i, lower_j, upper_j, lower_k, upper_k, has_halos) |
Sets the bounds of a bounding region. More... | |
procedure | update_bounds |
subroutine | update_bounds (this, lower_i, upper_i, lower_j, upper_j, lower_k, upper_k) |
Update the the first three (normally x, y, and z) min and max boundaries (array indices) of the instance bounding box the six specified bounds values. More... | |
procedure | update_index |
subroutine | update_index (this, starting_index, ending_index, dim, ignore_halos) |
Updates the starting and ending index of a given dimension. More... | |
Variables | |
type(fmsdiagibounds_type) | bounds3d |
Holds starting and ending indices of the I, J, and K dimensions. | |
integer | fie |
Updated ending index in the I dimension. | |
integer | fis |
Updated starting index in the I dimension. | |
integer | fje |
Updated ending index in the J dimension. | |
integer | fjs |
Updated starting index in the J dimension. | |
logical | has_halos |
.True. if the buffer has halos | |
integer | hi |
Halo size in the I dimension. | |
integer | hj |
Halo size in the J dimension. | |
integer | imax |
Upper i bound. | |
integer | imin |
Lower i bound. | |
integer | jmax |
Upper j bound. | |
integer | jmin |
Lower j bound. | |
integer | kmax |
Upper k bound. | |
integer | kmin |
Lower k bound. | |
integer | nhalo_i |
Number of halos in i. | |
integer | nhalo_j |
Number of halos in j. | |
integer, parameter | xdimension = 1 |
Parameter defining the x dimension. | |
integer, parameter | ydimension = 2 |
Parameter defining the y dimension. | |
integer, parameter | zdimension = 3 |
Parameter defininf the z dimension. | |
fms_diag_bbox_mod defines classes encapsulating bounding boxes and interval bounds.
type fms_diag_bbox_mod::fmsdiagboundshalos_type |
Data structure holding starting and ending indices in the I, J, and K dimensions. It also has extra members related to halo sizes and updated indices in I and J dimensions.
Definition at line 71 of file fms_diag_bbox.F90.
Public Member Functions | |
procedure | get_fie |
procedure | get_fis |
procedure | get_fje |
procedure | get_fjs |
procedure | get_hi |
procedure | get_hj |
Public Attributes | |
type(fmsdiagibounds_type) | bounds3d |
Holds starting and ending indices of the I, J, and K dimensions. | |
integer | fie |
Updated ending index in the I dimension. | |
integer | fis |
Updated starting index in the I dimension. | |
integer | fje |
Updated ending index in the J dimension. | |
integer | fjs |
Updated starting index in the J dimension. | |
integer | hi |
Halo size in the I dimension. | |
integer | hj |
Halo size in the J dimension. | |
logical pure function, public fms_diag_bbox_mod::determine_if_block_is_in_region | ( | integer, intent(in) | subregion_start, |
integer, intent(in) | subregion_end, | ||
type(fmsdiagibounds_type), intent(in) | bounds, | ||
integer, intent(in) | dim | ||
) |
The PEs grid points are divided further into "blocks". This function determines if a block.
[in] | subregion_start | Begining of the subregion |
[in] | subregion_end | Ending of the subregion |
[in] | bounds | Starting and ending of the subregion |
[in] | dim | Dimension to check |
Definition at line 101 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_fie | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the updated index ‘fie’ of fmsDiagBoundsHalos_type in the I dimension.
[in] | this | Calling object |
Definition at line 237 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_fis | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the updated index ‘fis’ of fmsDiagBoundsHalos_type in the I dimension.
[in] | this | Calling object |
Definition at line 230 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_fje | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the updated index ‘fje’ of fmsDiagBoundsHalos_type in the I dimension.
[in] | this | Calling object |
Definition at line 251 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_fjs | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the updated index ‘fjs’ of fmsDiagBoundsHalos_type in the I dimension.
[in] | this | Calling object |
Definition at line 244 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_hi | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the halo size of fmsDiagBoundsHalos_type in the I dimension.
[in] | this | Calling object |
Definition at line 216 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_hj | ( | class (fmsdiagboundshalos_type), intent(in) | this | ) |
Gets the halo size of fmsDiagBoundsHalos_type in the J dimension.
[in] | this | Calling object |
Definition at line 223 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_imax | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets imax of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 145 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_imin | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets imin of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 138 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_jmax | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets jmax of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 159 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_jmin | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets jmin of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 152 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_kmax | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets kmax of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 174 of file fms_diag_bbox.F90.
pure integer function fms_diag_bbox_mod::get_kmin | ( | class (fmsdiagibounds_type), intent(in) | this | ) |
Gets kmin of fmsDiagIbounds_type.
[in] | this | The !< ibounds instance |
Definition at line 167 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::rebase_input | ( | class (fmsdiagibounds_type), intent(inout) | bounds_in, |
class (fmsdiagibounds_type), intent(in) | bounds, | ||
integer, intent(in) | starting, | ||
integer, intent(in) | ending, | ||
integer, intent(in) | dim | ||
) |
Rebase the input bounds for a given dimension based on the starting and ending indices of a subregion. This is for when blocking is used.
[in,out] | bounds_in | Bounds to rebase |
[in] | bounds | Original indices (i.e is_in, ie_in, passed into diag_manager) |
[in] | starting | Starting index of the dimension |
[in] | ending | Ending index of the dimension |
[in] | dim | Dimension to update |
The starting index is going to be either "starting" if only a section of the block is in the subregion or starting-boundsimin+1 if the whole section of the block is in the subregion.
The ending index is going to be either bounds_out%[]max if the whole section of the block is in the subregion or bounds%[]min + size of the subregion if only a section of the block is in the susbregion
Definition at line 497 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::rebase_output | ( | class (fmsdiagibounds_type), intent(inout) | bounds_out, |
integer, intent(in) | starting, | ||
integer, intent(in) | ending, | ||
integer, intent(in) | dim | ||
) |
Rebase the ouput bounds for a given dimension based on the starting and ending indices of a subregion. This is for when blocking is used.
[in,out] | bounds_out | Bounds to rebase |
[in] | starting | Starting index of the dimension |
[in] | ending | Ending index of the dimension |
[in] | dim | Dimension to update |
The starting index is going to be either "starting" if only a section of the block is in the subregion or bounds_out%[]min if the whole section of the block is in the subregion. The -starting+1 s needed so that indices start as 1 since the output buffer has indices 1:size of a subregion
The ending index is going to be either bounds_out%[]max if the whole section of the block is in the subregion or bounds_out%[]min + size of the subregion if only a section of the block is in the susbregion
Definition at line 468 of file fms_diag_bbox.F90.
logical function, public fms_diag_bbox_mod::recondition_indices | ( | type(fmsdiagboundshalos_type), intent(inout) | indices, |
class(*), dimension(:,:,:,:), intent(in) | field, | ||
integer, intent(in), optional | is_in, | ||
integer, intent(in), optional | js_in, | ||
integer, intent(in), optional | ks_in, | ||
integer, intent(in), optional | ie_in, | ||
integer, intent(in), optional | je_in, | ||
integer, intent(in), optional | ke_in, | ||
character(len=*), intent(out), optional | err_msg | ||
) |
Updates indices based on presence/absence of input indices is, js, ks, ie, je, and ke.
[in,out] | indices | Stores indices in order: (/is, js, ks, ie, je, ke, hi, fis, fie, hj, fjs, fje/) |
[in] | field | Dummy variable; only the sizes of the first 3 dimensions are used |
[in] | ke_in | User input indices |
[out] | err_msg | Error message to pass back to caller |
Definition at line 379 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::reset_bounds | ( | class (fmsdiagibounds_type), intent(inout), target | this, |
integer, intent(in) | lower_val, | ||
integer, intent(in) | upper_val | ||
) |
Reset the instance bounding lower and upper bounds to lower_val and upper_val, respectively.
[in,out] | this | ibounds instance |
[in] | lower_val | value for the lower bounds in each dimension |
[in] | upper_val | value for the upper bounds in each dimension |
Definition at line 257 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::reset_bounds_from_array_4d | ( | class (fmsdiagibounds_type), intent(inout) | this, |
class(*), dimension(:,:,:,:), intent(in) | array | ||
) |
Reset the instance bounding box with the bounds determined from the first three dimensions of the 5D "array" argument.
[in,out] | this | The instance of the bounding box. |
[in] | array | The 4D input array. |
Definition at line 347 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::reset_bounds_from_array_5d | ( | class (fmsdiagibounds_type), intent(inout) | this, |
class(*), dimension(:,:,:,:,:), intent(in) | array | ||
) |
Reset the instance bounding box with the bounds determined from the first three dimensions of the 5D "array" argument.
[in,out] | this | The instance of the bounding box. |
[in] | array | The 5D input array. |
Definition at line 364 of file fms_diag_bbox.F90.
character(len=150) function fms_diag_bbox_mod::set_bounds | ( | class (fmsdiagibounds_type), intent(inout) | this, |
class(*), dimension(:,:,:,:), intent(in) | field_data, | ||
integer, intent(in) | lower_i, | ||
integer, intent(in) | upper_i, | ||
integer, intent(in) | lower_j, | ||
integer, intent(in) | upper_j, | ||
integer, intent(in) | lower_k, | ||
integer, intent(in) | upper_k, | ||
logical, intent(in) | has_halos | ||
) |
Sets the bounds of a bounding region.
[in,out] | this | The bounding box of the field |
[in] | field_data | Field data |
[in] | lower_i | Lower i bound. |
[in] | upper_i | Upper i bound. |
[in] | lower_j | Lower j bound. |
[in] | upper_j | Upper j bound. |
[in] | lower_k | Lower k bound. |
[in] | upper_k | Upper k bound. |
[in] | has_halos | .true. if the field has halos |
Definition at line 290 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::update_bounds | ( | class (fmsdiagibounds_type), intent(inout) | this, |
integer, intent(in) | lower_i, | ||
integer, intent(in) | upper_i, | ||
integer, intent(in) | lower_j, | ||
integer, intent(in) | upper_j, | ||
integer, intent(in) | lower_k, | ||
integer, intent(in) | upper_k | ||
) |
Update the the first three (normally x, y, and z) min and max boundaries (array indices) of the instance bounding box the six specified bounds values.
[in,out] | this | The bounding box of the output field buffer inindex space. |
[in] | lower_i | Lower i bound. |
[in] | upper_i | Upper i bound. |
[in] | lower_j | Lower j bound. |
[in] | upper_j | Upper j bound. |
[in] | lower_k | Lower k bound. |
[in] | upper_k | Upper k bound. |
Definition at line 272 of file fms_diag_bbox.F90.
subroutine fms_diag_bbox_mod::update_index | ( | class (fmsdiagibounds_type), intent(inout) | this, |
integer, intent(in) | starting_index, | ||
integer, intent(in) | ending_index, | ||
integer, intent(in) | dim, | ||
logical, intent(in) | ignore_halos | ||
) |
Updates the starting and ending index of a given dimension.
[in,out] | this | The bounding box to update |
[in] | starting_index | Starting index to update to |
[in] | ending_index | Ending index to update to |
[in] | dim | Dimension to update |
[in] | ignore_halos | If .true. halos will be ignored i.e output buffers can ignore halos as they do not get updates. The indices of the Input buffers need to add the number of halos so math is done only on the compute domain |
Definition at line 180 of file fms_diag_bbox.F90.