registry_entry_found Function

private pure function registry_entry_found(this, tag) result(found)

Was tag actually present in the file the last time this registry was passed to ocean_restart_read_local? .false. before any read, and .false. for an unknown tag (a caller typo is a silent cold-seed, not a crash — callers that care should assert the tag exists via a successful register_* first). See restart_entry_t%found’s docstring for why this is not the same question as optional.

Type Bound

restart_registry_t

Arguments

Type IntentOptional Attributes Name
class(restart_registry_t), intent(in) :: this
character(len=*), intent(in) :: tag

Return Value logical


Called by

proc~~registry_entry_found~~CalledByGraph proc~registry_entry_found restart_registry_t%registry_entry_found proc~ocean_state_restart_read ocean_state_restart_read proc~ocean_state_restart_read->proc~registry_entry_found proc~engine_setup engine_setup proc~engine_setup->proc~ocean_state_restart_read 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

Source Code

   pure function registry_entry_found(this, tag) result(found)
      !! Was `tag` actually present in the file the last time this
      !! registry was passed to `ocean_restart_read_local`? `.false.`
      !! before any read, and `.false.` for an unknown tag (a caller
      !! typo is a silent cold-seed, not a crash — callers that care
      !! should assert the tag exists via a successful `register_*`
      !! first). See `restart_entry_t%found`'s docstring for why this is
      !! not the same question as `optional`.
      class(restart_registry_t), intent(in) :: this
      character(len=*), intent(in) :: tag
      logical :: found
      integer :: i

      found = .false.
      do i = 1, this%n
         if (trim(this%entries(i)%tag) == trim(tag)) then
            found = this%entries(i)%found
            return
         end if
      end do
   end function registry_entry_found