From 049bab0eca91a841846e142f71b678285a96844c Mon Sep 17 00:00:00 2001
From: Ian Boyd <iboyd@astro.umass.edu>
Date: Fri, 24 Jan 2025 00:47:39 +0000
Subject: [PATCH] Replace idlcr8ascii.pro

---
 idlcr8ascii.pro | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/idlcr8ascii.pro b/idlcr8ascii.pro
index a275db9..de34f8f 100644
--- a/idlcr8ascii.pro
+++ b/idlcr8ascii.pro
@@ -1,4 +1,4 @@
-;Main Program Version: idlcr8ascii.pro v4.0b29, 20241210
+;Main Program Version: idlcr8ascii.pro v4.0b30, 20250124
 ;  Written by Ian Boyd for the EVDC/AVDC - iboyd@bryanscientific.org
 ;
 ;Sub-versions:
@@ -221,7 +221,7 @@ COMMON WIDGET_WIN_A
 
 ;procedure which provides an introduction message before starting the program.
 nhdr=46 & errtxt=STRARR(nhdr)
-vertxt=['idlcr8ascii-v4.0_Readme.pdf','v4.0b29 December 2024']
+vertxt=['idlcr8ascii-v4.0_Readme.pdf','v4.0b30 January 2025']
 errtxt[1]='Welcome to IDLcr8ASCII.  This program reads GEOMS compliant HDF4, HDF5 and netCDF files and'
 errtxt[2]='saves contents to either session memory, an output window (summary only) or to ASCII or formatted'
 errtxt[3]='files (also refer to '+vertxt[0]+').'
@@ -1346,6 +1346,8 @@ PRO read_hdf_sds, ifile, ga, sds, catinfo
 ;    20241126  Check for spaces in netCDF4 and HDF5 ga_name values and replace with '_' when comparing
 ;              with H5_PARSE output. H5_PARSE does this for non-alphanumeric characters when reading a 
 ;              netCDF4 or HDF5 file - Version 4.0b28
+;    20250124  Fix bug when doing QA on NetCDF3 files and checking for BYTE values in pre-defined 
+;              attributes. Need to allow for the possibility of more than one value - Version 4.0b30
 ;
 ;  Inputs: ifile - a string containing the name of the input file to be read in.
 ;          catinfo - a string array identifying the type of input file ('H4','H5','N4','N3')
@@ -2219,7 +2221,7 @@ ENDIF ELSE BEGIN ;netCDF3 file (N3)
         IF (vavtype EQ 7) OR (vavtype EQ 1) THEN va_type='STRING' ELSE va_type='NON-STRING'
         hdftypehold=attstruct.datatype
         IF hdftypehold EQ 'BYTE' THEN $
-          IF va_value LT 0 THEN hdftypehold='BYTE_1' ELSE hdftypehold='BYTE_0'
+          IF va_value[0] LT 0 THEN hdftypehold='BYTE_1' ELSE hdftypehold='BYTE_0'
           ;This doesn't work as NCDF_VARGET converts BYTE values to 8-bit unsigned if they are negative signed values
         idltypehold=vavtype
         
@@ -2672,7 +2674,7 @@ PRO idlcr8ascii, ifile, ga, sds, reterr, $
 ;
 ;Program documentation, idlcr8ascii-v4.0_Readme.pdf, available on http://avdc.gsfc.nasa.gov.
 ;
-;Program sub-version 4.0b29 (20241210)
+;Program sub-version 4.0b30 (20250124)
 ; ----------
 ;Written by Ian Boyd for the EVDC/AVDC - iboyd@bryanscientific.org
 ;
-- 
GitLab