warnwrite Subroutine

public subroutine warnwrite(fname, data)

write trimmed character data to a file if it does not exist

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: fname
character(len=*), intent(in) :: data(:)

Source Code

subroutine warnwrite(fname,data)
character(len=*),intent(in) :: fname
character(len=*),intent(in) :: data(:)

    if(.not.exists(fname))then
        call filewrite(fname,data)
    else
        write(stderr,'(*(g0,1x))')'<INFO>  ',fname,&
        & 'already exists. Not overwriting'
    endif

end subroutine warnwrite