Pro mvn_l2file_compress, fullfile0, _extra = _extra
If(~is_string(fullfile0)) Then Begin
dprint, 'Bad filename input '
Return
Endif
fullfile = file_search(fullfile0)
If(~is_string(fullfile)) Then Begin
dprint, 'No file: '+fullfile0
Return
Endif
file = file_basename(fullfile)
file_id = file_basename(file, '.cdf')
spawn, '/usr/local/pkg/cdf-3.5.0_CentOS-6.5/bin/cdfconvert '+fullfile+' '+$
fullfile+' -compression cdf:none -delete'
md5file = ssw_str_replace(fullfile, '.cdf', '.md5')
If(is_string(file_search(md5file))) Then file_delete, md5file
spawn, 'md5sum '+fullfile+' > '+md5file
md5str = strarr(1)
openr, unit, md5file, /get_lun
readf, unit, md5str
free_lun, unit
ppp = strsplit(md5str[0], /extract)
openw, unit, md5file, /get_lun
printf, unit, ppp[0], ' ', file
free_lun, unit
spawn, '/usr/local/pkg/cdf-3.5.0_CentOS-6.5/bin/cdfconvert '+fullfile+' '+fullfile+' -compression cdf:gzip.5 -delete'
spawn, 'chmod g+w '+fullfile
spawn, 'chmod g+w '+md5file
Return
End