file_gzip Subroutine

public subroutine file_gzip(file, size)

Arguments

Type IntentOptional Attributes Name
character(len=*) :: file
integer, optional :: size

Calls

proc~~file_gzip~~CallsGraph proc~file_gzip file_gzip interface~reg reg proc~file_gzip->interface~reg proc~file_size file_size proc~file_gzip->proc~file_size proc~file_size->interface~reg

Source Code

  subroutine file_gzip(file,size)
    character(len=*)  :: file
    integer,optional  :: size
    logical           :: control
    character(len=9)  :: csize 
    integer           :: cstatus,fsize,unit,len
    fsize=store_size;if(present(size))fsize=size
    write(*,"(A)") "Storing "//file
    inquire(file=reg(file),exist=control)
    if(control)then
       len=file_size(reg(file))
       if(len>fsize)call system("gzip -fv "//reg(file))
    endif
    inquire(file=reg(file),opened=control,number=unit)
    if(control)close(unit)
  end subroutine file_gzip