draw_convection Subroutine

private subroutine draw_convection()

Draw convection zones as hatched regions, after Alex Heger's convplot.

Bands come from greedy per-type tracer (tracer_step), not one rectangle per model and zone. All visible bands of a type fill as one keyholed polygon, so giza computes hatch once and it stays aligned across models and band seams. Outline stroked separately in type colour (as convplot's PathPatch edge) from cached exact-edge chains, which exclude tracer seams at merges and splits.

Arguments

None

Source Code

   subroutine draw_convection()
      !! Draw convection zones as hatched regions, after Alex Heger's convplot.
      !!
      !! Bands come from greedy per-type tracer (`tracer_step`), not one rectangle per model and
      !! zone. All visible bands of a type fill as one keyholed polygon, so giza computes hatch once
      !! and it stays aligned across models and band seams. Outline stroked separately in type
      !! colour (as convplot's PathPatch edge) from cached exact-edge chains, which exclude tracer
      !! seams at merges and splits.
      integer(int32) :: t
      if (.not. conv_valid) call build_conv_cache()
      call giza_set_line_width(1.d0)
      do t = 1, NCONVTYPES
         if (conv_bands(t)%nb == 0) cycle
         call giza_set_colour_index(CI_TYPE(t))
         call set_hatch_for_type(t)
         call fill_bandset_linked(conv_bands(t))
         call draw_chainset(conv_chains(t))
      end do
   end subroutine draw_convection