Skip to content

HDF4 raster data not done. #94

@JohnLCaron

Description

@JohnLCaron
  1. the image pallettes arent showing up anywhere.
  2. why both DFTAG_RI and DFTAG_RI8 tags?
  3. note how the DataDesc abd DataLabels are global. probably just lame writer, but... We also dont know which dataset they belong to. Note we had to reverse the file order in HCbuilder to agree with HC4builder.

see HCCompare.problemRasterData():

/home/all/testdata/devcdm/hdf4/TOVS_BROWSE_MONTHLY_AM_B861001.E861031_NF.HDF
alltags = 30 unique = 14
DFTAG_VERSION (30) Version (1 tags)
DFTAG_FID (100) File identifier (1 tags)
DFTAG_FD (101) File description (2 tags)
DFTAG_DIL (104) Data identifier label (4 tags)
DFTAG_DIA (105) Data identifier annotation (3 tags)
DFTAG_NT (106) Number type (1 tags)
DFTAG_ID8 (200) 8-bit Image dimension (1 tags)
DFTAG_IP8 (201) 8-bit Image palette (3 tags)
DFTAG_RI8 (202) Raster-8 image (3 tags)
DFTAG_ID (300) Image DimRec (1 tags)
DFTAG_LUT (301) Image Palette (3 tags)
DFTAG_RI (302) Raster Image (3 tags)
DFTAG_RIG (306) Raster Image Group (3 tags)
DFTAG_VG (1965) Vgroup (1 tags)

Hdf4File =
netcdf TOVS_BROWSE_MONTHLY_AM_B861001.E861031_NF.HDF {
variables:
char Raster_Image_#0(180, 360) ;
char Raster_Image_#1(180, 360) ;
char Raster_Image_#2(180, 360) ;

// global attributes:
:DataDesc.0 = "Scaled outgoing longwave radiative flux at the top of the atmosphere (W/m^2 = x * 2.)" ;
:DataDesc.1 = "Scaled surface skin temperature (deg K = (x + 405) * 0.5)" ;
:DataDesc.2 = "Scaled coarse layer mean temperature for the surf-500 mb layer (deg K = (x + 350) * 0.5)" ;
:DataLabel.0 = "total precipitable water above 500 mb" ;
:DataLabel.1 = "total precipitable water above 500 mb" ;
:DataLabel.2 = "total precipitable water above surface" ;
:DataLabel.3 = "coarse layer mean temp surface to 500 mb" ;
:FileDesc.0 = "data_set=TOVS PATHFINDER:: ...
:FileDesc.1 = "1) General Description ...
:FileLabel.0 = "TOVS_NOAA09_PATHA_GLOBAL_GRIDDED_MONTHLY_AM_B861001.E861031_BROWSE" ;
:HDF4FileVersion = "3.3.4 (NCSA HDF Version 3.3 Release 4, February 1994)" ;
}

*** FAIL cfile.readArrayData for variable = char Raster_Image_#0 [, ]

GRreadimage return -1
java.io.IOException: GRreadimage return -1
at com.sunya.netchdf.hdf4Clib.H4CbuilderKt.checkErr(H4Cbuilder.kt:934)
at com.sunya.netchdf.hdf4Clib.H4ClibFileKt.readGRdata(H4ClibFile.kt:196)
at com.sunya.netchdf.hdf4Clib.Hdf4ClibFile.readArrayData$clibs(H4ClibFile.kt:70)
at com.sunya.netchdf.hdf4Clib.Hdf4ClibFile.readArrayData(H4ClibFile.kt:49)
at com.sunya.netchdf.NetchdfClibTestKt.compareOneVar(NetchdfClibTest.kt:462)
at com.sunya.netchdf.NetchdfClibTestKt.compareNetcdfData(NetchdfClibTest.kt:440)
at com.sunya.netchdf.NetchdfClibTestKt.compareNetcdfData$default(NetchdfClibTest.kt:423)
at com.sunya.netchdf.hdf4.HCcompare.compareData(HCcompare.kt:167)
at com.sunya.netchdf.hdf4.HCcompare.compareData(HCcompare.kt:158)
at com.sunya.netchdf.hdf4.HCcompare.problemRasterData(HCcompare.kt:85)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions