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

Replace geoms_harmon.pro

parent a611c4f4
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,8 @@
; 2024-09-12, v2.14 Ian Boyd update due to fixes to idlcr8ascii and idlcr8hdf
; 2024-09-27, v2.15 Ian Boyd update due to fix to idlcr8ascii
; 2024-10-29, v2.16 Ian Boyd update due to fixes to geoms_tctools and idlcr8hdf
; 2024-11-26, v2.17 Ian Boyd Add run-time error handling capability in geoms_qa.pro and geoms_harmon.pro
; plus bug fix in idlcr8hdf
;---------------------------------------------------------------------------------------------------
function is_a_number,value
on_ioerror, ConversionError
......@@ -105,7 +107,7 @@ PRO geoms_harmon
if ( iNrArgs lt 4 ) then begin
print
print, 'GEOMS harmonization (geoms_harmon)'
print, ' Release v2.16, 2024-10-29'
print, ' Release v2.17, 2024-11-26'
print, ' Provides harmonization of old Envisat/Aura HDF files or older versions of GEOMS files'
print, ' into most recent GEOMS compliant files.'
print
......@@ -170,6 +172,29 @@ PRO geoms_harmon
end
end
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 idlcr8qa.log if they exist
hdfdir=FILE_DIRNAME(chFileOrig,/MARK_DIRECTORY)
FILE_DELETE,hdfdir+'idlcr8ascii.log',/QUIET
FILE_DELETE,hdfdir+'idlcr8log.log',/QUIET
;Write Run-time error to the log file
logfile=STRMID(chFileOrig,0,STRPOS(chFileOrig,'.',/REVERSE_SEARCH))+'.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
iDataFormat eq 0: QA_error_code = geoms_tools( 1, chFileTAV, chFileOrig, chDirOutput, 'h4' )
iDataFormat eq 1: QA_error_code = geoms_tools( 1, chFileTAV, chFileOrig, chDirOutput, 'h5' )
......
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