Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geoms
geoms_qa
Commits
b88e1df2
Commit
b88e1df2
authored
Sep 30, 2020
by
Ian Boyd
Browse files
Replace geoms_qa.pro
parent
da963bd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
geoms_qa.pro
View file @
b88e1df2
...
...
@@ -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.0
4
,
2020
-
0
7
-
09
'
qaver
=
'version 2.0
5
, 2020-0
9-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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment