get_wrf_ptr Subroutine

private subroutine get_wrf_ptr(self, region_id, wrf_ptr)

Type Bound

type_material_manager

Arguments

Type IntentOptional Attributes Name
class(type_material_manager), intent(inout), target :: self
integer(kind=int32), intent(in) :: region_id
class(abst_wrf), intent(inout), pointer :: wrf_ptr

Called by

proc~~get_wrf_ptr~~CalledByGraph proc~get_wrf_ptr type_material_manager%get_wrf_ptr none~get_wrf type_material_manager%get_wrf none~get_wrf->proc~get_wrf_ptr proc~calculate_heat_capacity_holder calculate_heat_capacity_holder proc~calculate_heat_capacity_holder->none~get_wrf proc~calculate_heat_capacity_ptr calculate_heat_capacity_ptr proc~calculate_heat_capacity_ptr->none~get_wrf proc~calculate_water_content_holder calculate_water_content_holder proc~calculate_water_content_holder->none~get_wrf proc~calculate_water_content_ptr calculate_water_content_ptr proc~calculate_water_content_ptr->none~get_wrf

Source Code

    subroutine get_wrf_ptr(self, region_id, wrf_ptr)
        class(type_material_manager), intent(inout), target :: self
        integer(int32), intent(in) :: region_id
        class(abst_wrf), intent(inout), pointer :: wrf_ptr
        integer(int32) :: model_index

        model_index = self%region_id_map(region_id)

        if (model_index == 0) then
            print *, "Error: Invalid region_id in get_wrf_ptr:", region_id
            nullify (wrf_ptr)
            call exit(-1)
        end if

        wrf_ptr => self%wrf(model_index)%p

    end subroutine get_wrf_ptr