Ok!
the vegetation data file:
<begin_AgriculturalPractices>
INITIALIZATION_METHOD : HDF
HDF_FIELD_NAME : vegetation
!INITIALIZATION_METHOD : CONSTANT
FILENAME : ..\General Data\Other\Vegetation\maps\vegetation_simple.hdf5
DEFAULTVALUE : 27
REMAIN_CONSTANT : 1
<end_AgriculturalPractices>
In the cell I´m checking, I have a rotation of ID 3 (first year) and ID 12 (second year). Their settings are:
<beginagriculturalpractice>
AGRIC_PRACT_ID : 3
VEGETATION_ID : 31
NAME : barl
<begintimingparameters>
PLANTING_JULIANDAY : 5 !julian day when planting will occur
PLANTING_HUBASE : -99 !0.15 !Percentage of POTENTIAL YEARLY HU when planting will occur
MATURITY_HU : 1700. !Total PLANT ACCUMULATED HU when reaching maturity
<endtimingparameters>
<beginharvestkillparameters>
!active if in data file HARVEST_KILL : 1
HARVESTKILL_JULIANDAY : 210. !julian day when harvestkill operation occur
HARVESTKILL_PLANTHU : -99 !1.2 !Percentage of PLANT ACCUMULATED HU when harvestkill operation occur
HARVEST_JULIANDAY : -99. !julian day when harvest operation occur
HARVEST_PLANTHU : -99. !Percentage of PLANT ACCUMULATED HU when harvest operation occur
HARVEST_EFFICIENCY : -99 !1.0 !Efficiency for harvest operation (residue if lower than 1)
KILL_JULIANDAY : -99. !julian day when harvestkill operation occur
KILL_PLANTHU : -99. !Percentage of PLANT ACCUMULATED HU when kill operation occur
<endharvestkillparameters>
<endagriculturalpractice>
<beginagriculturalpractice>
AGRIC_PRACT_ID : 12
VEGETATION_ID : 69
NAME : sgbt
<begintimingparameters>
PLANTING_JULIANDAY : 110 !julian day when planting will occur
PLANTING_HUBASE : -99 !0.15 !Percentage of POTENTIAL YEARLY HU when planting will occur
MATURITY_HU : 1700. !Total PLANT ACCUMULATED HU when reaching maturity
<endtimingparameters>
<beginharvestkillparameters>
!active if in data file HARVEST_KILL : 1
HARVESTKILL_JULIANDAY : 303. !julian day when harvestkill operation occur
HARVESTKILL_PLANTHU : -99 !1.2 !Percentage of PLANT ACCUMULATED HU when harvestkill operation occur
HARVEST_JULIANDAY : -99. !julian day when harvest operation occur
HARVEST_PLANTHU : -99. !Percentage of PLANT ACCUMULATED HU when harvest operation occur
HARVEST_EFFICIENCY : -99 !1.0 !Efficiency for harvest operation (residue if lower than 1)
KILL_JULIANDAY : -99. !julian day when harvestkill operation occur
KILL_PLANTHU : -99. !Percentage of PLANT ACCUMULATED HU when kill operation occur
<endharvestkillparameters>
<endagriculturalpractice>
Thanks!
reading an HDF
-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Ane,
I think I found the problem.
In the practices block (in the vegetation input file), you are using INITIALIZATION_METHOD : HDF.
You have to erase this keyword or use FILE_IN_TIME : HDF instead.
If the FILE_IN_TIME keyword is missing, it will get the default value of NONE.
When this happens, the INITIALIZATION_METHOD keyword is read. But then, the HDF will be read only at the initialization, and the practices will not be updated during the run.
In fact this behavior is standard to any property block in the code.
So, if you want to update the property during the run, FILE_IN_TIME must be present and must be different than NONE. It accept HDF, TIMESERIE and PROFILE_TIMESERIE.
With this change, it will work.
I think I found the problem.
In the practices block (in the vegetation input file), you are using INITIALIZATION_METHOD : HDF.
You have to erase this keyword or use FILE_IN_TIME : HDF instead.
If the FILE_IN_TIME keyword is missing, it will get the default value of NONE.
When this happens, the INITIALIZATION_METHOD keyword is read. But then, the HDF will be read only at the initialization, and the practices will not be updated during the run.
In fact this behavior is standard to any property block in the code.
So, if you want to update the property during the run, FILE_IN_TIME must be present and must be different than NONE. It accept HDF, TIMESERIE and PROFILE_TIMESERIE.
With this change, it will work.

-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Clarified! Thank you!
Re: reading an HDF
Just a correction from my previous answer.
If you want to update the property, you HAVE to use FILE_IN_TIME with a value other than NONE.
It isn't enough to delete the INITIALIZATION_METHOD.

If you want to update the property, you HAVE to use FILE_IN_TIME with a value other than NONE.
It isn't enough to delete the INITIALIZATION_METHOD.

-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Hi again!
Trying to fix this, I set the following configuration:
<begin_AgriculturalPractices>
!INITIALIZATION_METHOD : HDF
FILE_IN_TIME : HDF
HDF_FIELD_NAME : vegetation
FILENAME : ..\General Data\Other\Vegetation\maps\vegetation_simple.hdf5
REMAIN_CONSTANT : 0
DEFAULTVALUE : 27
<end_AgriculturalPractices>
I´ve seen in the wiki that there are these 2 too, what are they for?
!VGROUP_PATH : ..\res
!MULTIPLYING_FACTOR : 1
Now, I get the error:
HDF5ReadDataR8_2D - ModuleHDF5 - ERR10
HDF5-DIAG: Error detected in HDF5 library version: 1.6.8 thread 0. Back trace follows.
#000: ..\..\src\H5G.c line 253 in H5Gopen(): group not found
major(10): Symbol table layer
minor(48): Object not found
#001: ..\..\src\H5G.c line 1783 in H5G_find(): object not found
major(10): Symbol table layer
minor(48): Object not found
#002: ..\..\src\H5Gtraverse.c line 397 in H5G_namei(): component not found
major(10): Symbol table layer
minor(48): Object not found
#003: ..\..\src\H5Gstab.c line 161 in H5G_stab_find(): not found
major(10): Symbol table layer
minor(48): Object not found
#004: ..\..\src\H5Gnode.c line 954 in H5G_node_found(): not found
major(10): Symbol table layer
minor(48): Object not found
Any help please?
Trying to fix this, I set the following configuration:
<begin_AgriculturalPractices>
!INITIALIZATION_METHOD : HDF
FILE_IN_TIME : HDF
HDF_FIELD_NAME : vegetation
FILENAME : ..\General Data\Other\Vegetation\maps\vegetation_simple.hdf5
REMAIN_CONSTANT : 0
DEFAULTVALUE : 27
<end_AgriculturalPractices>
I´ve seen in the wiki that there are these 2 too, what are they for?
!VGROUP_PATH : ..\res
!MULTIPLYING_FACTOR : 1
Now, I get the error:
HDF5ReadDataR8_2D - ModuleHDF5 - ERR10
HDF5-DIAG: Error detected in HDF5 library version: 1.6.8 thread 0. Back trace follows.
#000: ..\..\src\H5G.c line 253 in H5Gopen(): group not found
major(10): Symbol table layer
minor(48): Object not found
#001: ..\..\src\H5G.c line 1783 in H5G_find(): object not found
major(10): Symbol table layer
minor(48): Object not found
#002: ..\..\src\H5Gtraverse.c line 397 in H5G_namei(): component not found
major(10): Symbol table layer
minor(48): Object not found
#003: ..\..\src\H5Gstab.c line 161 in H5G_stab_find(): not found
major(10): Symbol table layer
minor(48): Object not found
#004: ..\..\src\H5Gnode.c line 954 in H5G_node_found(): not found
major(10): Symbol table layer
minor(48): Object not found
Any help please?

