cavity_fill_cover_frac Subroutine

public pure subroutine cavity_fill_cover_frac(cover_frac, z_draft, nx, ny)

v1 ice-cover fraction: BINARY, 1 wherever there is any draft. An area-blended calving front (a partially covered cell) is a melt-physics decision, not a geometry one, so it is deliberately left for the slice that needs it — the field exists now only so that slice does not have to re-open the metrics lifecycle.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(out) :: cover_frac(nx,ny)
real(kind=wp), intent(in) :: z_draft(nx,ny)
integer, intent(in) :: nx
integer, intent(in) :: ny

Called by

proc~~cavity_fill_cover_frac~~CalledByGraph proc~cavity_fill_cover_frac cavity_fill_cover_frac proc~seed_cavity_draft seed_cavity_draft proc~seed_cavity_draft->proc~cavity_fill_cover_frac proc~ocean_state_seed_from_cfg ocean_state_seed_from_cfg proc~ocean_state_seed_from_cfg->proc~seed_cavity_draft proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_seed_from_cfg proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j

Source Code

   pure subroutine cavity_fill_cover_frac(cover_frac, z_draft, nx, ny)
      !! v1 ice-cover fraction: BINARY, `1` wherever there is any draft.
      !! An area-blended calving front (a partially covered cell) is a
      !! melt-physics decision, not a geometry one, so it is deliberately
      !! left for the slice that needs it — the field exists now only so
      !! that slice does not have to re-open the metrics lifecycle.
      integer, intent(in) :: nx, ny
      real(wp), intent(out) :: cover_frac(nx, ny)
      real(wp), intent(in) :: z_draft(nx, ny)
      integer :: i, j
      do j = 1, ny
         do i = 1, nx
            if (z_draft(i, j) > 0.0_wp) then
               cover_frac(i, j) = 1.0_wp
            else
               cover_frac(i, j) = 0.0_wp
            end if
         end do
      end do
   end subroutine cavity_fill_cover_frac