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

Replace geoms_vntools.pro

parent 98f927fc
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
; 2020-04-27, v2.02 Ian Boyd Allow DATA_SOURCE_01 inclusion/exclusion settings to cover more than ; 2020-04-27, v2.02 Ian Boyd Allow DATA_SOURCE_01 inclusion/exclusion settings to cover more than
; one value - e.g. UVVIS.DOAS would mean the version name can be used ; one value - e.g. UVVIS.DOAS would mean the version name can be used
; in any file with UVVIS.DOAS as part of the DATA_SOURCE value ; in any file with UVVIS.DOAS as part of the DATA_SOURCE value
; 2023-12-18, v2.03 Ian Boyd Make keyword checks case sensitive
;--------------------------------------------------------------------------------------------------- ;---------------------------------------------------------------------------------------------------
FUNCTION is_a_number_vn,value FUNCTION is_a_number_vn,value
...@@ -339,24 +340,41 @@ FUNCTION analyze_GEOMS_VN, chVN_value, chFileGEOMSvn, ga_chk_vals, lu ...@@ -339,24 +340,41 @@ FUNCTION analyze_GEOMS_VN, chVN_value, chFileGEOMSvn, ga_chk_vals, lu
;Check 2 - Are the keyword part(s) present in the list ;Check 2 - Are the keyword part(s) present in the list
if iCheckOut eq 0 then begin if iCheckOut eq 0 then begin
;check each keyword or combination until all keywords are accounted for or an error is found ;check each keyword or combination until all keywords are accounted for or an error is found
keyword = strupcase(chvn_value) ;Note keyword comparison is case sensitive (introduced 20231218)
chvn_allwdup = strupcase( chvernames[*,0]) chvn_allwdupuc = strupcase( chvernames[*,0]) ;check if there is a case sensitivity issue
keyword = chvn_value
chvn_allwdup = chvernames[*,0]
j = kcnt & partok = 0 j = kcnt & partok = 0
repeat begin repeat begin
cserror = 0B
repeat begin repeat begin
;start with full version keyword then reduce until a match is found or no words are left to test ;start with full version keyword then reduce until a match is found or no words are left to test
if j eq kcnt then kwtest = keyword $ if j eq kcnt then begin
else kwtest = strmid(kwtest, 0, strpos( kwtest,'.',/Reverse_Search)) kwtest = keyword & kwtestuc = strupcase(keyword)
endif else begin
kwtest = strmid(kwtest, 0, strpos( kwtest,'.',/Reverse_Search))
kwtestuc = strupcase(kwtest)
endelse
gi = where( kwtest eq chvn_allwdup, gcnt) gi = where( kwtest eq chvn_allwdup, gcnt)
if gcnt eq 0 then begin
;check if keyword is present but case is incorrect
gi = where( kwtestuc eq chvn_allwdupuc, gcnt)
if gcnt ne 0 then cserror = 1B
endif
if (gcnt eq 0) or ((gcnt ne 0) and (kcnt eq 1)) then j-- if (gcnt eq 0) or ((gcnt ne 0) and (kcnt eq 1)) then j--
endrep until (gcnt ne 0) or (j eq 0) endrep until (gcnt ne 0) or (j eq 0)
if gcnt ne 0 then begin if gcnt ne 0 then begin
;partial or full match found so do inclusion/exclusion checks ;partial or full match found so do inclusion/exclusion checks (unless the case is incorrect)
if (j ne 0) or (partok eq 1) then kwfound = kwtest+' part' else kwfound = kwtest if (j ne 0) or (partok eq 1) then kwpart = ' part' else kwpart = ''
chMessage = ' INFORMATION: Version keyword match found for '+kwfound if cserror then begin
printf, lu, chMessage chMessage = ' ERROR: Version keyword'+kwpart+' found with case mismatch: '+kwtest+'/'+chvn_allwdup[gi[0]]
print, chMessage iCheckOut = (-1)
endif else begin
chMessage = ' INFORMATION: Version keyword match found for '+kwtest+kwpart
endelse
printf, lu, chMessage
print, chMessage
ico = incl_excl_checks( chvernames[gi[0],*], chvn_excl_incl, n_chks, ga_chk_vals, lu) ico = incl_excl_checks( chvernames[gi[0],*], chvn_excl_incl, n_chks, ga_chk_vals, lu)
if ico eq (-1) then iCheckOut = ico if ico eq (-1) then iCheckOut = ico
......
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