Weird issue in xml/VIIRS/VIIRS_LSA_IP_AC_Int.xml
Posted: Tue Sep 17, 2013 12:04 pm
Recently I encountered a weird issue of xmled when changing LUT in
$ADL_HOME/xml/VIIRS/VIIRS_LSA_IP_AC_Int.xml
It is original definition is
struct IngMsdCoefficients_ViirsSurfAlbedoStruct
{
Float32 SnowThreshold;
Float32 NDVI_Threshold;
Int64 NumBins_SolarZenith;
Float32 BinSize_SolarZenith;
UInt8 implicit_pad0[PAD_BYTES_4];
Int64 NumBins_KernelBlackSkyAlbedo;
Float32 BinSize_KernelBlackSkyAlbedo;
UInt8 implicit_pad1[PAD_BYTES_4];
Int64 NumBins_AOT;
Float32 BinSize_AOT;
UInt8 implicit_pad2[PAD_BYTES_4];
Int64 NumKernels;
Int64 Num_Kernel_Lut;
Int64 Max_Lut_Dim;
Int64 Bpsa_Num_Bins_Solar_Zenith;
Int64 Bpsa_Num_Bins_View_Zenith;
Int64 Bpsa_Num_Bins_Rel_Azimuth;
Float32 BinCoord_SeaIce_SolarZenith[15];
Float32 BinCoord_SolarZenith[17];
Float32 BinCoord_ViewZenith[16];
Float32 BinCoord_RelAzimuth[11];
UInt8 implicit_pad3[PAD_BYTES_4];
Int64 Lut_Size_Bpsa;
Int64 Bpsa_Map_AeroModel[LSA_BPSA_MAP_AEROMODEL];
};
Now I want to use a new LUT and change to new array dimensions
Float32 BinCoord_SolarZenith[18];
Float32 BinCoord_ViewZenith[18];
Float32 BinCoord_RelAzimuth[23];
So I changed the corresponding "$ADL_HOME/xml/VIIRS/VIIRS_LSA_IP_AC_Int.xml" using text editor. However, "xmled" can not
display correctly the simple change and lost "UInt8 implicit_pad3[PAD_BYTES_4]" after "Float32 BinCoord_RelAzimuth[23];"
and report 448 bytes total length (it should be 452 bytes). If I change to "Float32 BinCoord_RelAzimuth[22];" or "Float32 BinCoord_RelAzimuth[24];",
its display became correct and "UInt8 implicit_pad3[PAD_BYTES_4]" is there. It seems that xmled has a bug and can not correctly
ingest the number 23.
If the problem ended here, that is fine since "$ADL_HOME/include/AutoGeneratedViirsProductsGbl.h" was generated. However, when I
make src library
under $ADL_HOME. It showed another error and compilation stopped
**Warning** - Struct Size Does Not Match: Scaled Error Unscaled Error
Group Name: VIIRS-LSA-IP-AC
Struct Name: IngMsdCoefficients_ViirsSurfAlbedoStruct
----------------------------------------
Source size: Map:456 Entry:452 Diff:4
Dest size: Map:456 Entry:452 Diff:4
FAIL: 1 conflicts detected in between product structure sizes and their dictionary entry definitions' sizes.
I do not know where the "MAP:456" comes from and how to resolve the conflict.
Thanks
Youhua Tang
$ADL_HOME/xml/VIIRS/VIIRS_LSA_IP_AC_Int.xml
It is original definition is
struct IngMsdCoefficients_ViirsSurfAlbedoStruct
{
Float32 SnowThreshold;
Float32 NDVI_Threshold;
Int64 NumBins_SolarZenith;
Float32 BinSize_SolarZenith;
UInt8 implicit_pad0[PAD_BYTES_4];
Int64 NumBins_KernelBlackSkyAlbedo;
Float32 BinSize_KernelBlackSkyAlbedo;
UInt8 implicit_pad1[PAD_BYTES_4];
Int64 NumBins_AOT;
Float32 BinSize_AOT;
UInt8 implicit_pad2[PAD_BYTES_4];
Int64 NumKernels;
Int64 Num_Kernel_Lut;
Int64 Max_Lut_Dim;
Int64 Bpsa_Num_Bins_Solar_Zenith;
Int64 Bpsa_Num_Bins_View_Zenith;
Int64 Bpsa_Num_Bins_Rel_Azimuth;
Float32 BinCoord_SeaIce_SolarZenith[15];
Float32 BinCoord_SolarZenith[17];
Float32 BinCoord_ViewZenith[16];
Float32 BinCoord_RelAzimuth[11];
UInt8 implicit_pad3[PAD_BYTES_4];
Int64 Lut_Size_Bpsa;
Int64 Bpsa_Map_AeroModel[LSA_BPSA_MAP_AEROMODEL];
};
Now I want to use a new LUT and change to new array dimensions
Float32 BinCoord_SolarZenith[18];
Float32 BinCoord_ViewZenith[18];
Float32 BinCoord_RelAzimuth[23];
So I changed the corresponding "$ADL_HOME/xml/VIIRS/VIIRS_LSA_IP_AC_Int.xml" using text editor. However, "xmled" can not
display correctly the simple change and lost "UInt8 implicit_pad3[PAD_BYTES_4]" after "Float32 BinCoord_RelAzimuth[23];"
and report 448 bytes total length (it should be 452 bytes). If I change to "Float32 BinCoord_RelAzimuth[22];" or "Float32 BinCoord_RelAzimuth[24];",
its display became correct and "UInt8 implicit_pad3[PAD_BYTES_4]" is there. It seems that xmled has a bug and can not correctly
ingest the number 23.
If the problem ended here, that is fine since "$ADL_HOME/include/AutoGeneratedViirsProductsGbl.h" was generated. However, when I
make src library
under $ADL_HOME. It showed another error and compilation stopped
**Warning** - Struct Size Does Not Match: Scaled Error Unscaled Error
Group Name: VIIRS-LSA-IP-AC
Struct Name: IngMsdCoefficients_ViirsSurfAlbedoStruct
----------------------------------------
Source size: Map:456 Entry:452 Diff:4
Dest size: Map:456 Entry:452 Diff:4
FAIL: 1 conflicts detected in between product structure sizes and their dictionary entry definitions' sizes.
I do not know where the "MAP:456" comes from and how to resolve the conflict.
Thanks
Youhua Tang