This function returns the MPAS scalar index that corresponds to the given constituent index. In case of errors, zero is produced.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mpas_dynamical_core_type), | intent(in) | :: | self | |||
integer, | intent(in) | :: | constituent_index |
pure function dyn_mpas_map_mpas_scalar_index(self, constituent_index) result(mpas_scalar_index) class(mpas_dynamical_core_type), intent(in) :: self integer, intent(in) :: constituent_index integer :: mpas_scalar_index ! Catch segmentation fault. if (.not. allocated(self % index_constituent_to_mpas_scalar)) then mpas_scalar_index = 0 return end if if (constituent_index < lbound(self % index_constituent_to_mpas_scalar, 1) .or. & constituent_index > ubound(self % index_constituent_to_mpas_scalar, 1)) then mpas_scalar_index = 0 return end if mpas_scalar_index = self % index_constituent_to_mpas_scalar(constituent_index) end function dyn_mpas_map_mpas_scalar_index