diff --git a/idlcr8ascii.pro b/idlcr8ascii.pro index c54873687d128f677fe26b476384a43ee1df2844..a275db92324bfdb7b4855fbbbae566a5cced70db 100644 --- a/idlcr8ascii.pro +++ b/idlcr8ascii.pro @@ -1,4 +1,4 @@ -;Main Program Version: idlcr8ascii.pro v4.0b28, 20241126 +;Main Program Version: idlcr8ascii.pro v4.0b29, 20241210 ; Written by Ian Boyd for the EVDC/AVDC - iboyd@bryanscientific.org ; ;Sub-versions: @@ -101,6 +101,7 @@ ; v4.0b28 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. +; v4.0b29 20241210 - Fix bug that misidentified the datatype when generating datatype mismatch messages. PRO idlcr8ascii_common ;Procedure to define the data COMMON block WIDGET_WIN_A, containing common variables @@ -220,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.0b28 November 2024'] +vertxt=['idlcr8ascii-v4.0_Readme.pdf','v4.0b29 December 2024'] 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]+').' @@ -1110,6 +1111,9 @@ PRO data_type_checks, ftype, dt_chk_labels, hdftype, idltype, sds_name, var_name ; ; History: ; 20220805: Introduced to IDLCR8ASCII - Version 4.0b25 +; 20241210: Fix bug that misidentified the datatype when generating datatype mismatch messages +; Clarify that byte datasets and attribute values must be of type (BYTE/DFNT_UINT8) +; if they are of type INT8 (signed) in output message - Version 4.0b29 ; ; Inputs: ftype - a string identifying the file type (H4, H5, N3 or N4) ; dt_chk_labels - string array containing labels of attributes (plus 'Dataset') @@ -1218,7 +1222,7 @@ FOR i=0,n_lab-2 DO BEGIN IF hdtcnt EQ 0 THEN IF idltype[i] NE '' THEN hdti[0]=0 CASE hdti[0] OF -1: IF i EQ 0 THEN dterr[i]=usevn+' '+dt_chk_labels[i]+' data type is not identifiable' - 1: dterr[i]=usevn+' '+dt_chk_labels[i]+itxt+'must be 8-bit unsigned INTEGER (BYTE)' + 1: dterr[i]=usevn+' '+dt_chk_labels[i]+itxt+'must be 8-bit unsigned INTEGER (BYTE/DFNT_UINT8)' 2: dterr[i]=usevn+' '+dt_chk_labels[i]+itxt+'must be 16-bit signed INTEGER' 3: dterr[i]=usevn+' '+dt_chk_labels[i]+itxt+'must be 32-bit signed INTEGER' ELSE: dterr[i]=usevn+' '+dt_chk_labels[i]+itxt+'not a valid GEOMS data type: '+idl_name[hdti[0]] @@ -1239,7 +1243,7 @@ ENDIF ELSE IF dterr[0] EQ '' THEN BEGIN ;VAR_DATA_TYPE not valid so check min, max and fill data types against the dataset data type FOR i=1,n_lab-2 DO BEGIN IF (idltype[0] NE idltype[i]) AND (idltype[i] NE '') THEN BEGIN - dterr[i]=usevn+' '+dt_chk_labels[i]+' data type ('+idl_name[i]+') does not match Dataset data type ('+idl_name[0]+')' + dterr[i]=usevn+' '+dt_chk_labels[i]+' data type ('+idltype[i]+') does not match Dataset data type ('+idltype[0]+')' ;note: overwrites any existing reported error ENDIF ENDFOR @@ -2668,7 +2672,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.0b28 (20241126) +;Program sub-version 4.0b29 (20241210) ; ---------- ;Written by Ian Boyd for the EVDC/AVDC - iboyd@bryanscientific.org ;