My Project
Public Member Functions | List of all members
mod_ncll::find_file Interface Reference

Public Member Functions

type(ncfile) function, pointer find_file_byname (LIST, NAME, FOUND)
 
type(ncfile) function, pointer find_file_byncid (LIST, NCID, FOUND)
 

Detailed Description

Definition at line 205 of file mod_ncll.f90.

Member Function/Subroutine Documentation

◆ find_file_byname()

type(ncfile) function, pointer mod_ncll::find_file::find_file_byname ( type(ncfilelist), intent(in)  LIST,
character(len=*), intent(in)  NAME,
logical, intent(out)  FOUND 
)

Definition at line 737 of file mod_ncll.f90.

737  IMPLICIT NONE
738  TYPE(NCFILE),POINTER :: NCF
739  TYPE(NCFILELIST), INTENT(IN) :: LIST
740  CHARACTER(LEN=*), INTENT(IN) :: NAME
741  LOGICAL, INTENT(OUT) :: FOUND
742  TYPE(NCFILEP), pointer :: CURRENT, PREVIOUS
743  integer :: idx
744 
745  previous => list%FIRST
746  current => previous%NEXT
747  NULLIFY(ncf)
748  found = .false.
749 
750  DO
751  IF(.NOT. ASSOCIATED(current)) RETURN !END OF LIST
752 
753  if(.not. associated(current%ncf)) Call fatal_error&
754  & ("FIND_FILE: Link in file list has file pointer that is &
755  &not associated!")
756 
757  idx = index(current%NCF%FNAME,name)
758 
759  IF( idx /= 0 ) THEN ! FOUND THE FILE LINK
760  ncf => current%NCF
761  found = .true.
762  EXIT
763  ELSE
764  previous => previous%NEXT
765  current => current%NEXT
766  END IF
767  END DO
768 

◆ find_file_byncid()

type(ncfile) function, pointer mod_ncll::find_file::find_file_byncid ( type(ncfilelist), intent(in)  LIST,
integer, intent(in)  NCID,
logical, intent(out)  FOUND 
)

Definition at line 773 of file mod_ncll.f90.

773  IMPLICIT NONE
774  TYPE(NCFILE),POINTER :: NCF
775  TYPE(NCFILELIST), INTENT(IN) :: LIST
776  INTEGER, INTENT(IN) :: NCID
777  LOGICAL, INTENT(OUT) :: FOUND
778  TYPE(NCFILEP), pointer :: CURRENT, PREVIOUS
779 
780  NULLIFY(ncf)
781  previous => list%FIRST
782  current => previous%NEXT
783  found = .false.
784 
785  DO
786  IF(.NOT. ASSOCIATED(current)) RETURN !END OF LIST
787 
788  IF( ncid == current%NCF%NCID ) THEN ! FOUND THE FILE LINK
789  ncf => current%NCF
790  found = .true.
791  EXIT
792  ELSE
793  previous => previous%NEXT
794  current => current%NEXT
795  END IF
796  END DO
797 

The documentation for this interface was generated from the following file: