Skip to content
Snippets Groups Projects
Commit 3e634e3c authored by Ian Boyd's avatar Ian Boyd
Browse files

Replace geoms_online_conversion.pro

parent 643b22d6
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@
; 2024-01-12, v1.7 Ian Boyd compile with idlcr8hdf.pro v4.0b62
; 2024-09-12, v1.8 Ian Boyd compile with idlcr8hdf.pro v4.0b64
; 2024-10-29, v1.9 Ian Boyd compile with idlcr8hdf.pro v4.0b65
; 2024-11-26, v1.10 Ian Boyd Add run-time error handling capability and compile with idlcr8jdf.pro v4.0b66
;---------------------------------------------------------------------------------------------------
PRO geoms_online_conversion
......@@ -26,7 +27,7 @@ iNrArgs = size(args, /N_ELEMENTS)
if ( iNrArgs ne 4 ) then begin
print
print, 'GEOMS online conversion'
print, ' Release v1.9, 2024-10-29'
print, ' Release v1.10, 2024-11-26'
print, ' Does conversion of input data and metadata files to GEOMS compliant HDF4/5 and netCDF files.'
print
print, 'usage: idl -rt=geoms_online_conversion.sav -args METAFILE ORIGDATAFILE(s) TAVFILE GEOMSFORMAT'
......@@ -76,6 +77,28 @@ endif else QA_error_code = 0
if ( QA_error_code eq 0 ) then begin
CATCH, error_status
IF error_status NE 0 THEN BEGIN
;Run-time error so exit nicely
CLOSE,/ALL
;Delete idlcr8ascii.log and idlcr8log.log if they exist
logdir=FILE_DIRNAME(chFileMeta,/MARK_DIRECTORY)
FILE_DELETE,logdir+'idlcr8ascii.log',/QUIET
;FILE_DELETE,logdir+'idlcr8log.log',/QUIET
;Write Run-time error to the log file
logfile=logdir+'idlcr8log.log'
etxt=' Please contact Ian Boyd at iboyd@bryanscientific.org and nadirteam@nilu.no'
OPENW,lu,logfile, /GET_LUN, /Append
PRINTF,lu,''
PRINTF,lu,' RUN-TIME ERROR: '+!ERROR_STATE.MSG
PRINTF,lu,''
PRINTF,lu,'99 (Failed with Run-Time error.'+etxt+')'
FREE_LUN,lu
CATCH,/CANCEL
QA_error_code=99
exit, status=QA_error_code
ENDIF
case 1 of
chFileFormat eq 'H4': idlcr8hdf, chFileMeta, arFileData, chFileTav, 'M', /AVK, /Log
chFileFormat eq 'H5': idlcr8hdf, chFileMeta, arFileData, chFileTav, 'M', /H5, /AVK, /Log
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment