ec-jrc / lisflood-utilities

LISFLOOD OS - Utilities
https://ec-jrc.github.io/lisflood
European Union Public License 1.2
20 stars 8 forks source link

Error detected in HDF5 (1.12.2) #65

Closed EdgarEspitia closed 4 weeks ago

EdgarEspitia commented 4 weeks ago

Dear developers,

I am using the tool cutmaps but I get the error:

HDF5-DIAG: Error detected in HDF5 (1.12.2) thread 1:
  #000: H5A.c line 528 in H5Aopen_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #001: H5VLcallback.c line 1091 in H5VL_attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #002: H5VLcallback.c line 1058 in H5VL__attr_open(): attribute open failed
    major: Virtual Object Layer
    minor: Can't open object
  #003: H5VLnative_attr.c line 130 in H5VL__native_attr_open(): can't open attribute
    major: Attribute
    minor: Can't open object
  #004: H5Aint.c line 545 in H5A__open_by_name(): unable to load attribute info from object header
    major: Attribute
    minor: Unable to initialize object
  #005: H5Oattribute.c line 476 in H5O__attr_open_by_name(): can't open attribute
    major: Attribute
    minor: Can't open object
  #006: H5Adense.c line 394 in H5A__dense_open(): can't locate attribute in name index
    major: Attribute
    minor: Object not found

The error shows when I cut the outputs of lisvap, it can happen for e0, et, es, or ta. Even though the error the files are usable in lisflood. In addition, sometimes the cutmap tool get stuck and never finish the cutting, do you have any advice on how to manage this issue? could you provide an example of how to use the cutmap tool programmatically?

Thanks Edgar

doc78 commented 4 weeks ago

Dear Edgar

This issue is happening with version HDF5 v1.12.2 while is not showing up on v1.12.1. However, as you wrote, it is not affecting the results, so you can just ignore it. I take note of that for a future fix. The issue of the cutmap getting stuck is also a known issue, we will work to fix it for the next release but you can just run the cutmaps again when you get this issue and it will work. You can use the cutmap tool as an executable command or use it programmatically from the python code. To use it in python code, you just need to import the tool and then run the following command:

from lisfloodutilities.cutmaps.cutlib import cutmap

cutmap(file_to_cut, fileout, x_min, x_max, y_min, y_max, use_coords)

Where use_coords=True means that it will cut the map using coordinates, while use_coords=False will use indices. For more details on coordinates and indices or for a detailed description on the command-line options you can check the readme file in the cutmaps section.

Kind regards, on behalf of the developers team, Carlo

EdgarEspitia commented 4 weeks ago

Dear Carlo,

Thank you very much!