build_mesa_zones Subroutine

private subroutine build_mesa_zones(mt, nz, cnv)

Build convection zones of record from MESA mixing codes, mapped by type_char.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: mt(:)

MESA mixing code of each cell, centre to surface.

integer(kind=int32), intent(in) :: nz

Number of cells.

type(convtype), intent(inout) :: cnv

Record receiving zones.


Source Code

   subroutine build_mesa_zones(mt, nz, cnv)
      !! Build convection zones of record from MESA mixing codes, mapped by `type_char`.
      ! Arguments
      integer(int32), intent(in) :: mt(:)
         !! MESA mixing code of each cell, centre to surface.
      integer(int32), intent(in) :: nz
         !! Number of cells.
      type(convtype), intent(inout) :: cnv
         !! Record receiving zones.
      integer(int32) :: k
      character(len=1), allocatable :: zones(:)

      allocate (zones(nz))
      do k = 1, nz
         zones(k) = type_char(mt(k))
      end do
      call build_zones(zones, nz, cnv)
      deallocate (zones)
   end subroutine build_mesa_zones