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

Public Member Functions

subroutine delete_filep_byname (LIST, NAME, FOUND)
 
subroutine delete_filep_byncid (LIST, NCID, FOUND)
 

Detailed Description

Definition at line 193 of file mod_ncll.f90.

Member Function/Subroutine Documentation

◆ delete_filep_byname()

subroutine mod_ncll::delete_file_link::delete_filep_byname ( type(ncfilelist), intent(inout)  LIST,
character(len=*), intent(in)  NAME,
logical, intent(out)  FOUND 
)

Definition at line 544 of file mod_ncll.f90.

544  IMPLICIT NONE
545  TYPE(NCFILELIST), INTENT(INOUT) :: LIST
546  CHARACTER(LEN=*), INTENT(IN) :: NAME
547  LOGICAL, INTENT(OUT) :: FOUND
548  TYPE(NCFILEP), pointer :: CURRENT, PREVIOUS
549 
550  previous => list%FIRST
551  current => previous%NEXT
552  found = .false.
553 
554  DO
555  IF(.NOT. ASSOCIATED(current)) RETURN !END OF LIST
556 
557  IF( name == current%NCF%FNAME ) THEN ! FOUND THE FILE LINK
558  found = .true.
559  EXIT
560  ELSE
561  previous => previous%NEXT
562  current => current%NEXT
563  END IF
564  END DO
565 
566  ! IF FOUND DELETE IT
567  previous%NEXT => current%NEXT
568  CALL kill_file(current%NCF)
569  DEALLOCATE(current)
570 

◆ delete_filep_byncid()

subroutine mod_ncll::delete_file_link::delete_filep_byncid ( type(ncfilelist), intent(inout)  LIST,
integer, intent(in)  NCID,
logical, intent(out)  FOUND 
)

Definition at line 575 of file mod_ncll.f90.

575  IMPLICIT NONE
576  TYPE(NCFILELIST), INTENT(INOUT) :: LIST
577  INTEGER, INTENT(IN) :: NCID
578  LOGICAL, INTENT(OUT) :: FOUND
579  TYPE(NCFILEP),pointer :: CURRENT, PREVIOUS
580 
581  previous => list%FIRST
582  current => previous%NEXT
583  found = .false.
584 
585  DO
586  IF(.NOT. ASSOCIATED(current)) RETURN !END OF LIST
587 
588  IF( ncid == current%NCF%NCID ) THEN ! FOUND THE FILE LINK
589  found = .true.
590  EXIT
591  ELSE
592  previous => previous%NEXT
593  current => current%NEXT
594  END IF
595  END DO
596 
597  ! IF FOUND DELETE IT
598  previous%NEXT => current%NEXT
599  CALL kill_file(current%NCF)
600  DEALLOCATE(current)
601 

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