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

Replace geoms_qa.pro

parent da963bd4
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,9 @@
; 2020-03-11, v2.02 Ian Boyd update due to fix to idlcr8hdf
; 2020-04-27, v2.03 Ian Boyd update due to geoms_vntools update
; 2020-07-09, v2.04 Ian Boyd update due to fix to idlcr8hdf
; 2020-09-30, v2.05 Ian Boyd update due to fix to idlcr8ascii; geoms_tools now returns a QA_error_code
; value of -2 to geoms_qa if idlcr8ascii can't read the input file, to stop
; template and version name checks
;---------------------------------------------------------------------------------------------------
PRO geoms_qa
......@@ -74,7 +77,7 @@ PRO geoms_qa
args = command_line_args()
iNrArgs = size(args, /N_ELEMENTS)
qaver='version 2.04, 2020-07-09'
qaver='version 2.05, 2020-09-30'
if ( iNrArgs lt 2 ) then begin
print
......@@ -176,39 +179,41 @@ PRO geoms_qa
Free_Lun, lu
endif
;Determine working directory for the version names list file
;First try the template directory, but otherwise use the TAV file directory
if iNrArgs eq 3 then chDirGEOMSvn = FILE_DIRNAME(chFileGEOMSTE, /Mark_Directory) $
else if iNrArgs eq 2 then chDirGEOMSvn = FILE_DIRNAME(chFileTAV, /Mark_Directory) $
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_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'
OPENW, lu, logfile, /GET_LUN, /Append
printf, lu, ''
printf, lu, 'ERROR: GEOMS Metadata Template file not found'
Free_Lun, lu
QA_error_code = 3
TC_error_code = 0 & TC_error_code_hold = 0
endif else begin
TC_error_code = 0 & TC_error_code_hold = 0
endelse
if TC_error_code_2 eq 0 then begin
TC_error_code_2 = geoms_vntools( chDirGEOMSvn, chFileOrig, QA_error_code, TC_error_code )
;Note TC_error_code_2 will return the highest of TC_error_code or the Version Name error check value
if (TC_error_code_2 eq -1) or (QA_error_code eq 3) then begin
;File input error as data_version_name list file can't be found and there is a version name in the GEOMS file
TC_error_code = 0 & QA_error_code = 3
endif else TC_error_code = TC_error_code_2*3 + 4
endif else TC_error_code = TC_error_code_hold
; total error
QATC_error_code = QA_error_code + TC_error_code
exit, status=QATC_error_code
if QA_error_code ne -2 then begin
;Determine working directory for the version names list file
;First try the template directory, but otherwise use the TAV file directory
if iNrArgs eq 3 then chDirGEOMSvn = FILE_DIRNAME(chFileGEOMSTE, /Mark_Directory) $
else if iNrArgs eq 2 then chDirGEOMSvn = FILE_DIRNAME(chFileTAV, /Mark_Directory) $
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_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'
OPENW, lu, logfile, /GET_LUN, /Append
printf, lu, ''
printf, lu, 'ERROR: GEOMS Metadata Template file not found'
Free_Lun, lu
QA_error_code = 3
TC_error_code = 0 & TC_error_code_hold = 0
endif else begin
TC_error_code = 0 & TC_error_code_hold = 0
endelse
if TC_error_code_2 eq 0 then begin
TC_error_code_2 = geoms_vntools( chDirGEOMSvn, chFileOrig, QA_error_code, TC_error_code )
;Note TC_error_code_2 will return the highest of TC_error_code or the Version Name error check value
if (TC_error_code_2 eq -1) or (QA_error_code eq 3) then begin
;File input error as data_version_name list file can't be found and there is a version name in the GEOMS file
TC_error_code = 0 & QA_error_code = 3
endif else TC_error_code = TC_error_code_2*3 + 4
endif else TC_error_code = TC_error_code_hold
endif
; 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