Re: reading an HDF
Hi
I will do some tests and as soon as possible I'll give you an answer.
I will do some tests and as soon as possible I'll give you an answer.
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Hello,
1)
there is no output of ID in time serie or HDF it should be the one the user says in HDF. We can add a new output to debug this.
2)
when I tested this just as you did, giving two different IDs with different practices it worked well, the plants growed at the right time.
it was not working for you at the first time because you were using HDF only for initialization and then it would use the same value always.
This is very important, even that you give the model an HDF with a lot of things changing in time if you say that the HDF will be used only to initialize than the model will only use the data of the first instant of the simulation and will maintain it in time. this is very important you have a lot of info in one file but you are saying that will only use part.
3)
your new problem seems that the HDF is not finding the group name
you said to the model that the group name is "vegetation". if you open the hdf with MOHID post (old interface) or MOHID Studio what name do you see in the results? what is the name of the group where the ID's are?
This name is the name that should appear in HDF_FIELD_NAME
The name of the group probably does not exist in the HDF file.
Best regards,
David
1)
there is no output of ID in time serie or HDF it should be the one the user says in HDF. We can add a new output to debug this.
2)
when I tested this just as you did, giving two different IDs with different practices it worked well, the plants growed at the right time.
it was not working for you at the first time because you were using HDF only for initialization and then it would use the same value always.
This is very important, even that you give the model an HDF with a lot of things changing in time if you say that the HDF will be used only to initialize than the model will only use the data of the first instant of the simulation and will maintain it in time. this is very important you have a lot of info in one file but you are saying that will only use part.
3)
your new problem seems that the HDF is not finding the group name
you said to the model that the group name is "vegetation". if you open the hdf with MOHID post (old interface) or MOHID Studio what name do you see in the results? what is the name of the group where the ID's are?
This name is the name that should appear in HDF_FIELD_NAME
The name of the group probably does not exist in the HDF file.
Best regards,
David
-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Hello david! thank you!
yes, the problem you say in 2) is solved and I found the 3) when I changed the part of FILE_IN_TIME trying to fit what you say about initialization.
Now, to see the group name, cant I see it in hdfviewer? anyway, when I open the hdf in the window I see:
group:results
feature:vegetation
..
layer_name: vegetation_simple[vegetation]
and, in the fillmatrix.dat, the property name is: vegetation.
So, shouldnt work with it?
yes, the problem you say in 2) is solved and I found the 3) when I changed the part of FILE_IN_TIME trying to fit what you say about initialization.
Now, to see the group name, cant I see it in hdfviewer? anyway, when I open the hdf in the window I see:
group:results
feature:vegetation
..
layer_name: vegetation_simple[vegetation]
and, in the fillmatrix.dat, the property name is: vegetation.
So, shouldnt work with it?
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Hello,
Can you upload here an image of the file opened in hdfviewer and with the group Results and the field Vegetation open?
Thanks,
David
Can you upload here an image of the file opened in hdfviewer and with the group Results and the field Vegetation open?
Thanks,
David
-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Could you try to run the tool to create the HDF but now the feature instead of naming it vegetation name it AgricPractID.
So that both the feature and each grid have similar names and each grid will be AgricPractID_0000X
Lets see. It seems tha the name can not be changed. But it should with HDF_FIELD_NAME.
Best regars,
David
So that both the feature and each grid have similar names and each grid will be AgricPractID_0000X
Lets see. It seems tha the name can not be changed. But it should with HDF_FIELD_NAME.
Best regars,
David
-
- MOHID Advanced user
- Posts: 172
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Hello!
Solved once that changed!!
Thank you!!
Solved once that changed!!

Thank you!!
-
- MOHID Advanced user
- Posts: 187
- Joined: Thu Jan 01, 1970 00:00
Re: reading an HDF
Good!
OK that was why it had that name in the sample.
I looked better in the code and the model needs HDF_FIELD_NAME always. But for now is not allowing a different name than AgricPractID just like any property in MOHID that you need to define the name just as is...
I do not now if we are changing this, since it is like a standard property name...
Nice that is solved. Hope also that the crops are doing what they are supposed to.
Best regards,
David
OK that was why it had that name in the sample.
I looked better in the code and the model needs HDF_FIELD_NAME always. But for now is not allowing a different name than AgricPractID just like any property in MOHID that you need to define the name just as is...
I do not now if we are changing this, since it is like a standard property name...
Nice that is solved. Hope also that the crops are doing what they are supposed to.
Best regards,
David
Who is online
Users browsing this forum: No registered users and 2 guests