Operations with hdf data

MOHID Land forum. Questions and discussion related to MOHID Land
epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Operations with hdf data

Postby epelde.ane@gmail.com » Mon Mar 11, 2013 14:34

Hi again!

I wonder if it is possible to calculate how many "X" value cells there are inside the catchment and not in the whole grid. For instance, how can I calculate how many km2 of a kind of crop are there in the catchemnt?

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby Jauch » Tue Mar 12, 2013 11:46

I'll look to see if there is an easy way to do that. :)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Wed Apr 17, 2013 15:46

I managed to do sth like this!! :)

After converting the grid data or hdf file to shapefile, I opened it with arcgis and I clipped the information inside the delineation. Then simply, I could count the number of polygons of different values. I have one question here, and it is that, how mohid considers the area of a cell that falls just in the border? It considers the volume of the entire cell, right?

And other problem I have is related to the representation of crop rotations and working with the grid data I need for creating the hdf with agricultural practices:
As in my study area the crop rotations are so important, from 4 main typical rotations I have defined 12 in order to maintain the total extension of each crop along the years. For that, in a vegetation map where in total are (for instance) 50 cells with barley, I want to, to the half, give one itinerary, and to the other half, another.

With mohid studio, I could do it with the modify tool, but it would take long.. Iᄡve tried loading the data file to mohid gis but appears an message saying "not yet implemented" so I think it is not possible yet to take the file from one program to other..
Is it possible to import from arcgis to mohid somehow?

Thanks!!

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Wed Apr 17, 2013 16:25

I thought I would need arcgis but I found an alternative way!! :D
just deleting the cells out of the catchment and then playing with the leyend maximum and minimum, i managed to visualize only the cells I need!!

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Fri Apr 19, 2013 09:30

Hello all!
Not so easy as it looked.. :)

After giving a value of -99 to all the cells falling out of the delineation, I opened the data file in excel so that I could calculate which cells were following each rotation and so.
So now, I have a grid data file with different cell values corresponding to each rotation.

Once defined the different time series (rotations), with fill matrix tool, I create the hdf. It gives a grid for each day, but I see it doesn’t take into account the time serie.

Besides, just in case the problem came from the -99 values, I replaced them in the grid data file for a 55 value, and then, I created another time serie so that it gives 55 ID to all the 55 values in the map.
I attach a screen cap with all this and I hope you understand :)

Thanks a lot again!!
Attachments
pant.png
pant.png (181.45 KiB) Viewed 6021 times

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Tue Apr 23, 2013 09:38

Hello!

I just found the answer to part of my problem!! :D The value of the cell doesnt fit because the hdf´s columns and rows are reversed.. ok, and I also had a problem with time series, that in the cells with rotation just near the ID change, the cells were taking an interpolated value. As in the time series I´m giving monthly data, I thought that 86400*31 was enought,but it wasnt.. then, I proved using 86400*31*11 (because I was using rotations which last 11 months) but neither..

I´ve tried with values as 30000000000000000000000000 but nothing.. I still got interpolated values..

can anyone explain me please the significance of this keyword? in the file says: "Maximum span for a time serie value to be considered valid" sorry but I dont get it well.. and if it can be the reason for this problem?

Thanks!

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby davidbrito » Tue Apr 23, 2013 11:24

Hello Ane,

I got some difficulties here to follow you are dealing with so many things.

I will try to recap:
you are trying to create and HDF for rotations.

That kind of process is different from for instance creating rain HDF from stations. The rain is interpolated in space and time from the stations while in crop in this case the "stations" are just crop rotations.

Can you post here the configuration of fillmatrix and an example of timeserie?
Since the method interpolates values in time, to overcome that you need to put for instance this example if having 3 crop changes:

Code: Select all

<BeginTimeSerie>
0 5
149.9 5
150 10
249.9 10
250 90
350 90
<EndTimeSerie>



We could make this tool not to interpolate but then it would need to use the next value or previous value (when in middle of dates that you define) and you would have to make some math to create the file right so it would respect your dates.

The keyword tou are talking about I think it is MAX_TIME_SPAN
and the concept is that if at the time where model is evaluating, the time interval to previous point and time interval to next point in time series is higher than the keyword value than it will not consider that value. So this keyword should always be higher than the maximum time interval between points in the time serie, so make it a huuuuuuge number.
This keywod only has a practical use in the case of interpolating rain to not consider a station if it has not enough information. It got from the case of interpolation and in the code needs to be defined but in these example put a number ridiculous high.

Is this what you were looking for?

Best regards,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Tue Apr 23, 2013 11:42

Thank you david!

ok! my mistake..I wasnt thinking at all in the interpolation made in time series (althoght I have already used them for interpolating rain..)

Clarified as well the max_span, I was confused cause I was seeing how the interpolated value was changing with a change in this keyword, but it makes sense.

I´ll do the change you say it time series and lets see if it works! :)

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Tue Apr 23, 2013 14:32

Last point :)

I´ve created finally the hdf with no interpolated data! the thing is, that the change of crop from year to year happens at different day (with a week delay) although in the time serie the change is set at the same time.

In the fillmatrix.dat I have:

PROPERTY_NAME : AgricPractID
PROPERTY_UNITS : ID
OUTPUT_FILE : AgricPractID.hdf5
VARIABLE_IN_TIME : 1
START : 2008 1 1 0 0 0
END : 2012 12 31 23 59 0
MAX_TIME_SPAN : 300000000000000000000
OUTPUT_TIME : 0 86400
GRID_DATA_FILE : comDTM_ND.dat


And all time series are like:

SERIE_INITIAL_DATA : 2008 1 1 0 0 0
TIME_UNITS : MONTHS

months ID
<BeginTimeSerie>
0 2
1 2
2 2
3 2
4 2
5 2
6 2
7 2
8 2
9.999 2
10 3
11 3
12 3
13 3
14 3
15 3
16 3
17 3
18 3
19 3
20 3
21.999 3
22 4
23 4
24 4
25 4
26 4
27 4
28 4
29 4
30 4
31 4
32 4
33.999 4
34 2
35 2
36 2
37 2
38 2
39 2
40 2
41 2
42 2
43 2
44 2
45.999 2
46 3

...

With this configuration wouldnt be expected to happen the crop ID change at the same time?

davidbrito
MOHID Advanced user
Posts: 187
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby davidbrito » Tue Apr 23, 2013 15:55

You do not need to put all the months you just need to put the months where you want to keep without interpolation and the months where it changes.

Try to do that in DAYS instead of months.
DAYS is also better because when you subtract dates in excel (e.g. crop change date - serie_initial_data) the result of Excel is in days so is direct.

Hope it works,
David

epelde.ane@gmail.com
MOHID Advanced user
Posts: 172
Joined: Thu Jan 01, 1970 00:00

Re: Operations with hdf data

Postby epelde.ane@gmail.com » Wed Apr 24, 2013 07:16

Ok, I´ll try as you say. Thanks!


Return to “MOHID Land”

Who is online

Users browsing this forum: No registered users and 1 guest