| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(lib_common_type), | intent(in) | :: | common_data |
library data object |
||
| integer, | intent(inout), | allocatable | :: | excl_bands(:) | ||
| integer, | intent(in) | :: | istdout | |||
| integer, | intent(in) | :: | istderr | |||
| integer, | intent(out) | :: | ierr |
must be allocated with size >= num_excl_bands |
subroutine w90_get_excl_bands(common_data, excl_bands, istdout, istderr, ierr) use w90_error, only: w90_error_type, set_error_fatal implicit none integer, allocatable, intent(inout) :: excl_bands(:) integer, intent(in) :: istdout, istderr integer, intent(out) :: ierr !! must be allocated with size >= num_excl_bands type(lib_common_type), intent(in) :: common_data !! library data object type(w90_error_type), allocatable :: error ierr = 0 if (.not. allocated(excl_bands)) then call set_error_fatal(error, & 'Error: array argument excl_bands in get_excl_bands() call is not allocated', common_data%comm) call prterr(error, ierr, istdout, istderr, common_data%comm) return else if (.not. allocated(common_data%exclude_bands)) then call set_error_fatal(error, & 'Error: common_data%exclude_bands in get_excl_bands() call is not allocated', common_data%comm) call prterr(error, ierr, istdout, istderr, common_data%comm) return else if (size(excl_bands) < size(common_data%exclude_bands)) then call set_error_fatal(error, & 'Error: array argument excl_bands in get_excl_bands() call is incorrectly sized', common_data%comm) call prterr(error, ierr, istdout, istderr, common_data%comm) return else excl_bands(:) = common_data%exclude_bands(:) end if end subroutine w90_get_excl_bands