ice_hlim_count Function

public pure function ice_hlim_count(hlim) result(n)

Length of the LEADING run of non-sentinel (>= 0) entries in &ocean_ice_nml hlim (PR-58). Contiguity matters here (unlike apply_layer_rho_init’s bare count(>= 0)): a value AFTER the first sentinel is silently dropped by this count, so ice_hlim_spec_is_valid checks contiguity explicitly rather than trusting the count alone.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: hlim(:)

Return Value integer


Called by

proc~~ice_hlim_count~~CalledByGraph proc~ice_hlim_count ice_hlim_count proc~ice_hlim_spec_is_valid ice_hlim_spec_is_valid proc~ice_hlim_spec_is_valid->proc~ice_hlim_count proc~ocean_state_init_from_config ocean_state_t%ocean_state_init_from_config proc~ocean_state_init_from_config->proc~ice_hlim_count proc~validate_config validate_config proc~validate_config->proc~ice_hlim_count proc~validate_config->proc~ice_hlim_spec_is_valid proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~validate_config proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_init_from_config 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~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~build_pending_handle proc~rdb_ocean_create_from_string->proc~complete_ocean_create proc~rdb_ocean_create_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle 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

Variables

Type Visibility Attributes Name Initial
integer, private :: k

Source Code

   pure function ice_hlim_count(hlim) result(n)
      !! Length of the LEADING run of non-sentinel (>= 0) entries in
      !! `&ocean_ice_nml hlim` (PR-58). Contiguity matters here (unlike
      !! `apply_layer_rho_init`'s bare `count(>= 0)`): a value AFTER the
      !! first sentinel is silently dropped by this count, so
      !! `ice_hlim_spec_is_valid` checks contiguity explicitly rather than
      !! trusting the count alone.
      real(wp), intent(in) :: hlim(:)
      integer :: n
      integer :: k

      n = 0
      do k = 1, size(hlim)
         if (hlim(k) < 0.0_wp) exit
         n = n + 1
      end do
   end function ice_hlim_count