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

Replace geoms_qa.pro

parent c614fff9
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,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
;---------------------------------------------------------------------------------------------------
PRO geoms_qa
......@@ -93,7 +95,7 @@ PRO geoms_qa
args = command_line_args()
iNrArgs = size(args, /N_ELEMENTS)
qaver='version 2.16, 2024-10-29'
qaver='version 2.17, 2024-11-26'
if ( iNrArgs lt 2 ) then begin
print
......@@ -125,7 +127,8 @@ PRO geoms_qa
; 7 QA pass, TC fail
; 8 QA limit, TC fail
; 9 QA fail, TC fail
;99 Run-time error
chFileTAV = STRTRIM( args( 0 ), 2 )
; check the number of variables provided
......@@ -168,7 +171,29 @@ PRO geoms_qa
if ( QA_error_code eq 0 ) then begin
print, chFileTAV
print, chFileOrig
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+'idlcr8qa.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
QATC_error_code=99
exit, status=QATC_error_code
ENDIF
if (STRMID(FILE_BASENAME(chFileOrig),0,16) eq "balloon_sonde.o3") then begin
QA_error_code = geoms_tools( 0, chFileTAV, chFileOrig ) ;, /DATETIME )
end else begin
......@@ -180,8 +205,8 @@ PRO geoms_qa
OPENW, lu, logfile, /GET_LUN
PRINTF,lu, 'geoms_tools '+qaver
PRINTF,lu,'GEOMS Quality Assurance Tool'
PRINTF,lu,'Maintained by the Aura Validation Data Center, NASA/GSFC'
PRINTF,lu,'http://avdc.gsfc.nasa.gov/GEOMS'
PRINTF,lu,'Maintained by the ESA Validation Data Center, EVDC'
PRINTF,lu,'https://evdc.esa.int/documentation/geoms/'
PRINTF,lu,''
PRINTF,lu,'Log started on '+SYSTIME(0)
PRINTF,lu,'Result of performing Quality Assurance on '+chFileOrig
......@@ -203,7 +228,7 @@ PRO geoms_qa
else chDirGEOMSvn = '' ;can't find directory holding the version names list file
if ( TC_error_code eq 0 ) then begin
TC_error_code = geoms_tctools( chFileGEOMSTE, chFileOrig, QA_error_code )
TC_error_code = geoms_tctools( chFileGEOMSTE, chFileOrig, QA_error_code)
TC_error_code_hold = TC_error_code*3 + 4
endif else if (iNrArgs eq 3) and (QA_error_code ne 3) then begin
logfile=STRMID(chFileOrig,0,STRPOS(chFileOrig,'.',/REVERSE_SEARCH))+'.log'
......@@ -229,7 +254,7 @@ PRO geoms_qa
; total error
QATC_error_code = abs(QA_error_code) + TC_error_code
exit, status=QATC_error_code
END
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